OSDN Git Service

PR target/32335
[pf3gnuchains/gcc-fork.git] / gcc / ada / osint-b.ads
1 ------------------------------------------------------------------------------
2 --                                                                          --
3 --                         GNAT COMPILER COMPONENTS                         --
4 --                                                                          --
5 --                              O S I N T - B                               --
6 --                                                                          --
7 --                                 S p e c                                  --
8 --                                                                          --
9 --           Copyright (C) 2001-2006  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,  51  Franklin  Street,  Fifth  Floor, --
20 -- Boston, MA 02110-1301, 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 --  This package contains the low level, operating system routines used only
28 --  in the GNAT binder for command line processing and file input output.
29
30 package Osint.B is
31
32    function More_Lib_Files return Boolean;
33    --  Indicates whether more library information files remain to be processed.
34    --  Returns False right away if no source files, or if all source files
35    --  have been processed.
36
37    function Next_Main_Lib_File return File_Name_Type;
38    --  This function returns the name of the next library info file specified
39    --  on the command line. It is an error to call Next_Main_Lib_File if no
40    --  more library information files exist (i.e. Next_Main_Lib_File may be
41    --  called only if a previous call to More_Lib_Files returned True). This
42    --  name is the simple name, excluding any directory information.
43
44    -------------------
45    -- Binder Output --
46    -------------------
47
48    --  These routines are used by the binder to generate the C source file
49    --  containing the binder output. The format of this file is described
50    --  in the package Bindfmt.
51
52    procedure Create_Binder_Output
53      (Output_File_Name : String;
54       Typ              : Character;
55       Bfile            : out Name_Id);
56    --  Creates the binder output file. Typ is one of
57    --
58    --    'c'   create output file for case of generating C
59    --    'b'   create body file for case of generating Ada
60    --    's'   create spec file for case of generating Ada
61    --
62    --  If Output_File_Name is null, then a default name is used based on
63    --  the name of the most recently accessed main source file name. If
64    --  Output_File_Name is non-null then it is the full path name of the
65    --  file to be output (in the case of Ada, it must have an extension
66    --  of adb, and the spec file is created by changing the last character
67    --  from b to s. On return, Bfile also contains the Name_Id for the
68    --  generated file name.
69
70    procedure Write_Binder_Info (Info : String);
71    --  Writes the contents of the referenced string to the binder output file
72    --  created by a previous call to Create_Binder_Output. Info represents a
73    --  single line in the file, but does not contain any line termination
74    --  characters. The implementation of Write_Binder_Info is responsible
75    --  for adding necessary end of line and end of file control characters
76    --  as required by the operating system.
77
78    procedure Close_Binder_Output;
79    --  Closes the file created by Create_Binder_Output, flushing any
80    --  buffers etc from writes by Write_Binder_Info.
81
82 end Osint.B;