Formatting: kill off "stealth whitespace"

"Stealth whitespace" makes it harder to read diffs, and just generally
cause unwanted weirdness.  Do a source-wide pass to get rid of it.
This commit is contained in:
H. Peter Anvin 2007-10-19 14:42:29 -07:00
parent 31420e76d1
commit 7065309739
44 changed files with 235 additions and 245 deletions

View file

@ -561,7 +561,7 @@ for ( $i = 0 ; $i < $npara ; $i++ ) {
push(@tocptypes, 'toc0'.' :'.$sech.':'.$chap.' '.$secn.':');
unshift(@{$paras[$i]},
[-5, $xref], [0,$chap.' '.$secn.':'], [0, ' ']);
[-5, $xref], [0,$chap.' '.$secn.':'], [0, ' ']);
} elsif ( $ptype eq 'head' || $ptype eq 'subh' ) {
unless ( $xtype =~ /^\S+ (\S+) :(.*)$/ ) {
die "Bad para";

View file

@ -1417,4 +1417,3 @@ sub write_dip {
}
close(PARAS);
}

View file

@ -151,4 +151,3 @@ int32_t reloc_wrt(expr * vect)
} else
return NO_SEG;
}

View file

@ -825,4 +825,3 @@ int float_option(const char *option)
return -1; /* Unknown option */
}
}

View file

@ -1,5 +1,5 @@
/* float.h header file for the floating-point constant module of
* the Netwide Assembler
* the Netwide Assembler
*
* The Netwide Assembler is copyright (C) 1996 Simon Tatham and
* Julian Hall. All rights reserved. The software is

View file

@ -139,7 +139,7 @@ if ( !defined($output) || $output eq 'd' ) {
printf D " { itable_%s, -1 },\n", $nn;
} elsif (defined($dinstables{$nn})) {
printf D " { itable_%s, %u },\n",
$nn, scalar(@{$dinstables{$nn}});
$nn, scalar(@{$dinstables{$nn}});
} else {
printf D " { NULL, 0 },\n";
}

View file

@ -23,4 +23,3 @@ int snprintf(char *str, size_t size, const char *format, ...)
return rv;
}

View file

@ -29,5 +29,3 @@ while ($line = <STDIN>) {
}
print $line, "\n";
}

54
nasm.h
View file

@ -422,51 +422,51 @@ enum {
typedef uint32_t opflags_t;
/* Size, and other attributes, of the operand */
#define BITS8 0x00000001L
#define BITS16 0x00000002L
#define BITS32 0x00000004L
#define BITS64 0x00000008L /* x64 and FPU only */
#define BITS80 0x00000010L /* FPU only */
#define BITS8 0x00000001L
#define BITS16 0x00000002L
#define BITS32 0x00000004L
#define BITS64 0x00000008L /* x64 and FPU only */
#define BITS80 0x00000010L /* FPU only */
#define BITS128 0x20000000L
#define FAR 0x00000020L /* grotty: this means 16:16 or */
#define FAR 0x00000020L /* grotty: this means 16:16 or */
/* 16:32, like in CALL/JMP */
#define NEAR 0x00000040L
#define SHORT 0x00000080L /* and this means what it says :) */
#define NEAR 0x00000040L
#define SHORT 0x00000080L /* and this means what it says :) */
#define SIZE_MASK 0x200000FFL /* all the size attributes */
#define SIZE_MASK 0x200000FFL /* all the size attributes */
/* Modifiers */
#define MODIFIER_MASK 0x00000f00L
#define TO 0x00000100L /* reverse effect in FADD, FSUB &c */
#define COLON 0x00000200L /* operand is followed by a colon */
#define STRICT 0x00000400L /* do not optimize this operand */
#define TO 0x00000100L /* reverse effect in FADD, FSUB &c */
#define COLON 0x00000200L /* operand is followed by a colon */
#define STRICT 0x00000400L /* do not optimize this operand */
/* Type of operand: memory reference, register, etc. */
#define OPTYPE_MASK 0x0000f000L
#define REGISTER 0x00001000L /* register number in 'basereg' */
#define IMMEDIATE 0x00002000L
#define MEMORY 0x0000c000L
#define REGMEM 0x00008000L /* for r/m, ie EA, operands */
#define REGMEM 0x00008000L /* for r/m, ie EA, operands */
/* Register classes */
#define REG_EA 0x00009000L /* 'normal' reg, qualifies as EA */
#define REG_EA 0x00009000L /* 'normal' reg, qualifies as EA */
#define RM_GPR 0x00208000L /* integer operand */
#define REG_GPR 0x00209000L /* integer register */
#define REG8 0x00209001L /* 8-bit GPR */
#define REG16 0x00209002L /* 16-bit GPR */
#define REG32 0x00209004L /* 32-bit GPR */
#define REG64 0x00209008L /* 64-bit GPR */
#define IP_REG 0x00801000L /* RIP or EIP register */
#define RIPREG 0x00801008L /* RIP */
#define EIPREG 0x00801004L /* EIP */
#define FPUREG 0x01001000L /* floating point stack registers */
#define FPU0 0x01011000L /* FPU stack register zero */
#define REG8 0x00209001L /* 8-bit GPR */
#define REG16 0x00209002L /* 16-bit GPR */
#define REG32 0x00209004L /* 32-bit GPR */
#define REG64 0x00209008L /* 64-bit GPR */
#define IP_REG 0x00801000L /* RIP or EIP register */
#define RIPREG 0x00801008L /* RIP */
#define EIPREG 0x00801004L /* EIP */
#define FPUREG 0x01001000L /* floating point stack registers */
#define FPU0 0x01011000L /* FPU stack register zero */
#define RM_MMX 0x02008000L /* MMX operand */
#define MMXREG 0x02009000L /* MMX register */
#define MMXREG 0x02009000L /* MMX register */
#define RM_XMM 0x04008000L /* XMM (SSE) operand */
#define XMMREG 0x04009000L /* XMM (SSE) register */
#define XMMREG 0x04009000L /* XMM (SSE) register */
#define XMM0 0x04019000L /* XMM register zero */
#define REG_CDT 0x00101004L /* CRn, DRn and TRn */
#define REG_CDT 0x00101004L /* CRn, DRn and TRn */
#define REG_CREG 0x00111004L /* CRn */
#define REG_DREG 0x00121004L /* DRn */
#define REG_TREG 0x00141004L /* TRn */
@ -480,7 +480,7 @@ typedef uint32_t opflags_t;
#define REG_EIP 0x00801004L /* EIP relative addressing */
/* Special GPRs */
#define REG_SMASK 0x000f0000L /* a mask for the following */
#define REG_SMASK 0x000f0000L /* a mask for the following */
#define REG_ACCUM 0x00219000L /* accumulator: AL, AX, EAX, RAX */
#define REG_AL 0x00219001L
#define REG_AX 0x00219002L

View file

@ -43,7 +43,7 @@ typedef void (*efunc) (int severity, const char *fmt, ...);
* argument to an efunc.
*/
#define ERR_DEBUG 0x00000008 /* put out debugging message */
#define ERR_DEBUG 0x00000008 /* put out debugging message */
#define ERR_WARNING 0x00000000 /* warn only: no further action */
#define ERR_NONFATAL 0x00000001 /* terminate assembly after phase */
#define ERR_FATAL 0x00000002 /* instantly fatal: exit with error */
@ -59,7 +59,7 @@ typedef void (*efunc) (int severity, const char *fmt, ...);
*/
#define ERR_WARN_MASK 0x0000FF00 /* the mask for this feature */
#define ERR_WARN_SHR 8 /* how far to shift right */
#define ERR_WARN_SHR 8 /* how far to shift right */
#define WARN(x) ((x) << ERR_WARN_SHR)

View file

@ -1,7 +1,7 @@
/* outform.c manages a list of output formats, and associates
* them with their relevant drivers. Also has a
* routine to find the correct driver given a name
* for it
* them with their relevant drivers. Also has a
* routine to find the correct driver given a name
* for it
*
* The Netwide Assembler is copyright (C) 1996 Simon Tatham and
* Julian Hall. All rights reserved. The software is

View file

@ -116,7 +116,7 @@ struct symbol {
/* nasm internal data */
struct symbol *next; /* next symbol in the list */
char *name; /* name of this symbol */
int32_t initial_snum; /* symbol number used above in
int32_t initial_snum; /* symbol number used above in
reloc */
int32_t snum; /* true snum for reloc */

View file

@ -85,7 +85,7 @@ if ($what eq 'h') {
print OUT "};\n\n";
printf OUT "#define PP_COND(x) ((enum pp_conditional)((x) & 0x%x))\n",
(scalar(@cond)-1) << 1;
(scalar(@cond)-1) << 1;
print OUT "#define PP_IS_COND(x) ((unsigned int)(x) < PP_\U$first_uncond\E)\n";
print OUT "#define PP_NEGATIVE(x) ((x) & 1)\n";
print OUT "\n";
@ -187,7 +187,7 @@ if ($what eq 'c') {
print OUT "\n";
printf OUT " crc = crc64i(UINT64_C(0x%08x%08x), token);\n",
$$sv[0], $$sv[1];
$$sv[0], $$sv[1];
print OUT " k1 = (uint32_t)crc;\n";
print OUT " k2 = (uint32_t)(crc >> 32);\n";
print OUT "\n";

View file

@ -38,7 +38,7 @@ struct segconfig sconft[SEGCONFIGMAX] = {
{0xFFFF, 0xFFFF, "invalid segment", 0, 0}
};
#define getsegconfig(target,number) \
#define getsegconfig(target,number) \
{ \
int _i; \
int _t = number; \

View file

@ -1,4 +1,4 @@
/* rdoff.c library of routines for manipulating rdoff files
/* rdoff.c library of routines for manipulating rdoff files
*
* The Netwide Assembler is copyright (C) 1996 Simon Tatham and
* Julian Hall. All rights reserved. The software is

View file

@ -225,4 +225,3 @@ int stdscan(void *private_data, struct tokenval *tv)
} else /* just an ordinary char */
return tv->t_type = (uint8_t)(*stdscan_bufptr++);
}

View file

@ -21,5 +21,3 @@ foreach $mode ('abs', 'rel') {
}
print "\nfoo:\n";

View file

@ -222,7 +222,7 @@ if ($output eq 'h') {
print " const struct tokendata *data;\n";
print "\n";
printf " crc = crc64(UINT64_C(0x%08x%08x), token);\n",
$$sv[0], $$sv[1];
$$sv[0], $$sv[1];
print " k1 = (uint32_t)crc;\n";
print " k2 = (uint32_t)(crc >> 32);\n";
print "\n";

View file

@ -133,4 +133,3 @@ if ( $what eq 'h' ) {
}
exit 0;