gcc:
[official-gcc.git] / gcc / ada / butil.ads
blob4ed78bb722380cff805f6c61c60079352d9b23f0
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- B U T I L --
6 -- --
7 -- S p e c --
8 -- --
9 -- Copyright (C) 1992-2005, 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 ------------------------------------------------------------------------------
27 with Types; use Types;
29 package Butil is
31 -- This package contains utility routines for the binder
33 function Is_Predefined_Unit return Boolean;
34 -- Given a unit name stored in Name_Buffer with length in Name_Len,
35 -- returns True if this is the name of a predefined unit or a child of
36 -- a predefined unit (including the obsolescent renamings). This is used
37 -- in the preference selection (see Better_Choice in body of Binde).
39 function Is_Internal_Unit return Boolean;
40 -- Given a unit name stored in Name_Buffer with length in Name_Len,
41 -- returns True if this is the name of an internal unit or a child of
42 -- an internal. Similar in usage to Is_Predefined_Unit.
44 -- Note: the following functions duplicate functionality in Uname, but
45 -- we want to avoid bringing Uname into the binder since it generates
46 -- to many unnecessary dependencies, and makes the binder too large.
48 function Uname_Less (U1, U2 : Unit_Name_Type) return Boolean;
49 -- Determines if the unit name U1 is alphabetically before U2
51 procedure Write_Unit_Name (U : Unit_Name_Type);
52 -- Output unit name with (body) or (spec) after as required. On return
53 -- Name_Len is set to the number of characters which were output.
55 end Butil;