From: Kazu Hirata Date: Thu, 27 Nov 2003 19:14:41 +0000 (+0000) Subject: * read.c: Convert to ISO-C. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=39e6acbdffbfbd869e3749a6ad5e51717558c278;p=binutils-gdb.git * read.c: Convert to ISO-C. * read.h: Likewise. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index aaf8b965a9a..8a11976773a 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2003-11-27 Kazu Hirata + + * read.c: Convert to ISO-C. + * read.h: Likewise. + 2003-11-27 Nick Clifton * config/tc-sh.c (sh_elf_cons): If md_cons_align is defined diff --git a/gas/read.c b/gas/read.c index fbc050f0943..186d28b70c9 100644 --- a/gas/read.c +++ b/gas/read.c @@ -214,29 +214,29 @@ static int dwarf_file_string; #endif #endif -static void cons_worker PARAMS ((int, int)); -static int scrub_from_string PARAMS ((char *, int)); -static void do_align PARAMS ((int, char *, int, int)); -static void s_align PARAMS ((int, int)); -static void s_lcomm_internal PARAMS ((int, int)); -static int hex_float PARAMS ((int, char *)); -static inline int sizeof_sleb128 PARAMS ((offsetT)); -static inline int sizeof_uleb128 PARAMS ((valueT)); -static inline int output_sleb128 PARAMS ((char *, offsetT)); -static inline int output_uleb128 PARAMS ((char *, valueT)); -static inline int output_big_sleb128 PARAMS ((char *, LITTLENUM_TYPE *, int)); -static inline int output_big_uleb128 PARAMS ((char *, LITTLENUM_TYPE *, int)); -static int output_big_leb128 PARAMS ((char *, LITTLENUM_TYPE *, int, int)); -static void do_org PARAMS ((segT, expressionS *, int)); -char *demand_copy_string PARAMS ((int *lenP)); -static segT get_segmented_expression PARAMS ((expressionS *expP)); -static segT get_known_segmented_expression PARAMS ((expressionS * expP)); -static void pobegin PARAMS ((void)); -static int get_line_sb PARAMS ((sb *)); -static void generate_file_debug PARAMS ((void)); +static void cons_worker (int, int); +static int scrub_from_string (char *, int); +static void do_align (int, char *, int, int); +static void s_align (int, int); +static void s_lcomm_internal (int, int); +static int hex_float (int, char *); +static inline int sizeof_sleb128 (offsetT); +static inline int sizeof_uleb128 (valueT); +static inline int output_sleb128 (char *, offsetT); +static inline int output_uleb128 (char *, valueT); +static inline int output_big_sleb128 (char *, LITTLENUM_TYPE *, int); +static inline int output_big_uleb128 (char *, LITTLENUM_TYPE *, int); +static int output_big_leb128 (char *, LITTLENUM_TYPE *, int, int); +static void do_org (segT, expressionS *, int); +char *demand_copy_string (int *lenP); +static segT get_segmented_expression (expressionS *expP); +static segT get_known_segmented_expression (expressionS * expP); +static void pobegin (void); +static int get_line_sb (sb *); +static void generate_file_debug (void); void -read_begin () +read_begin (void) { const char *p; @@ -430,8 +430,7 @@ static int pop_override_ok = 0; static const char *pop_table_name; void -pop_insert (table) - const pseudo_typeS *table; +pop_insert (const pseudo_typeS *table) { const char *errtxt; const pseudo_typeS *pop; @@ -457,7 +456,7 @@ pop_insert (table) #endif static void -pobegin () +pobegin (void) { po_hash = hash_new (); @@ -497,9 +496,7 @@ static char *scrub_string; static char *scrub_string_end; static int -scrub_from_string (buf, buflen) - char *buf; - int buflen; +scrub_from_string (char *buf, int buflen) { int copy; @@ -514,8 +511,7 @@ scrub_from_string (buf, buflen) /* We read the file, putting things into a web that represents what we have been reading. */ void -read_a_source_file (name) - char *name; +read_a_source_file (char *name) { register char c; register char *s; /* String of symbol, '\0' appended. */ @@ -1101,8 +1097,7 @@ read_a_source_file (name) for the m68k MRI assembler. */ char * -mri_comment_field (stopcp) - char *stopcp; +mri_comment_field (char *stopcp) { char *s; #ifdef TC_M68K @@ -1133,9 +1128,7 @@ mri_comment_field (stopcp) /* Skip to the end of an MRI comment field. */ void -mri_comment_end (stop, stopc) - char *stop; - int stopc; +mri_comment_end (char *stop, int stopc) { know (flag_mri); @@ -1146,8 +1139,7 @@ mri_comment_end (stop, stopc) } void -s_abort (ignore) - int ignore ATTRIBUTE_UNUSED; +s_abort (int ignore ATTRIBUTE_UNUSED) { as_fatal (_(".abort detected. Abandoning ship.")); } @@ -1159,11 +1151,7 @@ s_abort (ignore) or 0 if there is no maximum. */ static void -do_align (n, fill, len, max) - int n; - char *fill; - int len; - int max; +do_align (int n, char *fill, int len, int max) { if (now_seg == absolute_section) { @@ -1211,9 +1199,7 @@ do_align (n, fill, len, max) interpreted as the byte boundary, rather than the power of 2. */ static void -s_align (arg, bytes_p) - int arg; - int bytes_p; +s_align (int arg, int bytes_p) { register unsigned int align; char *stop = NULL; @@ -1328,8 +1314,7 @@ s_align (arg, bytes_p) align to a 4 byte boundary. */ void -s_align_bytes (arg) - int arg; +s_align_bytes (int arg) { s_align (arg, 1); } @@ -1338,15 +1323,13 @@ s_align_bytes (arg) to a 2**4 boundary. */ void -s_align_ptwo (arg) - int arg; +s_align_ptwo (int arg) { s_align (arg, 0); } void -s_comm (ignore) - int ignore ATTRIBUTE_UNUSED; +s_comm (int ignore ATTRIBUTE_UNUSED) { register char *name; register char c; @@ -1444,8 +1427,7 @@ s_comm (ignore) thing by increasing the size. */ void -s_mri_common (small) - int small ATTRIBUTE_UNUSED; +s_mri_common (int small ATTRIBUTE_UNUSED) { char *name; char c; @@ -1544,8 +1526,7 @@ s_mri_common (small) } void -s_data (ignore) - int ignore ATTRIBUTE_UNUSED; +s_data (int ignore ATTRIBUTE_UNUSED) { segT section; register int temp; @@ -1575,8 +1556,7 @@ s_data (ignore) .file. */ void -s_app_file_string (file) - char *file; +s_app_file_string (char *file) { #ifdef LISTING if (listing) @@ -1589,8 +1569,7 @@ s_app_file_string (file) } void -s_app_file (appfile) - int appfile; +s_app_file (int appfile) { register char *s; int length; @@ -1623,8 +1602,7 @@ s_app_file (appfile) pseudo-ops. */ void -s_app_line (ignore) - int ignore ATTRIBUTE_UNUSED; +s_app_line (int ignore ATTRIBUTE_UNUSED) { int l; @@ -1650,8 +1628,7 @@ s_app_line (ignore) read_a_source_file. */ void -s_end (ignore) - int ignore ATTRIBUTE_UNUSED; +s_end (int ignore ATTRIBUTE_UNUSED) { if (flag_mri) { @@ -1668,8 +1645,7 @@ s_end (ignore) /* Handle the .err pseudo-op. */ void -s_err (ignore) - int ignore ATTRIBUTE_UNUSED; +s_err (int ignore ATTRIBUTE_UNUSED) { as_bad (_(".err encountered")); demand_empty_rest_of_line (); @@ -1678,8 +1654,7 @@ s_err (ignore) /* Handle the MRI fail pseudo-op. */ void -s_fail (ignore) - int ignore ATTRIBUTE_UNUSED; +s_fail (int ignore ATTRIBUTE_UNUSED) { offsetT temp; char *stop = NULL; @@ -1701,8 +1676,7 @@ s_fail (ignore) } void -s_fill (ignore) - int ignore ATTRIBUTE_UNUSED; +s_fill (int ignore ATTRIBUTE_UNUSED) { expressionS rep_exp; long size = 1; @@ -1800,8 +1774,7 @@ s_fill (ignore) } void -s_globl (ignore) - int ignore ATTRIBUTE_UNUSED; +s_globl (int ignore ATTRIBUTE_UNUSED) { char *name; int c; @@ -1841,8 +1814,7 @@ s_globl (ignore) /* Handle the MRI IRP and IRPC pseudo-ops. */ void -s_irp (irpc) - int irpc; +s_irp (int irpc) { char *file; unsigned int line; @@ -1875,8 +1847,7 @@ s_irp (irpc) which is what to do about duplicates. */ void -s_linkonce (ignore) - int ignore ATTRIBUTE_UNUSED; +s_linkonce (int ignore ATTRIBUTE_UNUSED) { enum linkonce_type type; @@ -1947,13 +1918,13 @@ s_linkonce (ignore) } static void -s_lcomm_internal (needs_align, bytes_p) - /* 1 if this was a ".bss" directive, which may require a 3rd argument - (alignment); 0 if it was an ".lcomm" (2 args only). */ - int needs_align; - /* 1 if the alignment value should be interpreted as the byte boundary, - rather than the power of 2. */ - int bytes_p; +s_lcomm_internal (/* 1 if this was a ".bss" directive, which may + require a 3rd argument (alignment); 0 if it was + an ".lcomm" (2 args only). */ + int needs_align, + /* 1 if the alignment value should be interpreted as + the byte boundary, rather than the power of 2. */ + int bytes_p) { register char *name; register char c; @@ -2150,22 +2121,19 @@ s_lcomm_internal (needs_align, bytes_p) } void -s_lcomm (needs_align) - int needs_align; +s_lcomm (int needs_align) { s_lcomm_internal (needs_align, 0); } void -s_lcomm_bytes (needs_align) - int needs_align; +s_lcomm_bytes (int needs_align) { s_lcomm_internal (needs_align, 1); } void -s_lsym (ignore) - int ignore ATTRIBUTE_UNUSED; +s_lsym (int ignore ATTRIBUTE_UNUSED) { register char *name; register char c; @@ -2242,8 +2210,7 @@ s_lsym (ignore) or zero if there are no more lines. */ static int -get_line_sb (line) - sb *line; +get_line_sb (sb *line) { char quote1, quote2, inquote; unsigned char c; @@ -2302,8 +2269,7 @@ get_line_sb (line) /* Define a macro. This is an interface to macro.c. */ void -s_macro (ignore) - int ignore ATTRIBUTE_UNUSED; +s_macro (int ignore ATTRIBUTE_UNUSED) { char *file; unsigned int line; @@ -2350,8 +2316,7 @@ s_macro (ignore) expansion. */ void -s_mexit (ignore) - int ignore ATTRIBUTE_UNUSED; +s_mexit (int ignore ATTRIBUTE_UNUSED) { cond_exit_macro (macro_nest); buffer_limit = input_scrub_next_buffer (&input_line_pointer); @@ -2360,8 +2325,7 @@ s_mexit (ignore) /* Switch in and out of MRI mode. */ void -s_mri (ignore) - int ignore ATTRIBUTE_UNUSED; +s_mri (int ignore ATTRIBUTE_UNUSED) { int on, old_flag; @@ -2399,10 +2363,7 @@ s_mri (ignore) /* Handle changing the location counter. */ static void -do_org (segment, exp, fill) - segT segment; - expressionS *exp; - int fill; +do_org (segT segment, expressionS *exp, int fill) { if (segment != now_seg && segment != absolute_section) as_bad (_("invalid segment \"%s\""), segment_name (segment)); @@ -2437,8 +2398,7 @@ do_org (segment, exp, fill) } void -s_org (ignore) - int ignore ATTRIBUTE_UNUSED; +s_org (int ignore ATTRIBUTE_UNUSED) { register segT segment; expressionS exp; @@ -2493,8 +2453,7 @@ s_org (ignore) flags will be set in the section. */ void -s_mri_sect (type) - char *type ATTRIBUTE_UNUSED; +s_mri_sect (char *type ATTRIBUTE_UNUSED) { #ifdef TC_M68K @@ -2658,8 +2617,7 @@ s_mri_sect (type) /* Handle the .print pseudo-op. */ void -s_print (ignore) - int ignore ATTRIBUTE_UNUSED; +s_print (int ignore ATTRIBUTE_UNUSED) { char *s; int len; @@ -2673,8 +2631,7 @@ s_print (ignore) /* Handle the .purgem pseudo-op. */ void -s_purgem (ignore) - int ignore ATTRIBUTE_UNUSED; +s_purgem (int ignore ATTRIBUTE_UNUSED) { if (is_it_end_of_statement ()) { @@ -2703,8 +2660,7 @@ s_purgem (ignore) /* Handle the .rept pseudo-op. */ void -s_bad_endr (ignore) - int ignore ATTRIBUTE_UNUSED; +s_bad_endr (int ignore ATTRIBUTE_UNUSED) { as_warn (_(".endr encountered without preceeding .rept, .irc, or .irp")); demand_empty_rest_of_line (); @@ -2713,8 +2669,7 @@ s_bad_endr (ignore) /* Handle the .rept pseudo-op. */ void -s_rept (ignore) - int ignore ATTRIBUTE_UNUSED; +s_rept (int ignore ATTRIBUTE_UNUSED) { int count; @@ -2727,10 +2682,7 @@ s_rept (ignore) different directives to be used as the start/end keys. */ void -do_repeat (count, start, end) - int count; - const char *start; - const char *end; +do_repeat (int count, const char *start, const char *end) { sb one; sb many; @@ -2762,8 +2714,7 @@ do_repeat (count, start, end) such as line substitutions. */ void -end_repeat (extra) - int extra; +end_repeat (int extra) { cond_exit_macro (macro_nest); while (extra-- >= 0) @@ -2775,8 +2726,7 @@ end_repeat (extra) defined. */ void -s_set (equiv) - int equiv; +s_set (int equiv) { register char *name; register char delim; @@ -2868,8 +2818,7 @@ s_set (equiv) } void -s_space (mult) - int mult; +s_space (int mult) { expressionS exp; expressionS val; @@ -3041,8 +2990,7 @@ s_space (mult) friends. */ void -s_float_space (float_type) - int float_type; +s_float_space (int float_type) { offsetT count; int flen; @@ -3122,8 +3070,7 @@ s_float_space (float_type) /* Handle the .struct pseudo-op, as found in MIPS assemblers. */ void -s_struct (ignore) - int ignore ATTRIBUTE_UNUSED; +s_struct (int ignore ATTRIBUTE_UNUSED) { char *stop = NULL; char stopc; @@ -3138,8 +3085,7 @@ s_struct (ignore) } void -s_text (ignore) - int ignore ATTRIBUTE_UNUSED; +s_text (int ignore ATTRIBUTE_UNUSED) { register int temp; @@ -3152,7 +3098,7 @@ s_text (ignore) } void -demand_empty_rest_of_line () +demand_empty_rest_of_line (void) { SKIP_WHITESPACE (); if (is_end_of_line[(unsigned char) *input_line_pointer]) @@ -3164,7 +3110,7 @@ demand_empty_rest_of_line () } void -ignore_rest_of_line () +ignore_rest_of_line (void) { /* For suspect lines: gives warning. */ if (!is_end_of_line[(unsigned char) *input_line_pointer]) @@ -3188,7 +3134,7 @@ ignore_rest_of_line () } void -discard_rest_of_line () +discard_rest_of_line (void) { while (input_line_pointer < buffer_limit && !is_end_of_line[(unsigned char) *input_line_pointer]) @@ -3208,8 +3154,7 @@ discard_rest_of_line () Will change symbols type, value, and frag; */ void -pseudo_set (symbolP) - symbolS *symbolP; +pseudo_set (symbolS *symbolP) { expressionS exp; #if (defined (OBJ_AOUT) || defined (OBJ_BOUT)) && ! defined (BFD_ASSEMBLER) @@ -3327,19 +3272,19 @@ pseudo_set (symbolP) #ifdef TC_M68K static void -parse_mri_cons PARAMS ((expressionS *exp, unsigned int nbytes)); +parse_mri_cons (expressionS *exp, unsigned int nbytes); #endif #ifndef TC_PARSE_CONS_EXPRESSION #ifdef BITFIELD_CONS_EXPRESSIONS #define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES) parse_bitfield_cons (EXP, NBYTES) static void -parse_bitfield_cons PARAMS ((expressionS *exp, unsigned int nbytes)); +parse_bitfield_cons (expressionS *exp, unsigned int nbytes); #endif #ifdef REPEAT_CONS_EXPRESSIONS #define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES) parse_repeat_cons (EXP, NBYTES) static void -parse_repeat_cons PARAMS ((expressionS *exp, unsigned int nbytes)); +parse_repeat_cons (expressionS *exp, unsigned int nbytes); #endif /* If we haven't gotten one yet, just call expression. */ @@ -3360,9 +3305,8 @@ do_parse_cons_expression (expressionS *exp, Clobbers input_line_pointer and checks end-of-line. */ static void -cons_worker (nbytes, rva) - register int nbytes; /* 1=.byte, 2=.word, 4=.long. */ - int rva; +cons_worker (register int nbytes, /* 1=.byte, 2=.word, 4=.long. */ + int rva) { int c; expressionS exp; @@ -3425,15 +3369,13 @@ cons_worker (nbytes, rva) } void -cons (size) - int size; +cons (int size) { cons_worker (size, 0); } void -s_rva (size) - int size; +s_rva (int size) { cons_worker (size, 1); } @@ -3442,9 +3384,7 @@ s_rva (size) NBYTES bytes. If need_pass_2 is 1, this does nothing. */ void -emit_expr (exp, nbytes) - expressionS *exp; - unsigned int nbytes; +emit_expr (expressionS *exp, unsigned int nbytes) { operatorT op; register char *p; @@ -4034,9 +3974,7 @@ parse_repeat_cons (exp, nbytes) point number. */ static int -hex_float (float_type, bytes) - int float_type; - char *bytes; +hex_float (int float_type, char *bytes) { int length; int i; @@ -4138,9 +4076,8 @@ hex_float (float_type, bytes) In: input_line_pointer->whitespace before, or '0' of flonum. */ void -float_cons (float_type) - /* Clobbers input_line-pointer, checks end-of-line. */ - register int float_type; /* 'f':.ffloat ... 'F':.float ... */ +float_cons (/* Clobbers input_line-pointer, checks end-of-line. */ + register int float_type /* 'f':.ffloat ... 'F':.float ... */) { register char *p; int length; /* Number of chars in an object. */ @@ -4235,8 +4172,7 @@ float_cons (float_type) /* Return the size of a LEB128 value. */ static inline int -sizeof_sleb128 (value) - offsetT value; +sizeof_sleb128 (offsetT value) { register int size = 0; register unsigned byte; @@ -4257,8 +4193,7 @@ sizeof_sleb128 (value) } static inline int -sizeof_uleb128 (value) - valueT value; +sizeof_uleb128 (valueT value) { register int size = 0; register unsigned byte; @@ -4275,9 +4210,7 @@ sizeof_uleb128 (value) } int -sizeof_leb128 (value, sign) - valueT value; - int sign; +sizeof_leb128 (valueT value, int sign) { if (sign) return sizeof_sleb128 ((offsetT) value); @@ -4288,9 +4221,7 @@ sizeof_leb128 (value, sign) /* Output a LEB128 value. */ static inline int -output_sleb128 (p, value) - char *p; - offsetT value; +output_sleb128 (char *p, offsetT value) { register char *orig = p; register int more; @@ -4317,9 +4248,7 @@ output_sleb128 (p, value) } static inline int -output_uleb128 (p, value) - char *p; - valueT value; +output_uleb128 (char *p, valueT value) { char *orig = p; @@ -4339,10 +4268,7 @@ output_uleb128 (p, value) } int -output_leb128 (p, value, sign) - char *p; - valueT value; - int sign; +output_leb128 (char *p, valueT value, int sign) { if (sign) return output_sleb128 (p, (offsetT) value); @@ -4355,10 +4281,7 @@ output_leb128 (p, value, sign) for "normal" values that this be streamlined. */ static inline int -output_big_sleb128 (p, bignum, size) - char *p; - LITTLENUM_TYPE *bignum; - int size; +output_big_sleb128 (char *p, LITTLENUM_TYPE *bignum, int size) { char *orig = p; valueT val = 0; @@ -4401,10 +4324,7 @@ output_big_sleb128 (p, bignum, size) } static inline int -output_big_uleb128 (p, bignum, size) - char *p; - LITTLENUM_TYPE *bignum; - int size; +output_big_uleb128 (char *p, LITTLENUM_TYPE *bignum, int size) { char *orig = p; valueT val = 0; @@ -4443,10 +4363,7 @@ output_big_uleb128 (p, bignum, size) } static int -output_big_leb128 (p, bignum, size, sign) - char *p; - LITTLENUM_TYPE *bignum; - int size, sign; +output_big_leb128 (char *p, LITTLENUM_TYPE *bignum, int size, int sign) { if (sign) return output_big_sleb128 (p, bignum, size); @@ -4458,9 +4375,7 @@ output_big_leb128 (p, bignum, size, sign) leb128 value. */ void -emit_leb128_expr (exp, sign) - expressionS *exp; - int sign; +emit_leb128_expr (expressionS *exp, int sign) { operatorT op = exp->X_op; int nbytes; @@ -4530,8 +4445,7 @@ emit_leb128_expr (exp, sign) /* Parse the .sleb128 and .uleb128 pseudos. */ void -s_leb128 (sign) - int sign; +s_leb128 (int sign) { expressionS exp; @@ -4551,9 +4465,9 @@ s_leb128 (sign) check it. */ void -stringer (append_zero) /* Worker to do .ascii etc statements. */ - /* Checks end-of-line. */ - register int append_zero; /* 0: don't append '\0', else 1. */ +stringer (/* Worker to do .ascii etc statements. */ + /* Checks end-of-line. */ + register int append_zero /* 0: don't append '\0', else 1. */) { register unsigned int c; char *start; @@ -4651,7 +4565,7 @@ stringer (append_zero) /* Worker to do .ascii etc statements. */ returning values bigger than 1 byte. xoxorich. */ unsigned int -next_char_of_string () +next_char_of_string (void) { register unsigned int c; @@ -4773,8 +4687,7 @@ next_char_of_string () } static segT -get_segmented_expression (expP) - register expressionS *expP; +get_segmented_expression (register expressionS *expP) { register segT retval; @@ -4792,8 +4705,7 @@ get_segmented_expression (expP) } static segT -get_known_segmented_expression (expP) - register expressionS *expP; +get_known_segmented_expression (register expressionS *expP) { register segT retval; @@ -4816,8 +4728,7 @@ get_known_segmented_expression (expP) } offsetT -get_absolute_expr (exp) - expressionS *exp; +get_absolute_expr (expressionS *exp) { expression (exp); if (exp->X_op != O_constant) @@ -4830,7 +4741,7 @@ get_absolute_expr (exp) } offsetT -get_absolute_expression () +get_absolute_expression (void) { expressionS exp; @@ -4838,8 +4749,7 @@ get_absolute_expression () } char /* Return terminator. */ -get_absolute_expression_and_terminator (val_pointer) - long *val_pointer; /* Return value of expression. */ +get_absolute_expression_and_terminator (long *val_pointer /* Return value of expression. */) { /* FIXME: val_pointer should probably be offsetT *. */ *val_pointer = (long) get_absolute_expression (); @@ -4850,8 +4760,7 @@ get_absolute_expression_and_terminator (val_pointer) Give a warning if that happens. */ char * -demand_copy_C_string (len_pointer) - int *len_pointer; +demand_copy_C_string (int *len_pointer) { register char *s; @@ -4878,8 +4787,7 @@ demand_copy_C_string (len_pointer) Return NULL if we can't read a string here. */ char * -demand_copy_string (lenP) - int *lenP; +demand_copy_string (int *lenP) { register unsigned int c; register int len; @@ -4918,16 +4826,14 @@ demand_copy_string (lenP) Out: 1 if input_line_pointer->end-of-line. */ int -is_it_end_of_statement () +is_it_end_of_statement (void) { SKIP_WHITESPACE (); return (is_end_of_line[(unsigned char) *input_line_pointer]); } void -equals (sym_name, reassign) - char *sym_name; - int reassign; +equals (char *sym_name, int reassign) { register symbolS *symbolP; /* Symbol we are working with. */ char *stop = NULL; @@ -4989,8 +4895,7 @@ equals (sym_name, reassign) /* .incbin -- include a file verbatim at the current location. */ void -s_incbin (x) - int x ATTRIBUTE_UNUSED; +s_incbin (int x ATTRIBUTE_UNUSED) { FILE * binfile; char * path; @@ -5106,8 +5011,7 @@ done: /* .include -- include a file at this point. */ void -s_include (arg) - int arg ATTRIBUTE_UNUSED; +s_include (int arg ATTRIBUTE_UNUSED) { char *filename; int i; @@ -5167,8 +5071,7 @@ gotit: } void -add_include_dir (path) - char *path; +add_include_dir (char *path) { int i; @@ -5196,7 +5099,7 @@ add_include_dir (path) /* Output debugging information to denote the source file. */ static void -generate_file_debug () +generate_file_debug (void) { if (debug_type == DEBUG_STABS) stabs_generate_asm_file (); @@ -5205,7 +5108,7 @@ generate_file_debug () /* Output line number debugging information for the current source line. */ void -generate_lineno_debug () +generate_lineno_debug (void) { switch (debug_type) { @@ -5232,8 +5135,7 @@ generate_lineno_debug () END_P is zero for .func, and non-zero for .endfunc. */ void -s_func (end_p) - int end_p; +s_func (int end_p) { do_s_func (end_p, NULL); } @@ -5242,9 +5144,7 @@ s_func (end_p) If DEFAULT_PREFIX is NULL, use the target's "leading char". */ void -do_s_func (end_p, default_prefix) - int end_p; - const char *default_prefix; +do_s_func (int end_p, const char *default_prefix) { /* Record the current function so that we can issue an error message for misplaced .func,.endfunc, and also so that .endfunc needs no @@ -5322,8 +5222,7 @@ do_s_func (end_p, default_prefix) } void -s_ignore (arg) - int arg ATTRIBUTE_UNUSED; +s_ignore (int arg ATTRIBUTE_UNUSED) { while (!is_end_of_line[(unsigned char) *input_line_pointer]) { @@ -5333,8 +5232,7 @@ s_ignore (arg) } void -read_print_statistics (file) - FILE *file; +read_print_statistics (FILE *file) { hash_print_statistics (file, "pseudo-op table", po_hash); } @@ -5349,8 +5247,7 @@ read_print_statistics (file) properly scrubbed. */ void -input_scrub_insert_line (line) - const char *line; +input_scrub_insert_line (const char *line) { sb newline; sb_new (&newline); @@ -5364,8 +5261,7 @@ input_scrub_insert_line (line) file; no include path searching or dependency registering is performed. */ void -input_scrub_insert_file (path) - char *path; +input_scrub_insert_file (char *path) { input_scrub_include_file (path, input_line_pointer); buffer_limit = input_scrub_next_buffer (&input_line_pointer); diff --git a/gas/read.h b/gas/read.h index 5a33c703cd0..9c0959901c6 100644 --- a/gas/read.h +++ b/gas/read.h @@ -58,7 +58,7 @@ extern char *input_line_pointer; /* -> char we are parsing now. */ extern char lex_type[]; extern char is_end_of_line[]; -extern int is_it_end_of_statement PARAMS ((void)); +extern int is_it_end_of_statement (void); extern int target_big_endian; @@ -98,92 +98,91 @@ enum linkonce_type { extern char original_case_string[]; #endif -extern void pop_insert PARAMS ((const pseudo_typeS *)); +extern void pop_insert (const pseudo_typeS *); extern unsigned int get_stab_string_offset - PARAMS ((const char *string, const char *stabstr_secname)); -extern void aout_process_stab PARAMS ((int, const char *, int, int, int)); -extern char *demand_copy_string PARAMS ((int *lenP)); -extern char *demand_copy_C_string PARAMS ((int *len_pointer)); -extern char get_absolute_expression_and_terminator - PARAMS ((long *val_pointer)); -extern offsetT get_absolute_expr PARAMS ((expressionS *)); -extern offsetT get_absolute_expression PARAMS ((void)); -extern unsigned int next_char_of_string PARAMS ((void)); -extern void s_mri_sect PARAMS ((char *)); -extern char *mri_comment_field PARAMS ((char *)); -extern void mri_comment_end PARAMS ((char *, int)); -extern void add_include_dir PARAMS ((char *path)); -extern void cons PARAMS ((int nbytes)); -extern void demand_empty_rest_of_line PARAMS ((void)); -extern void emit_expr PARAMS ((expressionS *exp, unsigned int nbytes)); -extern void emit_leb128_expr PARAMS ((expressionS *, int)); -extern void equals PARAMS ((char *sym_name, int reassign)); -extern void float_cons PARAMS ((int float_type)); -extern void ignore_rest_of_line PARAMS ((void)); -extern void discard_rest_of_line PARAMS ((void)); -extern int output_leb128 PARAMS ((char *, valueT, int sign)); -extern void pseudo_set PARAMS ((symbolS * symbolP)); -extern void read_a_source_file PARAMS ((char *name)); -extern void read_begin PARAMS ((void)); -extern void read_print_statistics PARAMS ((FILE *)); -extern int sizeof_leb128 PARAMS ((valueT, int sign)); -extern void stabs_generate_asm_file PARAMS ((void)); -extern void stabs_generate_asm_lineno PARAMS ((void)); -extern void stabs_generate_asm_func PARAMS ((const char *, const char *)); -extern void stabs_generate_asm_endfunc PARAMS ((const char *, const char *)); -extern void do_repeat PARAMS((int,const char *,const char *)); -extern void end_repeat PARAMS((int)); -extern void do_parse_cons_expression PARAMS ((expressionS *, int)); - -extern void generate_lineno_debug PARAMS ((void)); - -extern void s_abort PARAMS ((int)) ATTRIBUTE_NORETURN; -extern void s_align_bytes PARAMS ((int arg)); -extern void s_align_ptwo PARAMS ((int)); -extern void s_app_file_string PARAMS ((char *)); -extern void s_app_file PARAMS ((int)); -extern void s_app_line PARAMS ((int)); -extern void s_bad_endr PARAMS ((int)); -extern void s_comm PARAMS ((int)); -extern void s_data PARAMS ((int)); -extern void s_desc PARAMS ((int)); -extern void s_else PARAMS ((int arg)); -extern void s_elseif PARAMS ((int arg)); -extern void s_end PARAMS ((int arg)); -extern void s_endif PARAMS ((int arg)); -extern void s_err PARAMS ((int)); -extern void s_fail PARAMS ((int)); -extern void s_fill PARAMS ((int)); -extern void s_float_space PARAMS ((int mult)); -extern void s_func PARAMS ((int)); -extern void do_s_func PARAMS ((int, const char *)); -extern void s_globl PARAMS ((int arg)); -extern void s_if PARAMS ((int arg)); -extern void s_ifc PARAMS ((int arg)); -extern void s_ifdef PARAMS ((int arg)); -extern void s_ifeqs PARAMS ((int arg)); -extern void s_ignore PARAMS ((int arg)); -extern void s_include PARAMS ((int arg)); -extern void s_irp PARAMS ((int arg)); -extern void s_lcomm PARAMS ((int needs_align)); -extern void s_lcomm_bytes PARAMS ((int needs_align)); -extern void s_leb128 PARAMS ((int sign)); -extern void s_linkonce PARAMS ((int)); -extern void s_lsym PARAMS ((int)); -extern void s_macro PARAMS ((int)); -extern void s_mexit PARAMS ((int)); -extern void s_mri PARAMS ((int)); -extern void s_mri_common PARAMS ((int)); -extern void s_org PARAMS ((int)); -extern void s_print PARAMS ((int)); -extern void s_purgem PARAMS ((int)); -extern void s_rept PARAMS ((int)); -extern void s_set PARAMS ((int)); -extern void s_space PARAMS ((int mult)); -extern void s_stab PARAMS ((int what)); -extern void s_struct PARAMS ((int)); -extern void s_text PARAMS ((int)); -extern void stringer PARAMS ((int append_zero)); -extern void s_xstab PARAMS ((int what)); -extern void s_rva PARAMS ((int)); -extern void s_incbin PARAMS ((int)); + (const char *string, const char *stabstr_secname); +extern void aout_process_stab (int, const char *, int, int, int); +extern char *demand_copy_string (int *lenP); +extern char *demand_copy_C_string (int *len_pointer); +extern char get_absolute_expression_and_terminator (long *val_pointer); +extern offsetT get_absolute_expr (expressionS *); +extern offsetT get_absolute_expression (void); +extern unsigned int next_char_of_string (void); +extern void s_mri_sect (char *); +extern char *mri_comment_field (char *); +extern void mri_comment_end (char *, int); +extern void add_include_dir (char *path); +extern void cons (int nbytes); +extern void demand_empty_rest_of_line (void); +extern void emit_expr (expressionS *exp, unsigned int nbytes); +extern void emit_leb128_expr (expressionS *, int); +extern void equals (char *sym_name, int reassign); +extern void float_cons (int float_type); +extern void ignore_rest_of_line (void); +extern void discard_rest_of_line (void); +extern int output_leb128 (char *, valueT, int sign); +extern void pseudo_set (symbolS * symbolP); +extern void read_a_source_file (char *name); +extern void read_begin (void); +extern void read_print_statistics (FILE *); +extern int sizeof_leb128 (valueT, int sign); +extern void stabs_generate_asm_file (void); +extern void stabs_generate_asm_lineno (void); +extern void stabs_generate_asm_func (const char *, const char *); +extern void stabs_generate_asm_endfunc (const char *, const char *); +extern void do_repeat (int,const char *,const char *); +extern void end_repeat (int); +extern void do_parse_cons_expression (expressionS *, int); + +extern void generate_lineno_debug (void); + +extern void s_abort (int) ATTRIBUTE_NORETURN; +extern void s_align_bytes (int arg); +extern void s_align_ptwo (int); +extern void s_app_file_string (char *); +extern void s_app_file (int); +extern void s_app_line (int); +extern void s_bad_endr (int); +extern void s_comm (int); +extern void s_data (int); +extern void s_desc (int); +extern void s_else (int arg); +extern void s_elseif (int arg); +extern void s_end (int arg); +extern void s_endif (int arg); +extern void s_err (int); +extern void s_fail (int); +extern void s_fill (int); +extern void s_float_space (int mult); +extern void s_func (int); +extern void do_s_func (int, const char *); +extern void s_globl (int arg); +extern void s_if (int arg); +extern void s_ifc (int arg); +extern void s_ifdef (int arg); +extern void s_ifeqs (int arg); +extern void s_ignore (int arg); +extern void s_include (int arg); +extern void s_irp (int arg); +extern void s_lcomm (int needs_align); +extern void s_lcomm_bytes (int needs_align); +extern void s_leb128 (int sign); +extern void s_linkonce (int); +extern void s_lsym (int); +extern void s_macro (int); +extern void s_mexit (int); +extern void s_mri (int); +extern void s_mri_common (int); +extern void s_org (int); +extern void s_print (int); +extern void s_purgem (int); +extern void s_rept (int); +extern void s_set (int); +extern void s_space (int mult); +extern void s_stab (int what); +extern void s_struct (int); +extern void s_text (int); +extern void stringer (int append_zero); +extern void s_xstab (int what); +extern void s_rva (int); +extern void s_incbin (int);