OSDN Git Service

2003-12-11 Ed Falis <falis@gnat.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / bld-io.ads
1 ------------------------------------------------------------------------------
2 --                                                                          --
3 --                         GNAT COMPILER COMPONENTS                         --
4 --                                                                          --
5 --                               B L D - I O                                --
6 --                                                                          --
7 --                                 S p e c                                  --
8 --                                                                          --
9 --        Copyright (C) 2002 Free Software Foundation, Inc.                 --
10 --                                                                          --
11 -- GNAT is free software;  you can  redistribute it  and/or modify it under --
12 -- terms of the  GNU General Public License as published  by the Free Soft- --
13 -- ware  Foundation;  either version 2,  or (at your option) any later ver- --
14 -- sion.  GNAT is distributed in the hope that it will be useful, but WITH- --
15 -- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
16 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
17 -- for  more details.  You should have  received  a copy of the GNU General --
18 -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
19 -- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
20 -- MA 02111-1307, USA.                                                      --
21 --                                                                          --
22 -- GNAT was originally developed  by the GNAT team at  New York University. --
23 -- Extensive contributions were provided by Ada Core Technologies Inc.      --
24 --                                                                          --
25 ------------------------------------------------------------------------------
26
27 --  The following private package allows the ouput of text to Makefiles
28 --  though buffers. It is possible to remove some lines from the buffers
29 --  without putting them effectively in the Makefile.
30
31 private package Bld.IO is
32
33    procedure Create (File_Name : String);
34    --  Create a new Makefile
35
36    procedure Flush;
37    --  Output all not suppressed lines to the Makefile
38
39    procedure Close;
40    --  Close the current Makefile
41
42    procedure Delete_All;
43    --  Delete all the Makefiles that have been created
44
45    function Name_Of_File return String;
46    --  Return the path name of the current Makefile
47
48    type Position is private;
49    --  Identification of a line in the Makefile
50
51    procedure Mark (Pos : out Position);
52    --  Record the current line.
53    --  No characters should have been already put on this line.
54
55    procedure Release (Pos : Position);
56    --  Suppress all line after this one, including this one.
57
58    procedure Suppress (Pos : Position);
59    --  Suppress a particular line
60
61    procedure Put (S : String);
62    --  Append a string to the current line
63
64    procedure New_Line;
65    --  End a line. Go to the next one (initially empty).
66
67 private
68
69    type Position is record
70       Value : Positive := 1;
71    end record;
72
73 end Bld.IO;