From 814f6641275e048cfcd064058c8074d14865584a Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Tue, 28 Nov 2000 21:29:02 +0000 Subject: [PATCH] 2000-11-27 Kazu Hirata * config/obj-aout.h: Fix formatting. * config/obj-bout.h: Likewise. * config/obj-coff.c: Likewise. * config/obj-coff.h: Likewise. * config/obj-elf.h: Likewise. * config/obj-som.h: Likewise. * config/obj-vms.c: Likewise. * config/obj-vms.h: Likewise. * config/tc-h8300.h: Likewise. * config/tc-ns32k.h: Likewise. * config/tc-sparc.h: Likewise. * config/tc-tic54x.h: Likewise. * config/tc-z8k.h: Likewise. --- gas/ChangeLog | 16 ++++++++++++++++ gas/config/obj-aout.h | 2 +- gas/config/obj-bout.h | 10 +++++----- gas/config/obj-coff.c | 6 +++--- gas/config/obj-coff.h | 28 ++++++++++++++-------------- gas/config/obj-elf.h | 4 ++-- gas/config/obj-som.h | 2 +- gas/config/obj-vms.c | 12 ++++++------ gas/config/obj-vms.h | 6 +++--- gas/config/tc-h8300.h | 2 +- gas/config/tc-ns32k.h | 8 ++++---- gas/config/tc-sparc.h | 6 +++--- gas/config/tc-tic54x.h | 2 +- gas/config/tc-z8k.h | 2 +- 14 files changed, 61 insertions(+), 45 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index a5231f53c4e..c8c9051ded8 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,19 @@ +2000-11-28 Kazu Hirata + + * config/obj-aout.h: Fix formatting. + * config/obj-bout.h: Likewise. + * config/obj-coff.c: Likewise. + * config/obj-coff.h: Likewise. + * config/obj-elf.h: Likewise. + * config/obj-som.h: Likewise. + * config/obj-vms.c: Likewise. + * config/obj-vms.h: Likewise. + * config/tc-h8300.h: Likewise. + * config/tc-ns32k.h: Likewise. + * config/tc-sparc.h: Likewise. + * config/tc-tic54x.h: Likewise. + * config/tc-z8k.h: Likewise. + 2000-11-28 Nick Clifton * doc/as.1 (COPYING): Mention that the GNU Free Documentation diff --git a/gas/config/obj-aout.h b/gas/config/obj-aout.h index a5a7a36b633..d91cc484af6 100644 --- a/gas/config/obj-aout.h +++ b/gas/config/obj-aout.h @@ -229,7 +229,7 @@ extern void obj_aout_frob_file PARAMS ((void)); typedef struct { struct exec header; /* a.out header */ - long string_table_size; /* names + '\0' + sizeof(int) */ + long string_table_size; /* names + '\0' + sizeof (int) */ } object_headers; diff --git a/gas/config/obj-bout.h b/gas/config/obj-bout.h index 52ecdbe2cbc..4359e7014ef 100644 --- a/gas/config/obj-bout.h +++ b/gas/config/obj-bout.h @@ -107,7 +107,7 @@ struct exec }; #define N_BADMAG(x) (((x).a_magic)!=BMAGIC) -#define N_TXTOFF(x) ( sizeof(struct exec) ) +#define N_TXTOFF(x) ( sizeof (struct exec) ) #define N_DATOFF(x) ( N_TXTOFF(x) + (x).a_text ) #define N_TROFF(x) ( N_DATOFF(x) + (x).a_data ) #define N_DROFF(x) ( N_TROFF(x) + (x).a_trsize ) @@ -239,14 +239,14 @@ struct relocation_info /* File header macro and type definition */ -#define H_GET_FILE_SIZE(h) (sizeof(struct exec) + \ +#define H_GET_FILE_SIZE(h) (sizeof (struct exec) + \ H_GET_TEXT_SIZE(h) + H_GET_DATA_SIZE(h) + \ H_GET_SYMBOL_TABLE_SIZE(h) + \ H_GET_TEXT_RELOCATION_SIZE(h) + \ H_GET_DATA_RELOCATION_SIZE(h) + \ (h)->string_table_size) -#define H_GET_HEADER_SIZE(h) (sizeof(struct exec)) +#define H_GET_HEADER_SIZE(h) (sizeof (struct exec)) #define H_GET_TEXT_SIZE(h) ((h)->header.a_text) #define H_GET_DATA_SIZE(h) ((h)->header.a_data) #define H_GET_BSS_SIZE(h) ((h)->header.a_bss) @@ -275,7 +275,7 @@ struct relocation_info #define H_SET_TEXT_RELOCATION_SIZE(h,v) ((h)->header.a_trsize = (v)) #define H_SET_DATA_RELOCATION_SIZE(h,v) ((h)->header.a_drsize = (v)) #define H_SET_SYMBOL_TABLE_SIZE(h,v) ((h)->header.a_syms = (v) * \ - sizeof(struct nlist)) + sizeof (struct nlist)) #define H_SET_MAGIC_NUMBER(h,v) ((h)->header.a_magic = (v)) @@ -291,7 +291,7 @@ struct relocation_info typedef struct { struct exec header; /* a.out header */ - long string_table_size; /* names + '\0' + sizeof(int) */ + long string_table_size; /* names + '\0' + sizeof (int) */ } object_headers; diff --git a/gas/config/obj-coff.c b/gas/config/obj-coff.c index e66f17b842c..80c4b6ee4de 100644 --- a/gas/config/obj-coff.c +++ b/gas/config/obj-coff.c @@ -248,7 +248,7 @@ obj_coff_weak (ignore) static void SA_SET_SYM_TAGNDX PARAMS ((symbolS *, symbolS *)); #define GET_FILENAME_STRING(X) \ -((char*)(&((X)->sy_symbol.ost_auxent->x_file.x_n.x_offset))[1]) +((char*) (&((X)->sy_symbol.ost_auxent->x_file.x_n.x_offset))[1]) /* @@ Ick. */ static segT @@ -1474,7 +1474,7 @@ obj_coff_section (ignore) /* Add SEC_LINK_ONCE and SEC_LINK_DUPLICATES_DISCARD to .gnu.linkonce sections so adjust_reloc_syms in write.c will correctly handle relocs which refer to non-local symbols in these sections. */ - if (strncmp (name, ".gnu.linkonce", sizeof(".gnu.linkonce") - 1) == 0) + if (strncmp (name, ".gnu.linkonce", sizeof (".gnu.linkonce") - 1) == 0) flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD; #endif @@ -1626,7 +1626,7 @@ symbol_dump () for (symbolP = symbol_rootP; symbolP; symbolP = symbol_next (symbolP)) { - printf(_("0x%lx: \"%s\" type = %ld, class = %d, segment = %d\n"), + printf (_("0x%lx: \"%s\" type = %ld, class = %d, segment = %d\n"), (unsigned long) symbolP, S_GET_NAME(symbolP), (long) S_GET_DATA_TYPE(symbolP), diff --git a/gas/config/obj-coff.h b/gas/config/obj-coff.h index 6110045b88c..8cf7999d862 100644 --- a/gas/config/obj-coff.h +++ b/gas/config/obj-coff.h @@ -346,7 +346,7 @@ extern void SA_SET_SYM_ENDNDX PARAMS ((symbolS *, symbolS *)); /* Modifiers */ #define SF_SET(s,v) (SF_GET (s) = (v)) -#define SF_SET_NORMAL_FIELD(s,v)(SF_GET (s) |= ((v) & SF_NORMAL_MASK)) +#define SF_SET_NORMAL_FIELD(s,v) (SF_GET (s) |= ((v) & SF_NORMAL_MASK)) #define SF_SET_DEBUG_FIELD(s,v) (SF_GET (s) |= ((v) & SF_DEBUG_MASK)) #define SF_SET_FILE(s) (SF_GET (s) |= SF_FILE) #define SF_SET_STATICS(s) (SF_GET (s) |= SF_STATICS) @@ -520,7 +520,7 @@ typedef struct /* Accessors */ /* The name of the symbol */ -#define S_GET_NAME(s) ((char*)(s)->sy_symbol.ost_entry.n_offset) +#define S_GET_NAME(s) ((char*) (s)->sy_symbol.ost_entry.n_offset) /* The pointer to the string table */ #define S_GET_OFFSET(s) ((s)->sy_symbol.ost_entry.n_offset) /* The numeric value of the segment */ @@ -534,7 +534,7 @@ typedef struct /* Modifiers */ /* Set the name of the symbol */ -#define S_SET_NAME(s,v) ((s)->sy_symbol.ost_entry.n_offset = (unsigned long)(v)) +#define S_SET_NAME(s,v) ((s)->sy_symbol.ost_entry.n_offset = (unsigned long) (v)) /* Set the offset of the symbol */ #define S_SET_OFFSET(s,v) ((s)->sy_symbol.ost_entry.n_offset = (v)) /* The numeric value of the segment */ @@ -642,7 +642,7 @@ typedef struct /* Modifiers */ #define SF_SET(s,v) (SF_GET (s) = (v)) -#define SF_SET_NORMAL_FIELD(s,v)(SF_GET (s) |= ((v) & SF_NORMAL_MASK)) +#define SF_SET_NORMAL_FIELD(s,v) (SF_GET (s) |= ((v) & SF_NORMAL_MASK)) #define SF_SET_DEBUG_FIELD(s,v) (SF_GET (s) |= ((v) & SF_DEBUG_MASK)) #define SF_SET_FILE(s) (SF_GET (s) |= SF_FILE) #define SF_SET_STATICS(s) (SF_GET (s) |= SF_STATICS) @@ -677,31 +677,31 @@ typedef struct #endif /* OBJ_COFF_OMIT_OPTIONAL_HEADER */ #define H_GET_FILE_SIZE(h) \ - (long)(FILHSZ + OBJ_COFF_AOUTHDRSZ + \ + (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \ H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ + \ H_GET_TEXT_SIZE(h) + H_GET_DATA_SIZE(h) + \ H_GET_RELOCATION_SIZE(h) + H_GET_LINENO_SIZE(h) + \ H_GET_SYMBOL_TABLE_SIZE(h) + \ (h)->string_table_size) #define H_GET_TEXT_FILE_OFFSET(h) \ - (long)(FILHSZ + OBJ_COFF_AOUTHDRSZ + \ + (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \ H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ) #define H_GET_DATA_FILE_OFFSET(h) \ - (long)(FILHSZ + OBJ_COFF_AOUTHDRSZ + \ + (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \ H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ + \ H_GET_TEXT_SIZE(h)) #define H_GET_BSS_FILE_OFFSET(h) 0 #define H_GET_RELOCATION_FILE_OFFSET(h) \ - (long)(FILHSZ + OBJ_COFF_AOUTHDRSZ + \ + (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \ H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ + \ H_GET_TEXT_SIZE(h) + H_GET_DATA_SIZE(h)) #define H_GET_LINENO_FILE_OFFSET(h) \ - (long)(FILHSZ + OBJ_COFF_AOUTHDRSZ + \ + (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \ H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ + \ H_GET_TEXT_SIZE(h) + H_GET_DATA_SIZE(h) + \ H_GET_RELOCATION_SIZE(h)) #define H_GET_SYMBOL_TABLE_FILE_OFFSET(h) \ - (long)(FILHSZ + OBJ_COFF_AOUTHDRSZ + \ + (long) (FILHSZ + OBJ_COFF_AOUTHDRSZ + \ H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ + \ H_GET_TEXT_SIZE(h) + H_GET_DATA_SIZE(h) + \ H_GET_RELOCATION_SIZE(h) + H_GET_LINENO_SIZE(h)) @@ -731,11 +731,11 @@ typedef struct #define H_GET_LINENO_SIZE(h) ((h)->lineno_size) #ifndef OBJ_COFF_OMIT_OPTIONAL_HEADER -#define H_GET_HEADER_SIZE(h) (sizeof(FILHDR) \ - + sizeof(AOUTHDR)\ +#define H_GET_HEADER_SIZE(h) (sizeof (FILHDR) \ + + sizeof (AOUTHDR)\ + (H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ)) #else /* OBJ_COFF_OMIT_OPTIONAL_HEADER */ -#define H_GET_HEADER_SIZE(h) (sizeof(FILHDR) \ +#define H_GET_HEADER_SIZE(h) (sizeof (FILHDR) \ + (H_GET_NUMBER_OF_SECTIONS(h) * SCNHSZ)) #endif /* OBJ_COFF_OMIT_OPTIONAL_HEADER */ @@ -771,7 +771,7 @@ typedef struct { struct internal_aouthdr aouthdr; /* a.out header */ struct internal_filehdr filehdr; /* File header, not machine dep. */ - long string_table_size; /* names + '\0' + sizeof(int) */ + long string_table_size; /* names + '\0' + sizeof (int) */ long relocation_size; /* Cumulated size of relocation information for all sections in bytes. */ diff --git a/gas/config/obj-elf.h b/gas/config/obj-elf.h index 42d5b499b68..ce93be59c08 100644 --- a/gas/config/obj-elf.h +++ b/gas/config/obj-elf.h @@ -96,7 +96,7 @@ struct elf_obj_sy extern void elf_begin PARAMS ((void)); /* should be conditional on address size! */ -#define elf_symbol(asymbol) ((elf_symbol_type *)(&(asymbol)->the_bfd)) +#define elf_symbol(asymbol) ((elf_symbol_type *) (&(asymbol)->the_bfd)) #ifndef S_GET_SIZE #define S_GET_SIZE(S) \ @@ -225,7 +225,7 @@ extern void obj_elf_init_stab_section PARAMS ((segT)); #undef INIT_STAB_SECTION #define INIT_STAB_SECTION(seg) \ - ((void)(ECOFF_DEBUGGING ? 0 : (obj_elf_init_stab_section (seg), 0))) + ((void) (ECOFF_DEBUGGING ? 0 : (obj_elf_init_stab_section (seg), 0))) #undef OBJ_PROCESS_STAB #define OBJ_PROCESS_STAB(seg, what, string, type, other, desc) \ diff --git a/gas/config/obj-som.h b/gas/config/obj-som.h index 35670bc621c..6ed56b96a60 100644 --- a/gas/config/obj-som.h +++ b/gas/config/obj-som.h @@ -36,7 +36,7 @@ #endif /* should be conditional on address size! */ -#define som_symbol(asymbol) ((som_symbol_type *)(&(asymbol)->the_bfd)) +#define som_symbol(asymbol) ((som_symbol_type *) (&(asymbol)->the_bfd)) extern void som_file_symbol PARAMS ((char *)); extern void obj_som_version PARAMS ((int)); diff --git a/gas/config/obj-vms.c b/gas/config/obj-vms.c index 4389ea92588..0e765f3c2f5 100644 --- a/gas/config/obj-vms.c +++ b/gas/config/obj-vms.c @@ -154,7 +154,7 @@ struct VMS_DBG_Symbol }; #define SYMTYPLST_SIZE (1<<4) /* 16; must be power of two */ -#define SYMTYP_HASH(x) ((unsigned)(x) & (SYMTYPLST_SIZE-1)) +#define SYMTYP_HASH(x) ((unsigned) (x) & (SYMTYPLST_SIZE-1)) struct VMS_DBG_Symbol *VMS_Symbol_type_list[SYMTYPLST_SIZE]; /* @@ -268,8 +268,8 @@ static int Current_Object_Record_Type; /* Type of record in above */ * Macros for moving data around. Must work on big-endian systems. */ #ifdef VMS /* These are more efficient for VMS->VMS systems */ -#define COPY_LONG(dest,val) ( *(long *)(dest) = (val) ) -#define COPY_SHORT(dest,val) ( *(short *)(dest) = (val) ) +#define COPY_LONG(dest,val) ( *(long *) (dest) = (val) ) +#define COPY_SHORT(dest,val) ( *(short *) (dest) = (val) ) #else #define COPY_LONG(dest,val) md_number_to_chars ((dest), (val), 4) #define COPY_SHORT(dest,val) md_number_to_chars ((dest), (val), 2) @@ -699,15 +699,15 @@ vms_tir_stack_psect (Psect_Index, Offset, Force) switch (Sta_P(psect_width,offset_width)) { case Sta_P(1,1): PUT_CHAR (TIR_S_C_STA_PB); - PUT_CHAR ((char)(unsigned char) Psect_Index); + PUT_CHAR ((char) (unsigned char) Psect_Index); PUT_CHAR ((char) Offset); break; case Sta_P(1,2): PUT_CHAR (TIR_S_C_STA_PW); - PUT_CHAR ((char)(unsigned char) Psect_Index); + PUT_CHAR ((char) (unsigned char) Psect_Index); PUT_SHORT (Offset); break; case Sta_P(1,4): PUT_CHAR (TIR_S_C_STA_PL); - PUT_CHAR ((char)(unsigned char) Psect_Index); + PUT_CHAR ((char) (unsigned char) Psect_Index); PUT_LONG (Offset); break; case Sta_P(2,1): PUT_CHAR (TIR_S_C_STA_WPB); diff --git a/gas/config/obj-vms.h b/gas/config/obj-vms.h index 16a3489706c..11e4bafe814 100644 --- a/gas/config/obj-vms.h +++ b/gas/config/obj-vms.h @@ -59,7 +59,7 @@ enum reloc_type }; #define N_BADMAG(x) (0) -#define N_TXTOFF(x) ( sizeof(struct exec) ) +#define N_TXTOFF(x) ( sizeof (struct exec) ) #define N_DATOFF(x) ( N_TXTOFF(x) + (x).a_text ) #define N_TROFF(x) ( N_DATOFF(x) + (x).a_data ) #define N_DROFF(x) ( N_TROFF(x) + (x).a_trsize ) @@ -84,7 +84,7 @@ struct exec typedef struct { struct exec header; /* a.out header */ - long string_table_size; /* names + '\0' + sizeof(int) */ + long string_table_size; /* names + '\0' + sizeof (int) */ } object_headers; @@ -203,7 +203,7 @@ typedef struct nlist obj_symbol_type; /* Symbol table entry */ #define H_SET_STRING_SIZE(h,v) ((h)->string_table_size = (v)) #define H_SET_SYMBOL_TABLE_SIZE(h,v) ((h)->header.a_syms = (v) * \ - sizeof(struct nlist)) + sizeof (struct nlist)) /* line numbering stuff. */ #define OBJ_EMIT_LINENO(a, b, c) {;} diff --git a/gas/config/tc-h8300.h b/gas/config/tc-h8300.h index b0ea6441cb9..2a521c60247 100644 --- a/gas/config/tc-h8300.h +++ b/gas/config/tc-h8300.h @@ -30,7 +30,7 @@ struct internal_reloc; #define WORKING_DOT_WORD /* This macro translates between an internal fix and an coff reloc type */ -#define TC_COFF_FIX2RTYPE(fixP) abort(); +#define TC_COFF_FIX2RTYPE(fixP) abort (); #define BFD_ARCH bfd_arch_h8300 #define COFF_MAGIC ( Smode ? 0x8302 : Hmode ? 0x8301 : 0x8300) diff --git a/gas/config/tc-ns32k.h b/gas/config/tc-ns32k.h index 3fc58ef5174..00a3d20e3b0 100644 --- a/gas/config/tc-ns32k.h +++ b/gas/config/tc-ns32k.h @@ -111,7 +111,7 @@ struct { \ frag_opcode_offset (X) = 0; \ frag_bsr (X) = 0; \ } \ - while(0) + while (0) /* Accessor macros for things which may move around */ #define frag_opcode_frag(X) (X)->tc_frag_data.fr_opcode_fragP @@ -141,14 +141,14 @@ struct \ fix_opcode_offset(X) = 0; \ fix_bsr(X) = 0; \ } \ - while(0) + while (0) #define TC_FIX_DATA_PRINT(FILE, FIXP) \ do \ { \ - fprintf((FILE), "opcode_frag=%ld, operand offset=%d, bsr=%d\n", \ + fprintf ((FILE), "opcode_frag=%ld, operand offset=%d, bsr=%d\n", \ (unsigned long) fix_opcode_frag (FIXP), \ fix_opcode_offset (FIXP), \ fix_bsr (FIXP)); \ } \ - while(0) + while (0) diff --git a/gas/config/tc-sparc.h b/gas/config/tc-sparc.h index 6e9df1483d4..9a477abd62d 100644 --- a/gas/config/tc-sparc.h +++ b/gas/config/tc-sparc.h @@ -186,15 +186,15 @@ extern void cons_fix_new_sparc { \ (X)->tc_fix_data = 0; \ } \ - while(0) + while (0) #define TC_FIX_DATA_PRINT(FILE, FIXP) \ do \ { \ - fprintf((FILE), "addend2=%ld\n", \ + fprintf ((FILE), "addend2=%ld\n", \ (unsigned long) (FIXP)->tc_fix_data); \ } \ - while(0) + while (0) #define DWARF2_LINE_MIN_INSN_LENGTH 4 diff --git a/gas/config/tc-tic54x.h b/gas/config/tc-tic54x.h index 22d371d43ff..b43cce1fdd8 100644 --- a/gas/config/tc-tic54x.h +++ b/gas/config/tc-tic54x.h @@ -67,7 +67,7 @@ struct bit_info /* We sometimes need to keep track of bit offsets within words */ #define TC_FRAG_TYPE int -#define TC_FRAG_INIT(FRAGP) do {(FRAGP)->tc_frag_data = 0;}while(0) +#define TC_FRAG_INIT(FRAGP) do {(FRAGP)->tc_frag_data = 0;}while (0) /* tell GAS whether the given token is indeed a code label */ #define TC_START_LABEL_WITHOUT_COLON(c,ptr) tic54x_start_label(c,ptr) diff --git a/gas/config/tc-z8k.h b/gas/config/tc-z8k.h index c28d736862e..130c01c5b69 100644 --- a/gas/config/tc-z8k.h +++ b/gas/config/tc-z8k.h @@ -33,7 +33,7 @@ struct internal_reloc; #endif /* This macro translates between an internal fix and an coff reloc type */ -#define TC_COFF_FIX2RTYPE(fixP) abort(); +#define TC_COFF_FIX2RTYPE(fixP) abort (); #define BFD_ARCH bfd_arch_z8k #define COFF_MAGIC 0x8000 -- 2.30.2