This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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] gas/[a-c]*: Convert to ISO-C.


Hi,

Committed as preapproved.

Kazu Hirata

2003-11-20  Kazu Hirata  <kazu@cs.umass.edu>

	* app.c: Convert to ISO-C.
	* as.h: Likewise.
	* atof-generic.c: Likewise.
	* bignum-copy.c: Likewise.
	* bignum.h: Likewise.
	* cgen.c: Likewise.
	* cgen.h: Likewise.
	* cond.c: Likewise.

Index: app.c
===================================================================
RCS file: /cvs/src/src/gas/app.c,v
retrieving revision 1.25
diff -u -r1.25 app.c
--- app.c	7 Jun 2003 14:53:59 -0000	1.25
+++ app.c	21 Nov 2003 01:48:58 -0000
@@ -87,15 +87,14 @@
 #define IS_LINE_COMMENT(c)		(lex[c] == LEX_IS_LINE_COMMENT_START)
 #define	IS_NEWLINE(c)			(lex[c] == LEX_IS_NEWLINE)
 
-static int process_escape PARAMS ((int));
+static int process_escape (int);
 
 /* FIXME-soon: The entire lexer/parser thingy should be
    built statically at compile time rather than dynamically
    each and every time the assembler is run.  xoxorich.  */
 
 void
-do_scrub_begin (m68k_mri)
-     int m68k_mri ATTRIBUTE_UNUSED;
+do_scrub_begin (int m68k_mri ATTRIBUTE_UNUSED)
 {
   const char *p;
   int c;
@@ -231,7 +230,7 @@
 };
 
 char *
-app_push ()
+app_push (void)
 {
   register struct app_save *saved;
 
@@ -267,8 +266,7 @@
 }
 
 void
-app_pop (arg)
-     char *arg;
+app_pop (char *arg)
 {
   register struct app_save *saved = (struct app_save *) arg;
 
@@ -304,8 +302,7 @@
    necessarily true.  */
 
 static int
-process_escape (ch)
-     int ch;
+process_escape (int ch)
 {
   switch (ch)
     {
@@ -340,10 +337,7 @@
    This is the way the old code used to work.  */
 
 int
-do_scrub_chars (get, tostart, tolen)
-     int (*get) PARAMS ((char *, int));
-     char *tostart;
-     int tolen;
+do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
 {
   char *to = tostart;
   char *toend = tostart + tolen;
Index: as.h
===================================================================
RCS file: /cvs/src/src/gas/as.h,v
retrieving revision 1.35
diff -u -r1.35 as.h
--- as.h	27 Oct 2003 12:45:17 -0000	1.35
+++ as.h	21 Nov 2003 01:48:58 -0000
@@ -492,7 +492,7 @@
   /* assembler mnemonic, lower case, no '.' */
   const char *poc_name;
   /* Do the work */
-  void (*poc_handler) PARAMS ((int));
+  void (*poc_handler) (int);
   /* Value to pass to handler */
   int poc_val;
 };
@@ -532,10 +532,10 @@
 
 #else /* __GNUC__ < 2 || defined(VMS) */
 
-#define PRINTF_LIKE(FCN)	void FCN PARAMS ((const char *format, ...))
-#define PRINTF_WHERE_LIKE(FCN)	void FCN PARAMS ((char *file, \
-						  unsigned int line, \
-					  	  const char *format, ...))
+#define PRINTF_LIKE(FCN)	void FCN (const char *format, ...)
+#define PRINTF_WHERE_LIKE(FCN)	void FCN (char *file, \
+					  unsigned int line, \
+					  const char *format, ...)
 
 #endif /* __GNUC__ < 2 || defined(VMS) */
 
@@ -553,54 +553,54 @@
 PRINTF_WHERE_LIKE (as_bad_where);
 PRINTF_WHERE_LIKE (as_warn_where);
 
-void as_assert PARAMS ((const char *, int, const char *));
-void as_abort PARAMS ((const char *, int, const char *)) ATTRIBUTE_NORETURN;
+void as_assert (const char *, int, const char *);
+void as_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
 
-void fprint_value PARAMS ((FILE *file, addressT value));
-void sprint_value PARAMS ((char *buf, addressT value));
+void fprint_value (FILE *file, addressT value);
+void sprint_value (char *buf, addressT value);
 
-int had_errors PARAMS ((void));
-int had_warnings PARAMS ((void));
+int had_errors (void);
+int had_warnings (void);
 
-void print_version_id PARAMS ((void));
-char *app_push PARAMS ((void));
-char *atof_ieee PARAMS ((char *str, int what_kind, LITTLENUM_TYPE * words));
-char *input_scrub_include_file PARAMS ((char *filename, char *position));
-extern void input_scrub_insert_line PARAMS((const char *line));
-extern void input_scrub_insert_file PARAMS((char *path));
-char *input_scrub_new_file PARAMS ((char *filename));
-char *input_scrub_next_buffer PARAMS ((char **bufp));
-int do_scrub_chars PARAMS ((int (*get) (char *, int), char *to, int tolen));
-int gen_to_words PARAMS ((LITTLENUM_TYPE * words, int precision,
-			  long exponent_bits));
-int had_err PARAMS ((void));
-int ignore_input PARAMS ((void));
-void cond_finish_check PARAMS ((int));
-void cond_exit_macro PARAMS ((int));
-int seen_at_least_1_file PARAMS ((void));
-void app_pop PARAMS ((char *arg));
-void as_howmuch PARAMS ((FILE * stream));
-void as_perror PARAMS ((const char *gripe, const char *filename));
-void as_where PARAMS ((char **namep, unsigned int *linep));
-void bump_line_counters PARAMS ((void));
-void do_scrub_begin PARAMS ((int));
-void input_scrub_begin PARAMS ((void));
-void input_scrub_close PARAMS ((void));
-void input_scrub_end PARAMS ((void));
-int new_logical_line PARAMS ((char *fname, int line_number));
-void subsegs_begin PARAMS ((void));
-void subseg_change PARAMS ((segT seg, int subseg));
-segT subseg_new PARAMS ((const char *name, subsegT subseg));
-segT subseg_force_new PARAMS ((const char *name, subsegT subseg));
-void subseg_set PARAMS ((segT seg, subsegT subseg));
+void print_version_id (void);
+char *app_push (void);
+char *atof_ieee (char *str, int what_kind, LITTLENUM_TYPE * words);
+char *input_scrub_include_file (char *filename, char *position);
+extern void input_scrub_insert_line (const char *line);
+extern void input_scrub_insert_file (char *path);
+char *input_scrub_new_file (char *filename);
+char *input_scrub_next_buffer (char **bufp);
+int do_scrub_chars (int (*get) (char *, int), char *to, int tolen);
+int gen_to_words (LITTLENUM_TYPE * words, int precision,
+			  long exponent_bits);
+int had_err (void);
+int ignore_input (void);
+void cond_finish_check (int);
+void cond_exit_macro (int);
+int seen_at_least_1_file (void);
+void app_pop (char *arg);
+void as_howmuch (FILE * stream);
+void as_perror (const char *gripe, const char *filename);
+void as_where (char **namep, unsigned int *linep);
+void bump_line_counters (void);
+void do_scrub_begin (int);
+void input_scrub_begin (void);
+void input_scrub_close (void);
+void input_scrub_end (void);
+int new_logical_line (char *fname, int line_number);
+void subsegs_begin (void);
+void subseg_change (segT seg, int subseg);
+segT subseg_new (const char *name, subsegT subseg);
+segT subseg_force_new (const char *name, subsegT subseg);
+void subseg_set (segT seg, subsegT subseg);
 #ifdef BFD_ASSEMBLER
-segT subseg_get PARAMS ((const char *, int));
+segT subseg_get (const char *, int);
 #endif
-int subseg_text_p PARAMS ((segT));
+int subseg_text_p (segT);
 
-void start_dependencies PARAMS ((char *));
-void register_dependency PARAMS ((char *));
-void print_dependencies PARAMS ((void));
+void start_dependencies (char *);
+void register_dependency (char *);
+void print_dependencies (void);
 
 struct expressionS;
 struct fix;
@@ -610,15 +610,15 @@
 
 #ifdef BFD_ASSEMBLER
 /* literal.c */
-valueT add_to_literal_pool PARAMS ((symbolS *, valueT, segT, int));
+valueT add_to_literal_pool (symbolS *, valueT, segT, int);
 #endif
 
-int check_eh_frame PARAMS ((struct expressionS *, unsigned int *));
-int eh_frame_estimate_size_before_relax PARAMS ((fragS *));
-int eh_frame_relax_frag PARAMS ((fragS *));
-void eh_frame_convert_frag PARAMS ((fragS *));
+int check_eh_frame (struct expressionS *, unsigned int *);
+int eh_frame_estimate_size_before_relax (fragS *);
+int eh_frame_relax_frag (fragS *);
+void eh_frame_convert_frag (fragS *);
 
-int generic_force_reloc PARAMS ((struct fix *));
+int generic_force_reloc (struct fix *);
 
 #include "expr.h"		/* Before targ-*.h */
 
Index: atof-generic.c
===================================================================
RCS file: /cvs/src/src/gas/atof-generic.c,v
retrieving revision 1.7
diff -u -r1.7 atof-generic.c
--- atof-generic.c	27 Oct 2003 12:45:17 -0000	1.7
+++ atof-generic.c	21 Nov 2003 01:48:58 -0000
@@ -32,7 +32,7 @@
 #endif
 
 #ifdef TRACE
-static void flonum_print PARAMS ((const FLONUM_TYPE *));
+static void flonum_print (const FLONUM_TYPE *);
 #endif
 
 #define ASSUME_DECIMAL_MARK_IS_DOT
@@ -75,16 +75,12 @@
   */
 
 int
-atof_generic (address_of_string_pointer,
-	      string_of_decimal_marks,
-	      string_of_decimal_exponent_marks,
-	      address_of_generic_floating_point_number)
-     /* return pointer to just AFTER number we read.  */
-     char **address_of_string_pointer;
-     /* At most one per number.  */
-     const char *string_of_decimal_marks;
-     const char *string_of_decimal_exponent_marks;
-     FLONUM_TYPE *address_of_generic_floating_point_number;
+atof_generic (/* return pointer to just AFTER number we read.  */
+	      char **address_of_string_pointer,
+	      /* At most one per number.  */
+	      const char *string_of_decimal_marks,
+	      const char *string_of_decimal_exponent_marks,
+	      FLONUM_TYPE *address_of_generic_floating_point_number)
 {
   int return_value;		/* 0 means OK.  */
   char *first_digit;
Index: bignum-copy.c
===================================================================
RCS file: /cvs/src/src/gas/bignum-copy.c,v
retrieving revision 1.3
diff -u -r1.3 bignum-copy.c
--- bignum-copy.c	8 Mar 2001 23:24:21 -0000	1.3
+++ bignum-copy.c	21 Nov 2003 01:48:58 -0000
@@ -33,11 +33,10 @@
 
 /* void */
 int
-bignum_copy (in, in_length, out, out_length)
-     register LITTLENUM_TYPE *in;
-     register int in_length;	/* in sizeof(littlenum)s */
-     register LITTLENUM_TYPE *out;
-     register int out_length;	/* in sizeof(littlenum)s */
+bignum_copy (register LITTLENUM_TYPE *in,
+	     register int in_length,	/* in sizeof(littlenum)s */
+	     register LITTLENUM_TYPE *out,
+	     register int out_length	/* in sizeof(littlenum)s */)
 {
   int significant_littlenums_dropped;
 
Index: bignum.h
===================================================================
RCS file: /cvs/src/src/gas/bignum.h,v
retrieving revision 1.2
diff -u -r1.2 bignum.h
--- bignum.h	8 Mar 2001 23:24:21 -0000	1.2
+++ bignum.h	21 Nov 2003 01:48:58 -0000
@@ -46,7 +46,7 @@
 
 /* lengths are in sizeof(littlenum)s */
 
-int bignum_copy PARAMS ((LITTLENUM_TYPE * in, int in_length,
-			 LITTLENUM_TYPE * out, int out_length));
+int bignum_copy (LITTLENUM_TYPE * in, int in_length,
+		 LITTLENUM_TYPE * out, int out_length);
 
 /* end of bignum.h */
Index: cgen.c
===================================================================
RCS file: /cvs/src/src/gas/cgen.c,v
retrieving revision 1.22
diff -u -r1.22 cgen.c
--- cgen.c	10 Jun 2003 22:08:45 -0000	1.22
+++ cgen.c	21 Nov 2003 01:48:59 -0000
@@ -29,7 +29,7 @@
 #include "cgen.h"
 #include "dwarf2dbg.h"
 
-static void queue_fixup PARAMS ((int, int, expressionS *));
+static void queue_fixup (int, int, expressionS *);
 
 /* Opcode table descriptor, must be set by md_begin.  */
 
Index: cgen.h
===================================================================
RCS file: /cvs/src/src/gas/cgen.h,v
retrieving revision 1.12
diff -u -r1.12 cgen.h
--- cgen.h	8 Apr 2003 12:47:07 -0000	1.12
+++ cgen.h	21 Nov 2003 01:48:59 -0000
@@ -46,59 +46,57 @@
    The result is an error message or NULL for success.
    The parsed value is stored in the bfd_vma *.  */
 extern const char * gas_cgen_parse_operand
-     PARAMS ((CGEN_CPU_DESC, enum cgen_parse_operand_type,
-	      const char **, int, int, enum cgen_parse_operand_result *,
-	      bfd_vma *));
+     (CGEN_CPU_DESC, enum cgen_parse_operand_type,
+      const char **, int, int, enum cgen_parse_operand_result *,
+      bfd_vma *);
 
 /* Call this from md_assemble to initialize the assembler callback.  */
-extern void gas_cgen_init_parse PARAMS ((void));
+extern void gas_cgen_init_parse (void);
 
 /* Routines and macros for saving fixup chains.  */
-extern void gas_cgen_save_fixups PARAMS ((int));
-extern void gas_cgen_restore_fixups PARAMS ((int));
-extern void gas_cgen_swap_fixups PARAMS ((int));
-extern void gas_cgen_initialize_saved_fixups_array PARAMS ((void));
+extern void gas_cgen_save_fixups (int);
+extern void gas_cgen_restore_fixups (int);
+extern void gas_cgen_swap_fixups (int);
+extern void gas_cgen_initialize_saved_fixups_array (void);
 #define MAX_SAVED_FIXUP_CHAINS 50
 
 /* Add a register to the assembler's hash table.
    This makes lets GAS parse registers for us.
    ??? This isn't currently used, but it could be in the future.  */
-extern void cgen_asm_record_register PARAMS ((char *, int));
+extern void cgen_asm_record_register (char *, int);
 
 /* After CGEN_SYM (assemble_insn) is done, this is called to
    output the insn and record any fixups.  */
-extern void gas_cgen_finish_insn PARAMS ((const CGEN_INSN *,
-					  CGEN_INSN_BYTES_PTR, unsigned int,
-					  int, finished_insnS *));
+extern void gas_cgen_finish_insn (const CGEN_INSN *,
+				  CGEN_INSN_BYTES_PTR, unsigned int,
+				  int, finished_insnS *);
 
 /* Record a fixup.  */
-extern fixS * gas_cgen_record_fixup PARAMS ((fragS *, int, const CGEN_INSN *,
-					     int, const CGEN_OPERAND *, int,
-					     symbolS *, offsetT));
-extern fixS * gas_cgen_record_fixup_exp PARAMS ((fragS *, int, const CGEN_INSN *,
-						 int, const CGEN_OPERAND *, int,
-						 expressionS *));
+extern fixS * gas_cgen_record_fixup (fragS *, int, const CGEN_INSN *,
+				     int, const CGEN_OPERAND *, int,
+				     symbolS *, offsetT);
+extern fixS * gas_cgen_record_fixup_exp (fragS *, int, const CGEN_INSN *,
+					 int, const CGEN_OPERAND *, int,
+					 expressionS *);
 
 /* md_apply_fix3 handler */
-extern void gas_cgen_md_apply_fix3 PARAMS ((fixS *, valueT *, segT));
+extern void gas_cgen_md_apply_fix3 (fixS *, valueT *, segT);
 
 /* tc_gen_reloc handler */
-extern arelent *gas_cgen_tc_gen_reloc PARAMS ((asection *, fixS *));
+extern arelent *gas_cgen_tc_gen_reloc (asection *, fixS *);
 
 /* Target supplied routine to lookup a reloc.  */
 extern bfd_reloc_code_real_type
-md_cgen_lookup_reloc PARAMS ((const CGEN_INSN *, const CGEN_OPERAND *,
-			      fixS *));
+md_cgen_lookup_reloc (const CGEN_INSN *, const CGEN_OPERAND *, fixS *);
 
 /* Optional target supplied routine to record a fixup for an expression.  */
 extern fixS *
-md_cgen_record_fixup_exp PARAMS ((fragS *, int, const CGEN_INSN *, int,
-				  const CGEN_OPERAND *, int,
-				  expressionS *));
+md_cgen_record_fixup_exp (fragS *, int, const CGEN_INSN *, int,
+			  const CGEN_OPERAND *, int, expressionS *);
 
-extern void gas_cgen_md_operand PARAMS ((expressionS *));
+extern void gas_cgen_md_operand (expressionS *);
 
 /* Perform any cgen specific initialisation for gas.  */
-extern void gas_cgen_begin PARAMS ((void));
+extern void gas_cgen_begin (void);
 
 #endif /* GAS_CGEN_H */
Index: cond.c
===================================================================
RCS file: /cvs/src/src/gas/cond.c,v
retrieving revision 1.12
diff -u -r1.12 cond.c
--- cond.c	19 Jul 2002 11:35:06 -0000	1.12
+++ cond.c	21 Nov 2003 01:48:59 -0000
@@ -55,8 +55,8 @@
   int macro_nest;
 };
 
-static void initialize_cframe PARAMS ((struct conditional_frame *cframe));
-static char *get_mri_string PARAMS ((int, int *));
+static void initialize_cframe (struct conditional_frame *cframe);
+static char *get_mri_string (int, int *);
 
 static struct conditional_frame *current_cframe = NULL;
 
@@ -64,8 +64,7 @@
    the .ifndef (test_defined == 0) pseudo op.  */
 
 void
-s_ifdef (test_defined)
-     int test_defined;
+s_ifdef (int test_defined)
 {
   /* Points to name of symbol.  */
   char *name;
@@ -123,8 +122,7 @@
 }
 
 void
-s_if (arg)
-     int arg;
+s_if (int arg)
 {
   expressionS operand;
   struct conditional_frame cframe;
@@ -186,9 +184,7 @@
 /* Get a string for the MRI IFC or IFNC pseudo-ops.  */
 
 static char *
-get_mri_string (terminator, len)
-     int terminator;
-     int *len;
+get_mri_string (int terminator, int *len)
 {
   char *ret;
   char *s;
@@ -228,8 +224,7 @@
 /* The MRI IFC and IFNC pseudo-ops.  */
 
 void
-s_ifc (arg)
-     int arg;
+s_ifc (int arg)
 {
   char *stop = NULL;
   char stopc;
@@ -270,8 +265,7 @@
 }
 
 void
-s_elseif (arg)
-     int arg;
+s_elseif (int arg)
 {
   if (current_cframe == NULL)
     {
@@ -346,8 +340,7 @@
 }
 
 void
-s_endif (arg)
-     int arg ATTRIBUTE_UNUSED;
+s_endif (int arg ATTRIBUTE_UNUSED)
 {
   struct conditional_frame *hold;
 
@@ -378,8 +371,7 @@
 }
 
 void
-s_else (arg)
-     int arg ATTRIBUTE_UNUSED;
+s_else (int arg ATTRIBUTE_UNUSED)
 {
   if (current_cframe == NULL)
     {
@@ -426,8 +418,7 @@
 }
 
 void
-s_ifeqs (arg)
-     int arg;
+s_ifeqs (int arg)
 {
   char *s1, *s2;
   int len1, len2;
@@ -465,7 +456,7 @@
 }
 
 int
-ignore_input ()
+ignore_input (void)
 {
   char *s;
 
@@ -499,8 +490,7 @@
 }
 
 static void
-initialize_cframe (cframe)
-     struct conditional_frame *cframe;
+initialize_cframe (struct conditional_frame *cframe)
 {
   memset (cframe, 0, sizeof (*cframe));
   as_where (&cframe->if_file_line.file,
@@ -516,8 +506,7 @@
    negative, we are being called at the of the input files.  */
 
 void
-cond_finish_check (nest)
-     int nest;
+cond_finish_check (int nest)
 {
   if (current_cframe != NULL && current_cframe->macro_nest >= nest)
     {
@@ -540,8 +529,7 @@
    nested, and just pop them off the stack.  */
 
 void
-cond_exit_macro (nest)
-     int nest;
+cond_exit_macro (int nest)
 {
   while (current_cframe != NULL && current_cframe->macro_nest >= nest)
     {


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