Commit b4e2d709 by Nathanael Nerode

adadecode.h, [...]: Convert to ISO C90 declarations and definitions.

	* adadecode.h, atree.h, elists.h, namet.h, nlists.h, raise.h,
	stringt.h: Convert to ISO C90 declarations and definitions.

From-SVN: r72877
parent 1b24cd79
2003-10-23 Nathanael Nerode <neroden@gcc.gnu.org>
* adadecode.h, atree.h, elists.h, namet.h, nlists.h, raise.h,
stringt.h: Convert to ISO C90 declarations and definitions.
2003-10-23 Thomas Quinot <quinot@act-europe.fr> 2003-10-23 Thomas Quinot <quinot@act-europe.fr>
PR ada/11978: PR ada/11978:
......
...@@ -42,9 +42,9 @@ ...@@ -42,9 +42,9 @@
verbose information). verbose information).
VERBOSE is nonzero if more information about the entity is to be VERBOSE is nonzero if more information about the entity is to be
added at the end of the Ada name and surrounded by ( and ). */ added at the end of the Ada name and surrounded by ( and ). */
extern void __gnat_decode PARAMS ((const char *, char *, int)); extern void __gnat_decode (const char *, char *, int);
/* ada_demangle is added for COMPATIBILITY ONLY. It has the name of the /* ada_demangle is added for COMPATIBILITY ONLY. It has the name of the
function used in the binutils and GDB. Always consider using __gnat_decode function used in the binutils and GDB. Always consider using __gnat_decode
instead of ada_demangle. Caller must free the pointer returned. */ instead of ada_demangle. Caller must free the pointer returned. */
extern char *ada_demangle PARAMS ((const char *)); extern char *ada_demangle (const char *);
...@@ -274,7 +274,7 @@ extern struct Node *Nodes_Ptr; ...@@ -274,7 +274,7 @@ extern struct Node *Nodes_Ptr;
#define Parent atree__parent #define Parent atree__parent
extern Node_Id Parent PARAMS((Node_Id)); extern Node_Id Parent (Node_Id);
/* Overloaded Functions: /* Overloaded Functions:
...@@ -287,24 +287,22 @@ typedef Int Tree_Id; ...@@ -287,24 +287,22 @@ typedef Int Tree_Id;
/* These two functions can only be used for Node_Id and List_Id values and /* These two functions can only be used for Node_Id and List_Id values and
they work in the C version because Empty = No_List = 0. */ they work in the C version because Empty = No_List = 0. */
static Boolean No PARAMS ((Tree_Id)); static Boolean No (Tree_Id);
static Boolean Present PARAMS ((Tree_Id)); static Boolean Present (Tree_Id);
INLINE Boolean INLINE Boolean
No (N) No (Tree_Id N)
Tree_Id N;
{ {
return N == Empty; return N == Empty;
} }
INLINE Boolean INLINE Boolean
Present (N) Present (Tree_Id N)
Tree_Id N;
{ {
return N != Empty; return N != Empty;
} }
extern Node_Id Parent PARAMS((Tree_Id)); extern Node_Id Parent (Tree_Id);
#define Current_Error_Node atree__current_error_node #define Current_Error_Node atree__current_error_node
extern Node_Id Current_Error_Node; extern Node_Id Current_Error_Node;
......
...@@ -56,36 +56,32 @@ extern struct Elmt_Item *Elmts_Ptr; ...@@ -56,36 +56,32 @@ extern struct Elmt_Item *Elmts_Ptr;
/* Element List Access Functions: */ /* Element List Access Functions: */
static Node_Id Node PARAMS ((Elmt_Id)); static Node_Id Node (Elmt_Id);
static Elmt_Id First_Elmt PARAMS ((Elist_Id)); static Elmt_Id First_Elmt (Elist_Id);
static Elmt_Id Last_Elmt PARAMS ((Elist_Id)); static Elmt_Id Last_Elmt (Elist_Id);
static Elmt_Id Next_Elmt PARAMS ((Elmt_Id)); static Elmt_Id Next_Elmt (Elmt_Id);
static Boolean Is_Empty_Elmt_List PARAMS ((Elist_Id)); static Boolean Is_Empty_Elmt_List (Elist_Id);
INLINE Node_Id INLINE Node_Id
Node (Elmt) Node (Elmt_Id Elmt)
Elmt_Id Elmt;
{ {
return Elmts_Ptr[Elmt - First_Elmt_Id].node; return Elmts_Ptr[Elmt - First_Elmt_Id].node;
} }
INLINE Elmt_Id INLINE Elmt_Id
First_Elmt (List) First_Elmt (Elist_Id List)
Elist_Id List;
{ {
return Elists_Ptr[List - First_Elist_Id].first; return Elists_Ptr[List - First_Elist_Id].first;
} }
INLINE Elmt_Id INLINE Elmt_Id
Last_Elmt (List) Last_Elmt (Elist_Id List)
Elist_Id List;
{ {
return Elists_Ptr[List - First_Elist_Id].last; return Elists_Ptr[List - First_Elist_Id].last;
} }
INLINE Elmt_Id INLINE Elmt_Id
Next_Elmt (Node) Next_Elmt (Elmt_Id Node)
Elmt_Id Node;
{ {
Int N = Elmts_Ptr[Node - First_Elmt_Id].next; Int N = Elmts_Ptr[Node - First_Elmt_Id].next;
...@@ -96,8 +92,7 @@ Next_Elmt (Node) ...@@ -96,8 +92,7 @@ Next_Elmt (Node)
} }
INLINE Boolean INLINE Boolean
Is_Empty_Elmt_List (Id) Is_Empty_Elmt_List (Elist_Id Id)
Elist_Id Id;
{ {
return Elists_Ptr[Id - First_Elist_Id].first == No_Elmt; return Elists_Ptr[Id - First_Elist_Id].first == No_Elmt;
} }
...@@ -59,11 +59,10 @@ extern Int namet__name_len; ...@@ -59,11 +59,10 @@ extern Int namet__name_len;
strings we want are sitting in the name strings table in exactly the form strings we want are sitting in the name strings table in exactly the form
we need them (null terminated), we just point to the name directly. */ we need them (null terminated), we just point to the name directly. */
static char *Get_Name_String PARAMS ((Name_Id)); static char *Get_Name_String (Name_Id);
INLINE char * INLINE char *
Get_Name_String (Id) Get_Name_String (Name_Id Id)
Name_Id Id;
{ {
return Name_Chars_Ptr + Names_Ptr[Id - First_Name_Id].Name_Chars_Index + 1; return Name_Chars_Ptr + Names_Ptr[Id - First_Name_Id].Name_Chars_Index + 1;
} }
...@@ -73,13 +72,12 @@ Get_Name_String (Id) ...@@ -73,13 +72,12 @@ Get_Name_String (Id)
wide characters are put back in their external form, and character literals wide characters are put back in their external form, and character literals
are also returned in their external form (with surrounding apostrophes) */ are also returned in their external form (with surrounding apostrophes) */
extern void namet__get_decoded_name_string PARAMS ((Name_Id)); extern void namet__get_decoded_name_string (Name_Id);
static char *Get_Decoded_Name_String PARAMS ((Name_Id)); static char *Get_Decoded_Name_String (Name_Id);
INLINE char * INLINE char *
Get_Decoded_Name_String (Id) Get_Decoded_Name_String (Name_Id Id)
Name_Id Id;
{ {
namet__get_decoded_name_string (Id); namet__get_decoded_name_string (Id);
Name_Buffer[Name_Len] = 0; Name_Buffer[Name_Len] = 0;
...@@ -90,15 +88,15 @@ Get_Decoded_Name_String (Id) ...@@ -90,15 +88,15 @@ Get_Decoded_Name_String (Id)
package body entity suffixes stripped, and also all letters are upper package body entity suffixes stripped, and also all letters are upper
cased. This is used fo rbuilding the enumeration literal table. */ cased. This is used fo rbuilding the enumeration literal table. */
extern void casing__set_all_upper_case PARAMS ((void)); extern void casing__set_all_upper_case (void);
/* The following routines and variables are not part of Namet, but we /* The following routines and variables are not part of Namet, but we
include the header here since it seems the best place for it. */ include the header here since it seems the best place for it. */
#define Get_Encoded_Type_Name exp_dbug__get_encoded_type_name #define Get_Encoded_Type_Name exp_dbug__get_encoded_type_name
extern Boolean Get_Encoded_Type_Name PARAMS ((Entity_Id)); extern Boolean Get_Encoded_Type_Name (Entity_Id);
#define Get_Variant_Encoding exp_dbug__get_variant_encoding #define Get_Variant_Encoding exp_dbug__get_variant_encoding
extern void Get_Variant_Encoding PARAMS ((Entity_Id)); extern void Get_Variant_Encoding (Entity_Id);
#define Spec_Context_List exp_dbug__spec_context_list #define Spec_Context_List exp_dbug__spec_context_list
#define Body_Context_List exp_dbug__body_context_list #define Body_Context_List exp_dbug__body_context_list
...@@ -108,7 +106,7 @@ extern char *Spec_Context_List, *Body_Context_List; ...@@ -108,7 +106,7 @@ extern char *Spec_Context_List, *Body_Context_List;
extern char *Spec_Filename, *Body_Filename; extern char *Spec_Filename, *Body_Filename;
#define Is_Non_Ada_Error exp_ch11__is_non_ada_error #define Is_Non_Ada_Error exp_ch11__is_non_ada_error
extern Boolean Is_Non_Ada_Error PARAMS ((Entity_Id)); extern Boolean Is_Non_Ada_Error (Entity_Id);
/* Here are some functions in sinput.adb we call from a-trans.c. */ /* Here are some functions in sinput.adb we call from a-trans.c. */
typedef Nat Source_File_Index; typedef Nat Source_File_Index;
...@@ -120,8 +118,8 @@ typedef Int Logical_Line_Number; ...@@ -120,8 +118,8 @@ typedef Int Logical_Line_Number;
#define Get_Source_File_Index sinput__get_source_file_index #define Get_Source_File_Index sinput__get_source_file_index
#define Get_Logical_Line_Number sinput__get_logical_line_number #define Get_Logical_Line_Number sinput__get_logical_line_number
extern File_Name_Type Debug_Source_Name PARAMS ((Source_File_Index)); extern File_Name_Type Debug_Source_Name (Source_File_Index);
extern File_Name_Type Full_Debug_Name PARAMS ((Source_File_Index)); extern File_Name_Type Full_Debug_Name (Source_File_Index);
extern File_Name_Type Reference_Name PARAMS ((Source_File_Index)); extern File_Name_Type Reference_Name (Source_File_Index);
extern Source_File_Index Get_Source_File_Index PARAMS ((Source_Ptr)); extern Source_File_Index Get_Source_File_Index (Source_Ptr);
extern Logical_Line_Number Get_Logical_Line_Number PARAMS ((Source_Ptr)); extern Logical_Line_Number Get_Logical_Line_Number (Source_Ptr);
...@@ -56,84 +56,76 @@ extern Node_Id *Prev_Node_Ptr; ...@@ -56,84 +56,76 @@ extern Node_Id *Prev_Node_Ptr;
/* Node List Access Functions */ /* Node List Access Functions */
static Node_Id First PARAMS ((List_Id)); static Node_Id First (List_Id);
INLINE Node_Id INLINE Node_Id
First (List) First (List_Id List)
List_Id List;
{ {
return List_Headers_Ptr[List - First_List_Id].first; return List_Headers_Ptr[List - First_List_Id].first;
} }
#define First_Non_Pragma nlists__first_non_pragma #define First_Non_Pragma nlists__first_non_pragma
extern Node_Id First_Non_Pragma PARAMS ((Node_Id)); extern Node_Id First_Non_Pragma (Node_Id);
static Node_Id Last PARAMS ((List_Id)); static Node_Id Last (List_Id);
INLINE Node_Id INLINE Node_Id
Last (List) Last (List_Id List)
List_Id List;
{ {
return List_Headers_Ptr[List - First_List_Id].last; return List_Headers_Ptr[List - First_List_Id].last;
} }
#define First_Non_Pragma nlists__first_non_pragma #define First_Non_Pragma nlists__first_non_pragma
extern Node_Id First_Non_Pragma PARAMS ((List_Id)); extern Node_Id First_Non_Pragma (List_Id);
static Node_Id Next PARAMS ((Node_Id)); static Node_Id Next (Node_Id);
INLINE Node_Id INLINE Node_Id
Next (Node) Next (Node_Id Node)
Node_Id Node;
{ {
return Next_Node_Ptr[Node - First_Node_Id]; return Next_Node_Ptr[Node - First_Node_Id];
} }
#define Next_Non_Pragma nlists__next_non_pragma #define Next_Non_Pragma nlists__next_non_pragma
extern Node_Id Next_Non_Pragma PARAMS ((List_Id)); extern Node_Id Next_Non_Pragma (List_Id);
static Node_Id Prev PARAMS ((Node_Id)); static Node_Id Prev (Node_Id);
INLINE Node_Id INLINE Node_Id
Prev (Node) Prev (Node_Id Node)
Node_Id Node;
{ {
return Prev_Node_Ptr[Node - First_Node_Id]; return Prev_Node_Ptr[Node - First_Node_Id];
} }
#define Prev_Non_Pragma nlists__prev_non_pragma #define Prev_Non_Pragma nlists__prev_non_pragma
extern Node_Id Prev_Non_Pragma PARAMS ((Node_Id)); extern Node_Id Prev_Non_Pragma (Node_Id);
static Boolean Is_Empty_List PARAMS ((List_Id)); static Boolean Is_Empty_List (List_Id);
static Boolean Is_Non_Empty_List PARAMS ((List_Id)); static Boolean Is_Non_Empty_List (List_Id);
static Boolean Is_List_Member PARAMS ((Node_Id)); static Boolean Is_List_Member (Node_Id);
static List_Id List_Containing PARAMS ((Node_Id)); static List_Id List_Containing (Node_Id);
INLINE Boolean INLINE Boolean
Is_Empty_List (Id) Is_Empty_List (List_Id Id)
List_Id Id;
{ {
return (First (Id) == Empty); return (First (Id) == Empty);
} }
INLINE Boolean INLINE Boolean
Is_Non_Empty_List (Id) Is_Non_Empty_List (List_Id Id)
List_Id Id;
{ {
return (Present (Id) && First (Id) != Empty); return (Present (Id) && First (Id) != Empty);
} }
INLINE Boolean INLINE Boolean
Is_List_Member (Node) Is_List_Member (Node_Id Node)
Node_Id Node;
{ {
return Nodes_Ptr[Node - First_Node_Id].U.K.in_list; return Nodes_Ptr[Node - First_Node_Id].U.K.in_list;
} }
INLINE List_Id INLINE List_Id
List_Containing (Node) List_Containing (Node_Id Node)
Node_Id Node;
{ {
return Nodes_Ptr[Node - First_Node_Id].V.NX.link; return Nodes_Ptr[Node - First_Node_Id].V.NX.link;
} }
...@@ -51,19 +51,19 @@ struct Exception_Occurrence ...@@ -51,19 +51,19 @@ struct Exception_Occurrence
typedef struct Exception_Occurrence *Exception_Occurrence_Access; typedef struct Exception_Occurrence *Exception_Occurrence_Access;
extern void _gnat_builtin_longjmp PARAMS ((void *, int)); extern void _gnat_builtin_longjmp (void *, int);
extern void __gnat_unhandled_terminate PARAMS ((void)); extern void __gnat_unhandled_terminate (void);
extern void *__gnat_malloc PARAMS ((__SIZE_TYPE__)); extern void *__gnat_malloc (__SIZE_TYPE__);
extern void __gnat_free PARAMS ((void *)); extern void __gnat_free (void *);
extern void *__gnat_realloc PARAMS ((void *, __SIZE_TYPE__)); extern void *__gnat_realloc (void *, __SIZE_TYPE__);
extern void __gnat_finalize PARAMS ((void)); extern void __gnat_finalize (void);
extern void set_gnat_exit_status PARAMS ((int)); extern void set_gnat_exit_status (int);
extern void __gnat_set_globals PARAMS ((int, int, extern void __gnat_set_globals (int, int,
char, char, char, char, char, char, char, char,
char *, char *, char *, char *,
int, int, int, int)); int, int, int, int);
extern void __gnat_initialize PARAMS ((void)); extern void __gnat_initialize (void);
extern void __gnat_init_float PARAMS ((void)); extern void __gnat_init_float (void);
extern void __gnat_install_handler PARAMS ((void)); extern void __gnat_install_handler (void);
extern int gnat_exit_status; extern int gnat_exit_status;
...@@ -64,11 +64,10 @@ extern Char_Code *String_Chars_Ptr; ...@@ -64,11 +64,10 @@ extern Char_Code *String_Chars_Ptr;
/* String_Length returns the length of the specified string. */ /* String_Length returns the length of the specified string. */
INLINE Int String_Length PARAMS ((String_Id)); INLINE Int String_Length (String_Id);
INLINE Int INLINE Int
String_Length (Id) String_Length (String_Id Id)
String_Id Id;
{ {
return Strings_Ptr[Id - First_String_Id].Length; return Strings_Ptr[Id - First_String_Id].Length;
} }
...@@ -77,12 +76,10 @@ String_Length (Id) ...@@ -77,12 +76,10 @@ String_Length (Id)
/* Get_String_Char obtains the specified character from a stored string. The /* Get_String_Char obtains the specified character from a stored string. The
lower bound of stored strings is always 1, so the range of values is 1 to lower bound of stored strings is always 1, so the range of values is 1 to
String_Length (Id). */ String_Length (Id). */
INLINE Char_Code Get_String_Char PARAMS ((String_Id, Int)); INLINE Char_Code Get_String_Char (String_Id, Int);
INLINE Char_Code INLINE Char_Code
Get_String_Char (Id, Index) Get_String_Char (String_Id Id, Int Index)
String_Id Id;
Int Index;
{ {
return return
String_Chars_Ptr String_Chars_Ptr
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment