Remove some compile time warnings about duplicate definitions.
[official-gcc.git] / gcc / ada / prj-com.ads
blobddb7d0f8ef7d69d54451f184deef3c0bca0871d4
1 ------------------------------------------------------------------------------
2 -- --
3 -- GNAT COMPILER COMPONENTS --
4 -- --
5 -- P R J . C O M --
6 -- --
7 -- S p e c --
8 -- --
9 -- $Revision: 1.3 $ --
10 -- --
11 -- Copyright (C) 1992-2000 Free Software Foundation, Inc. --
12 -- --
13 -- GNAT is free software; you can redistribute it and/or modify it under --
14 -- terms of the GNU General Public License as published by the Free Soft- --
15 -- ware Foundation; either version 2, or (at your option) any later ver- --
16 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
17 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
18 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
19 -- for more details. You should have received a copy of the GNU General --
20 -- Public License distributed with GNAT; see file COPYING. If not, write --
21 -- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
22 -- MA 02111-1307, USA. --
23 -- --
24 -- GNAT was originally developed by the GNAT team at New York University. --
25 -- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
26 -- --
27 ------------------------------------------------------------------------------
29 -- The following package declares data types for GNAT project.
30 -- These data types are used in the bodies of the Prj hierarchy.
32 with GNAT.HTable;
33 with Table;
34 with Types; use Types;
36 package Prj.Com is
38 -- At one point, this package was private.
39 -- It cannot be private, because it is used outside of
40 -- the Prj hierarchy.
42 Tool_Name : Name_Id := No_Name;
44 Current_Verbosity : Verbosity := Default;
46 type Spec_Or_Body is
47 (Specification, Body_Part);
49 type File_Name_Data is record
50 Name : Name_Id := No_Name;
51 Path : Name_Id := No_Name;
52 Project : Project_Id := No_Project;
53 Needs_Pragma : Boolean := False;
54 end record;
55 -- File and Path name of a spec or body.
57 type File_Names_Data is array (Spec_Or_Body) of File_Name_Data;
59 type Unit_Id is new Nat;
60 No_Unit : constant Unit_Id := 0;
61 type Unit_Data is record
62 Name : Name_Id := No_Name;
63 File_Names : File_Names_Data;
64 end record;
65 -- File and Path names of a unit, with a reference to its
66 -- GNAT Project File.
68 package Units is new Table.Table
69 (Table_Component_Type => Unit_Data,
70 Table_Index_Type => Unit_Id,
71 Table_Low_Bound => 1,
72 Table_Initial => 100,
73 Table_Increment => 100,
74 Table_Name => "Prj.Com.Units");
76 type Header_Num is range 0 .. 2047;
78 function Hash is new GNAT.HTable.Hash (Header_Num => Header_Num);
80 function Hash (Name : Name_Id) return Header_Num;
82 function Hash (Name : String_Id) return Header_Num;
84 package Units_Htable is new GNAT.HTable.Simple_HTable
85 (Header_Num => Header_Num,
86 Element => Unit_Id,
87 No_Element => No_Unit,
88 Key => Name_Id,
89 Hash => Hash,
90 Equal => "=");
92 end Prj.Com;