annotate gcc/ada/osint-b.ads @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents 04ced10e8804
children 1830386684a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 ------------------------------------------------------------------------------
kono
parents:
diff changeset
2 -- --
kono
parents:
diff changeset
3 -- GNAT COMPILER COMPONENTS --
kono
parents:
diff changeset
4 -- --
kono
parents:
diff changeset
5 -- O S I N T - B --
kono
parents:
diff changeset
6 -- --
kono
parents:
diff changeset
7 -- S p e c --
kono
parents:
diff changeset
8 -- --
131
84e7813d76e9 gcc-8.2
mir3636
parents: 111
diff changeset
9 -- Copyright (C) 2001-2018, Free Software Foundation, Inc. --
111
kono
parents:
diff changeset
10 -- --
kono
parents:
diff changeset
11 -- GNAT is free software; you can redistribute it and/or modify it under --
kono
parents:
diff changeset
12 -- terms of the GNU General Public License as published by the Free Soft- --
kono
parents:
diff changeset
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
kono
parents:
diff changeset
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
kono
parents:
diff changeset
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
kono
parents:
diff changeset
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
kono
parents:
diff changeset
17 -- for more details. You should have received a copy of the GNU General --
kono
parents:
diff changeset
18 -- Public License distributed with GNAT; see file COPYING3. If not, go to --
kono
parents:
diff changeset
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
kono
parents:
diff changeset
20 -- --
kono
parents:
diff changeset
21 -- GNAT was originally developed by the GNAT team at New York University. --
kono
parents:
diff changeset
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
kono
parents:
diff changeset
23 -- --
kono
parents:
diff changeset
24 ------------------------------------------------------------------------------
kono
parents:
diff changeset
25
kono
parents:
diff changeset
26 -- This package contains the low level, operating system routines used only
kono
parents:
diff changeset
27 -- in the GNAT binder for command line processing and file input output.
kono
parents:
diff changeset
28
kono
parents:
diff changeset
29 package Osint.B is
kono
parents:
diff changeset
30
kono
parents:
diff changeset
31 function More_Lib_Files return Boolean;
kono
parents:
diff changeset
32 -- Indicates whether more library information files remain to be processed.
kono
parents:
diff changeset
33 -- Returns False right away if no source files, or if all source files
kono
parents:
diff changeset
34 -- have been processed.
kono
parents:
diff changeset
35
kono
parents:
diff changeset
36 function Next_Main_Lib_File return File_Name_Type;
kono
parents:
diff changeset
37 -- This function returns the name of the next library info file specified
kono
parents:
diff changeset
38 -- on the command line. It is an error to call Next_Main_Lib_File if no
kono
parents:
diff changeset
39 -- more library information files exist (i.e. Next_Main_Lib_File may be
kono
parents:
diff changeset
40 -- called only if a previous call to More_Lib_Files returned True). This
kono
parents:
diff changeset
41 -- name is the simple name, excluding any directory information.
kono
parents:
diff changeset
42
kono
parents:
diff changeset
43 -------------------
kono
parents:
diff changeset
44 -- Binder Output --
kono
parents:
diff changeset
45 -------------------
kono
parents:
diff changeset
46
kono
parents:
diff changeset
47 -- These routines are used by the binder to generate the Ada source files
kono
parents:
diff changeset
48 -- containing the binder output. The format of these files is described in
kono
parents:
diff changeset
49 -- package Bindgen.
kono
parents:
diff changeset
50
kono
parents:
diff changeset
51 procedure Create_Binder_Output
kono
parents:
diff changeset
52 (Output_File_Name : String;
kono
parents:
diff changeset
53 Typ : Character;
kono
parents:
diff changeset
54 Bfile : out Name_Id);
kono
parents:
diff changeset
55 -- Creates the binder output file. Typ is one of
kono
parents:
diff changeset
56 -- 'b' create body file for case of generating Ada
kono
parents:
diff changeset
57 -- 's' create spec file for case of generating Ada
kono
parents:
diff changeset
58 --
kono
parents:
diff changeset
59 -- If Output_File_Name is null, then a default name is used based on
kono
parents:
diff changeset
60 -- the name of the most recently accessed main source file name. If
kono
parents:
diff changeset
61 -- Output_File_Name is non-null then it is the full path name of the
kono
parents:
diff changeset
62 -- file to be output (in the case of Ada, it must have an extension
kono
parents:
diff changeset
63 -- of adb, and the spec file is created by changing the last character
kono
parents:
diff changeset
64 -- from b to s. On return, Bfile also contains the Name_Id for the
kono
parents:
diff changeset
65 -- generated file name.
kono
parents:
diff changeset
66
kono
parents:
diff changeset
67 procedure Write_Binder_Info (Info : String);
kono
parents:
diff changeset
68 -- Writes the contents of the referenced string to the binder output file
kono
parents:
diff changeset
69 -- created by a previous call to Create_Binder_Output. Info represents a
kono
parents:
diff changeset
70 -- single line in the file, but does not contain any line termination
kono
parents:
diff changeset
71 -- characters. The implementation of Write_Binder_Info is responsible
kono
parents:
diff changeset
72 -- for adding necessary end of line and end of file control characters
kono
parents:
diff changeset
73 -- as required by the operating system.
kono
parents:
diff changeset
74
kono
parents:
diff changeset
75 procedure Close_Binder_Output;
kono
parents:
diff changeset
76 -- Closes the file created by Create_Binder_Output, flushing any
kono
parents:
diff changeset
77 -- buffers etc. from writes by Write_Binder_Info.
kono
parents:
diff changeset
78
kono
parents:
diff changeset
79 procedure Set_Current_File_Name_Index (To : Int);
kono
parents:
diff changeset
80 -- Set value of Current_File_Name_Index (in private part of Osint) to To
kono
parents:
diff changeset
81
kono
parents:
diff changeset
82 ----------------------------------
kono
parents:
diff changeset
83 -- Other binder-generated files --
kono
parents:
diff changeset
84 ----------------------------------
kono
parents:
diff changeset
85
kono
parents:
diff changeset
86 procedure Set_List_File (Filename : String);
kono
parents:
diff changeset
87 -- Create Filename as a text output file and set it as the current output
kono
parents:
diff changeset
88 -- (see Output.Set_Output).
kono
parents:
diff changeset
89
kono
parents:
diff changeset
90 procedure Close_List_File;
kono
parents:
diff changeset
91 -- If a specific output file was created by Set_List_File, close it and
kono
parents:
diff changeset
92 -- reset the current output file to standard output.
kono
parents:
diff changeset
93
kono
parents:
diff changeset
94 end Osint.B;