This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] convert some files in ada to ISO C90


OK if it passes 'make bootstrap' and 'make gnatlib_and_tools'?  :-)

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

Index: adadecode.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/adadecode.h,v
retrieving revision 1.4
diff -u -r1.4 adadecode.h
--- adadecode.h	24 Apr 2003 17:53:57 -0000	1.4
+++ adadecode.h	23 Oct 2003 23:57:12 -0000
@@ -42,9 +42,9 @@
    verbose information).
    VERBOSE is nonzero if more information about the entity is to be
    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
    function used in the binutils and GDB. Always consider using __gnat_decode
    instead of ada_demangle. Caller must free the pointer returned.  */
-extern char *ada_demangle PARAMS ((const char *));
+extern char *ada_demangle (const char *);
Index: atree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/atree.h,v
retrieving revision 1.5
diff -u -r1.5 atree.h
--- atree.h	24 Apr 2003 17:53:58 -0000	1.5
+++ atree.h	23 Oct 2003 23:57:14 -0000
@@ -274,7 +274,7 @@
 
 
 #define Parent atree__parent
-extern Node_Id Parent PARAMS((Node_Id));
+extern Node_Id Parent (Node_Id);
 
 /* Overloaded Functions:
 
@@ -287,24 +287,22 @@
 /* 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.  */
 
-static Boolean No	PARAMS ((Tree_Id));
-static Boolean Present	PARAMS ((Tree_Id));
+static Boolean No	(Tree_Id);
+static Boolean Present	(Tree_Id);
 
 INLINE Boolean
-No (N)
-     Tree_Id N;
+No (Tree_Id N)
 {
   return N == Empty;
 }
 
 INLINE Boolean
-Present (N)
-     Tree_Id N;
+Present (Tree_Id N)
 {
   return N != Empty;
 }
 
-extern Node_Id Parent		PARAMS((Tree_Id));
+extern Node_Id Parent		(Tree_Id);
 
 #define Current_Error_Node atree__current_error_node
 extern Node_Id Current_Error_Node;
Index: elists.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/elists.h,v
retrieving revision 1.5
diff -u -r1.5 elists.h
--- elists.h	24 Apr 2003 17:53:59 -0000	1.5
+++ elists.h	23 Oct 2003 23:57:14 -0000
@@ -56,36 +56,32 @@
 
 /* Element List Access Functions:  */
 
-static Node_Id Node		PARAMS ((Elmt_Id));
-static Elmt_Id First_Elmt	PARAMS ((Elist_Id));
-static Elmt_Id Last_Elmt	PARAMS ((Elist_Id));
-static Elmt_Id Next_Elmt	PARAMS ((Elmt_Id));
-static Boolean Is_Empty_Elmt_List PARAMS ((Elist_Id));
+static Node_Id Node		(Elmt_Id);
+static Elmt_Id First_Elmt	(Elist_Id);
+static Elmt_Id Last_Elmt	(Elist_Id);
+static Elmt_Id Next_Elmt	(Elmt_Id);
+static Boolean Is_Empty_Elmt_List (Elist_Id);
 
 INLINE Node_Id
-Node (Elmt)
-     Elmt_Id Elmt;
+Node (Elmt_Id Elmt)
 {
   return Elmts_Ptr[Elmt - First_Elmt_Id].node;
 }
 
 INLINE Elmt_Id
-First_Elmt (List)
-     Elist_Id List;
+First_Elmt (Elist_Id List)
 {
   return Elists_Ptr[List - First_Elist_Id].first;
 }
 
 INLINE Elmt_Id
-Last_Elmt (List)
-     Elist_Id List;
+Last_Elmt (Elist_Id List)
 {
   return Elists_Ptr[List - First_Elist_Id].last;
 }
 
 INLINE Elmt_Id
-Next_Elmt (Node)
-     Elmt_Id Node;
+Next_Elmt (Elmt_Id Node)
 {
   Int N = Elmts_Ptr[Node - First_Elmt_Id].next;
 
@@ -96,8 +92,7 @@
 }
 
 INLINE Boolean
-Is_Empty_Elmt_List (Id)
-     Elist_Id Id;
+Is_Empty_Elmt_List (Elist_Id Id)
 {
   return Elists_Ptr[Id - First_Elist_Id].first == No_Elmt;
 }
Index: namet.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/namet.h,v
retrieving revision 1.5
diff -u -r1.5 namet.h
--- namet.h	21 Oct 2003 13:42:10 -0000	1.5
+++ namet.h	23 Oct 2003 23:57:16 -0000
@@ -59,11 +59,10 @@
    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. */
 
-static char *Get_Name_String PARAMS ((Name_Id));
+static char *Get_Name_String (Name_Id);
 
 INLINE char *
-Get_Name_String (Id)
-     Name_Id Id;
+Get_Name_String (Name_Id Id)
 {
   return Name_Chars_Ptr + Names_Ptr[Id - First_Name_Id].Name_Chars_Index + 1;
 }
@@ -73,13 +72,12 @@
    wide characters are put back in their external form, and character literals
    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 *
-Get_Decoded_Name_String (Id)
-     Name_Id Id;
+Get_Decoded_Name_String (Name_Id Id)
 {
   namet__get_decoded_name_string (Id);
   Name_Buffer[Name_Len] = 0;
@@ -90,15 +88,15 @@
    package body entity suffixes stripped, and also all letters are upper
    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
    include the header here since it seems the best place for it.  */
 
 #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
-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 Body_Context_List exp_dbug__body_context_list
@@ -108,7 +106,7 @@
 extern char *Spec_Filename, *Body_Filename;
 
 #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.  */
 typedef Nat Source_File_Index;
@@ -120,8 +118,8 @@
 #define Get_Source_File_Index sinput__get_source_file_index
 #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 Full_Debug_Name	PARAMS ((Source_File_Index));
-extern File_Name_Type Reference_Name	PARAMS ((Source_File_Index));
-extern Source_File_Index Get_Source_File_Index PARAMS ((Source_Ptr));
-extern Logical_Line_Number Get_Logical_Line_Number PARAMS ((Source_Ptr));
+extern File_Name_Type Debug_Source_Name	(Source_File_Index);
+extern File_Name_Type Full_Debug_Name	(Source_File_Index);
+extern File_Name_Type Reference_Name	(Source_File_Index);
+extern Source_File_Index Get_Source_File_Index (Source_Ptr);
+extern Logical_Line_Number Get_Logical_Line_Number (Source_Ptr);
Index: nlists.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/nlists.h,v
retrieving revision 1.5
diff -u -r1.5 nlists.h
--- nlists.h	21 Oct 2003 13:42:10 -0000	1.5
+++ nlists.h	23 Oct 2003 23:57:16 -0000
@@ -56,84 +56,76 @@
 
 /* Node List Access Functions */
 
-static Node_Id First PARAMS ((List_Id));
+static Node_Id First (List_Id);
 
 INLINE Node_Id
-First (List)
-     List_Id List;
+First (List_Id List)
 {
   return List_Headers_Ptr[List - First_List_Id].first;
 }
 
 #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
-Last (List)
-     List_Id List;
+Last (List_Id List)
 {
   return List_Headers_Ptr[List - First_List_Id].last;
 }
 
 #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
-Next (Node)
-     Node_Id Node;
+Next (Node_Id Node)
 {
   return Next_Node_Ptr[Node - First_Node_Id];
 }
 
 #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
-Prev (Node)
-     Node_Id Node;
+Prev (Node_Id Node)
 {
   return Prev_Node_Ptr[Node - First_Node_Id];
 }
 
 
 #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_Non_Empty_List	PARAMS ((List_Id));
-static Boolean Is_List_Member		PARAMS ((Node_Id));
-static List_Id List_Containing		PARAMS ((Node_Id));
+static Boolean Is_Empty_List		(List_Id);
+static Boolean Is_Non_Empty_List	(List_Id);
+static Boolean Is_List_Member		(Node_Id);
+static List_Id List_Containing		(Node_Id);
 
 INLINE Boolean
-Is_Empty_List (Id)
-     List_Id Id;
+Is_Empty_List (List_Id Id)
 {
   return (First (Id) == Empty);
 }
 
 INLINE Boolean
-Is_Non_Empty_List (Id)
-     List_Id Id;
+Is_Non_Empty_List (List_Id Id)
 {
   return (Present (Id) && First (Id) != Empty);
 }
 
 INLINE Boolean
-Is_List_Member (Node)
-     Node_Id Node;
+Is_List_Member (Node_Id Node)
 {
   return Nodes_Ptr[Node - First_Node_Id].U.K.in_list;
 }
 
 INLINE List_Id
-List_Containing (Node)
-     Node_Id Node;
+List_Containing (Node_Id Node)
 {
   return Nodes_Ptr[Node - First_Node_Id].V.NX.link;
 }
Index: raise.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/raise.h,v
retrieving revision 1.5
diff -u -r1.5 raise.h
--- raise.h	21 Oct 2003 13:42:13 -0000	1.5
+++ raise.h	23 Oct 2003 23:57:16 -0000
@@ -51,19 +51,19 @@
 
 typedef struct Exception_Occurrence *Exception_Occurrence_Access;
 
-extern void _gnat_builtin_longjmp	PARAMS ((void *, int));
-extern void __gnat_unhandled_terminate	PARAMS ((void));
-extern void *__gnat_malloc		PARAMS ((__SIZE_TYPE__));
-extern void __gnat_free			PARAMS ((void *));
-extern void *__gnat_realloc		PARAMS ((void *, __SIZE_TYPE__));
-extern void __gnat_finalize		PARAMS ((void));
-extern void set_gnat_exit_status	PARAMS ((int));
-extern void __gnat_set_globals		PARAMS ((int, int,
+extern void _gnat_builtin_longjmp	(void *, int);
+extern void __gnat_unhandled_terminate	(void);
+extern void *__gnat_malloc		(__SIZE_TYPE__);
+extern void __gnat_free			(void *);
+extern void *__gnat_realloc		(void *, __SIZE_TYPE__);
+extern void __gnat_finalize		(void);
+extern void set_gnat_exit_status	(int);
+extern void __gnat_set_globals		(int, int,
 						 char, char, char, char,
 						 char *, char *,
-						 int, int, int, int));
-extern void __gnat_initialize		PARAMS ((void));
-extern void __gnat_init_float		PARAMS ((void));
-extern void __gnat_install_handler	PARAMS ((void));
+						 int, int, int, int);
+extern void __gnat_initialize		(void);
+extern void __gnat_init_float		(void);
+extern void __gnat_install_handler	(void);
 
 extern int gnat_exit_status;
Index: stringt.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/stringt.h,v
retrieving revision 1.5
diff -u -r1.5 stringt.h
--- stringt.h	21 Oct 2003 13:42:22 -0000	1.5
+++ stringt.h	23 Oct 2003 23:57:17 -0000
@@ -64,11 +64,10 @@
 
 
 /* String_Length returns the length of the specified string.  */
-INLINE Int String_Length PARAMS ((String_Id));
+INLINE Int String_Length (String_Id);
 
 INLINE Int
-String_Length (Id)
-     String_Id Id;
+String_Length (String_Id Id)
 {
   return Strings_Ptr[Id - First_String_Id].Length;
 }
@@ -77,12 +76,10 @@
 /* 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
    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
-Get_String_Char (Id, Index)
-     String_Id Id;
-     Int Index;
+Get_String_Char (String_Id Id, Int Index)
 {
   return
     String_Chars_Ptr

-- 
Nathanael Nerode  <neroden at gcc.gnu.org>
http://home.twcny.rr.com/nerode/neroden/fdl.html


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]