1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2018, Free Software Foundation, Inc. --
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 3, 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. --
18 -- As a special exception under Section 7 of GPL version 3, you are granted --
19 -- additional permissions described in the GCC Runtime Library Exception, --
20 -- version 3.1, as published by the Free Software Foundation. --
22 -- You should have received a copy of the GNU General Public License and --
23 -- a copy of the GCC Runtime Library Exception along with this program; --
24 -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see --
25 -- <http://www.gnu.org/licenses/>. --
27 -- GNAT was originally developed by the GNAT team at New York University. --
28 -- Extensive contributions were provided by Ada Core Technologies Inc. --
30 ------------------------------------------------------------------------------
32 -- This package, together with its child package Fname.UF define the
33 -- association between source file names and unit names as defined
34 -- (see package Uname for definition of format of unit names).
36 with Namet
; use Namet
;
40 -- Note: this package spec does not depend on the Uname spec in the Ada
41 -- sense, but the comments and description of the semantics do depend on
42 -- the conventions established by Uname.
44 ---------------------------
45 -- File Name Conventions --
46 ---------------------------
48 -- GNAT requires that there be a one to one correspondence between source
49 -- file names (as used in the Osint package interface) and unit names as
50 -- defined by the Uname package. This correspondence is defined by the
51 -- two subprograms defined here in the Fname package.
53 -- For full rules of file naming, see GNAT User's Guide. Note that the
54 -- naming rules are affected by the presence of Source_File_Name pragmas
55 -- that have been previously processed.
57 -- Note that the file name does *not* include the directory name. The
58 -- management of directories is provided by Osint, and full file names
59 -- are used only for error message purposes within GNAT itself.
65 function Is_Predefined_File_Name
67 Renamings_Included
: Boolean := True) return Boolean;
68 function Is_Predefined_File_Name
69 (Fname
: File_Name_Type
;
70 Renamings_Included
: Boolean := True) return Boolean;
71 -- These functions determine if the given file name (which must be a simple
72 -- file name with no directory information) is the source or ALI file name
73 -- for one of the predefined library units (i.e. part of the Ada, System,
74 -- or Interface hierarchies). Note that units in the GNAT hierarchy are not
75 -- considered predefined (see Is_Internal_File_Name below).
77 -- The Renamings_Included parameter indicates whether annex J renamings
78 -- such as Text_IO are to be considered as predefined. If
79 -- Renamings_Included is True, then Text_IO will return True, otherwise
80 -- only children of Ada, Interfaces and System return True.
82 function Is_Predefined_Renaming_File_Name
83 (Fname
: String) return Boolean;
84 function Is_Predefined_Renaming_File_Name
85 (Fname
: File_Name_Type
) return Boolean;
86 -- True if Fname is the file name for a predefined renaming (the same file
87 -- names that are included if Renamings_Included => True is passed to
88 -- Is_Predefined_File_Name).
90 function Is_Internal_File_Name
92 Renamings_Included
: Boolean := True) return Boolean;
93 function Is_Internal_File_Name
94 (Fname
: File_Name_Type
;
95 Renamings_Included
: Boolean := True) return Boolean;
96 -- Same as Is_Predefined_File_Name, except units in the GNAT hierarchy are
99 function Is_GNAT_File_Name
(Fname
: String) return Boolean;
100 function Is_GNAT_File_Name
(Fname
: File_Name_Type
) return Boolean;
101 -- True for units in the GNAT hierarchy
104 -- Dummy procedure (reads dummy table values from tree file)
106 procedure Tree_Write
;
107 -- Writes out internal tables to current tree file using Tree_Write
108 -- This is actually a dummy routine, since the relevant table is
109 -- no longer used, but we retain it for now, to avoid a tree file
110 -- incompatibility with the 3.13 compiler. Should be removed for
111 -- the 3.14a release ???