* config/i386/uwin.h: Remove SUBTARGET_PROLOGUE.
[official-gcc.git] / gcc / ada / namet.h
blob6616405051adefe7f253c50aca1875b785e17a34
1 /****************************************************************************
2 * *
3 * GNAT COMPILER COMPONENTS *
4 * *
5 * N A M E T *
6 * *
7 * C Header File *
8 * *
9 * *
10 * Copyright (C) 1992-2002 Free Software Foundation, Inc. *
11 * *
12 * GNAT is free software; you can redistribute it and/or modify it under *
13 * terms of the GNU General Public License as published by the Free Soft- *
14 * ware Foundation; either version 2, or (at your option) any later ver- *
15 * sion. GNAT is distributed in the hope that it will be useful, but WITH- *
16 * OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
17 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
18 * for more details. You should have received a copy of the GNU General *
19 * Public License distributed with GNAT; see file COPYING. If not, write *
20 * to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, *
21 * MA 02111-1307, USA. *
22 * *
23 * GNAT was originally developed by the GNAT team at New York University. *
24 * Extensive contributions were provided by Ada Core Technologies Inc. *
25 * *
26 ****************************************************************************/
28 /* This is the C file that corresponds to the Ada package specification
29 Namet. It was created manually from files namet.ads and namet.adb. */
31 /* Structure defining a names table entry. */
33 struct Name_Entry
35 Int Name_Chars_Index; /* Starting location of char in Name_Chars table. */
36 Short Name_Len; /* Length of this name in characters. */
37 Byte Byte_Info; /* Byte value associated with this name */
38 Byte Spare; /* Unused */
39 Name_Id Hash_Link; /* Link to next entry in names table for same hash
40 code. Not accessed by C routines. */
41 Int Int_Info; /* Int value associated with this name */
44 /* Pointer to names table vector. */
45 #define Names_Ptr namet__name_entries__table
46 extern struct Name_Entry *Names_Ptr;
48 /* Pointer to name characters table. */
49 #define Name_Chars_Ptr namet__name_chars__table
50 extern char *Name_Chars_Ptr;
52 #define Name_Buffer namet__name_buffer
53 extern char Name_Buffer[];
55 extern Int namet__name_len;
56 #define Name_Len namet__name_len
58 /* Get_Name_String returns a null terminated C string for the specified name.
59 We could use the official Ada routine for this purpose, but since the
60 strings we want are sitting in the name strings table in exactly the form
61 we need them (null terminated), we just point to the name directly. */
63 static char *Get_Name_String PARAMS ((Name_Id));
65 INLINE char *
66 Get_Name_String (Id)
67 Name_Id Id;
69 return Name_Chars_Ptr + Names_Ptr[Id - First_Name_Id].Name_Chars_Index + 1;
72 /* Get_Decoded_Name_String returns a null terminated C string in the same
73 manner as Get_Name_String, except that it is decoded (i.e. upper half or
74 wide characters are put back in their external form, and character literals
75 are also returned in their external form (with surrounding apostrophes) */
77 extern void namet__get_decoded_name_string PARAMS ((Name_Id));
79 static char *Get_Decoded_Name_String PARAMS ((Name_Id));
81 INLINE char *
82 Get_Decoded_Name_String (Id)
83 Name_Id Id;
85 namet__get_decoded_name_string (Id);
86 Name_Buffer[Name_Len] = 0;
87 return Name_Buffer;
90 /* Like Get_Decoded_Name_String, but the result has all qualification and
91 package body entity suffixes stripped, and also all letters are upper
92 cased. This is used fo rbuilding the enumeration literal table. */
94 extern void casing__set_all_upper_case PARAMS ((void));
96 /* The following routines and variables are not part of Namet, but we
97 include the header here since it seems the best place for it. */
99 #define Get_Encoded_Type_Name exp_dbug__get_encoded_type_name
100 extern Boolean Get_Encoded_Type_Name PARAMS ((Entity_Id));
101 #define Get_Variant_Encoding exp_dbug__get_variant_encoding
102 extern void Get_Variant_Encoding PARAMS ((Entity_Id));
104 #define Spec_Context_List exp_dbug__spec_context_list
105 #define Body_Context_List exp_dbug__body_context_list
106 extern char *Spec_Context_List, *Body_Context_List;
107 #define Spec_Filename exp_dbug__spec_filename
108 #define Body_Filename exp_dbug__body_filename
109 extern char *Spec_Filename, *Body_Filename;
111 #define Is_Non_Ada_Error exp_ch11__is_non_ada_error
112 extern Boolean Is_Non_Ada_Error PARAMS ((Entity_Id));
114 /* Here are some functions in sinput.adb we call from a-trans.c. */
115 typedef Nat Source_File_Index;
116 typedef Int Logical_Line_Number;
118 #define Debug_Source_Name sinput__debug_source_name
119 #define Reference_Name sinput__reference_name
120 #define Get_Source_File_Index sinput__get_source_file_index
121 #define Get_Logical_Line_Number sinput__get_logical_line_number
123 extern File_Name_Type Debug_Source_Name PARAMS ((Source_File_Index));
124 extern File_Name_Type Reference_Name PARAMS ((Source_File_Index));
125 extern Source_File_Index Get_Source_File_Index PARAMS ((Source_Ptr));
126 extern Logical_Line_Number Get_Logical_Line_Number PARAMS ((Source_Ptr));