ref: 0d9739535e313b0a2ad19c89b9c85fc7b75237a3
parent: 0ce5efb3c57ea5aa578881a994bed9c1b8d7c19d
author: Vegard Nossum <[email protected]>
date: Thu Jun 11 03:26:46 EDT 2009
Use spaces instead of tabs after CPP directives Signed-off-by: Vegard Nossum <[email protected]>
--- a/src/asm/alloca.c
+++ b/src/asm/alloca.c
@@ -66,7 +66,7 @@
typedef char *pointer;
#endif
-#define NULL 0
+#define NULL 0
/* Different portions of Emacs need to call different versions of
malloc. The Emacs executable needs alloca to call xmalloc, because
@@ -86,7 +86,7 @@
extern pointer malloc ();
And added the following line:
*/
-#include <stdlib.h>
+#include <stdlib.h>
/* Define STACK_DIRECTION if you know the direction of stack
growth for your system; otherwise it will be automatically
@@ -97,17 +97,17 @@
STACK_DIRECTION = 0 => direction of growth unknown */
#ifndef STACK_DIRECTION
-#define STACK_DIRECTION 0 /* Direction unknown. */
+#define STACK_DIRECTION 0 /* Direction unknown. */
#endif
#if STACK_DIRECTION != 0
-#define STACK_DIR STACK_DIRECTION /* Known at compile-time. */
+#define STACK_DIR STACK_DIRECTION /* Known at compile-time. */
#else /* STACK_DIRECTION == 0; need run-time code. */
static int stack_dir; /* 1 or -1 once known. */
-#define STACK_DIR stack_dir
+#define STACK_DIR stack_dir
static void
find_stack_direction ()
@@ -140,8 +140,8 @@
It is very important that sizeof(header) agree with malloc
alignment chunk size. The following default should work okay. */
-#ifndef ALIGN_SIZE
-#define ALIGN_SIZE sizeof(double)
+#ifndef ALIGN_SIZE
+#define ALIGN_SIZE sizeof(double)
#endif
typedef union hdr
--- a/src/asm/fstack.c
+++ b/src/asm/fstack.c
@@ -5,14 +5,14 @@
*
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "symbol.h"
-#include "fstack.h"
-#include "types.h"
-#include "main.h"
-#include "lexer.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "symbol.h"
+#include "fstack.h"
+#include "types.h"
+#include "main.h"
+#include "lexer.h"
/*
* RGBAsm - FSTACK.C (FileStack routines)
--- a/src/asm/gameboy/locallex.c
+++ b/src/asm/gameboy/locallex.c
@@ -1,6 +1,6 @@
#include "symbol.h"
-#include "lexer.h"
-#include "rpn.h"
+#include "lexer.h"
+#include "rpn.h"
#include "asmy.h"
struct sLexInitString localstrings[] =
--- a/src/asm/globlex.c
+++ b/src/asm/globlex.c
@@ -1,14 +1,14 @@
-#include "asm.h"
-#include "symbol.h"
-#include "rpn.h"
-#include "asmy.h"
-#include "symbol.h"
-#include "main.h"
-#include "lexer.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <string.h>
+#include "asm.h"
+#include "symbol.h"
+#include "rpn.h"
+#include "asmy.h"
+#include "symbol.h"
+#include "main.h"
+#include "lexer.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <string.h>
UBYTE oDontExpandStrings=0;
SLONG nGBGfxID=-1;
@@ -308,7 +308,7 @@
"ds", T_POP_DS,
NAME_DB, T_POP_DB,
NAME_DW, T_POP_DW,
-#ifdef NAME_DL
+#ifdef NAME_DL
NAME_DL, T_POP_DL,
#endif
"section", T_POP_SECTION,
@@ -334,7 +334,7 @@
"endc", T_POP_ENDC,
"bss", T_SECT_BSS,
-#if defined(GAMEBOY) || defined(PCENGINE)
+#if defined(GAMEBOY) || defined(PCENGINE)
"vram", T_SECT_VRAM,
#endif
"code", T_SECT_CODE,
@@ -346,7 +346,7 @@
NAME_RB, T_POP_RB,
NAME_RW, T_POP_RW,
-#ifdef NAME_RL
+#ifdef NAME_RL
NAME_RL, T_POP_RL,
#endif
"equ", T_POP_EQU,
--- a/src/asm/include/asm.h
+++ b/src/asm/include/asm.h
@@ -9,12 +9,12 @@
#ifndef ASM_H
#define ASM_H
-#include <stdlib.h>
-#include <stdio.h>
-#include "types.h"
-#include "symbol.h"
-#include "localasm.h"
-#include "asmotor.h"
+#include <stdlib.h>
+#include <stdio.h>
+#include "types.h"
+#include "symbol.h"
+#include "localasm.h"
+#include "asmotor.h"
extern SLONG nLineNo;
extern ULONG nTotalLines;
@@ -30,4 +30,4 @@
#define MAXMACROARGS 9
#define MAXINCPATHS 16
-#endif // ASM_H
\ No newline at end of file
+#endif // ASM_H
\ No newline at end of file
--- a/src/asm/include/lexer.h
+++ b/src/asm/include/lexer.h
@@ -1,10 +1,10 @@
-#ifndef LEXER_H
-#define LEXER_H
+#ifndef LEXER_H
+#define LEXER_H
-#include "types.h"
-#include <stdio.h>
+#include "types.h"
+#include <stdio.h>
-#define LEXHASHSIZE 512
+#define LEXHASHSIZE 512
struct sLexInitString
{
@@ -32,8 +32,8 @@
LEX_STATE_MACROARGS
};
-#define INITIAL 0
-#define macroarg 3
+#define INITIAL 0
+#define macroarg 3
typedef struct yy_buffer_state *YY_BUFFER_STATE;
@@ -60,7 +60,7 @@
extern YY_BUFFER_STATE pCurrentBuffer;
-#ifdef __GNUC__
+#ifdef __GNUC__
extern void strupr( char *s );
extern void strlwr( char *s );
#endif
--- a/src/asm/include/mymath.h
+++ b/src/asm/include/mymath.h
@@ -1,5 +1,5 @@
-#ifndef MATH_H
-#define MATH_H
+#ifndef MATH_H
+#define MATH_H
#include "types.h"
--- a/src/asm/include/output.h
+++ b/src/asm/include/output.h
@@ -1,8 +1,8 @@
#ifndef OUTPUT_H
#define OUTPUT_H 1
-#include "rpn.h"
-#include "types.h"
+#include "rpn.h"
+#include "types.h"
struct Section
{
--- a/src/asm/lexer.c
+++ b/src/asm/lexer.c
@@ -1,14 +1,14 @@
-#include "asm.h"
-#include "lexer.h"
-#include "types.h"
-#include "main.h"
-#include "rpn.h"
-#include "asmy.h"
-#include "fstack.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
+#include "asm.h"
+#include "lexer.h"
+#include "types.h"
+#include "main.h"
+#include "rpn.h"
+#include "asmy.h"
+#include "fstack.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
struct sLexString
{
@@ -18,10 +18,10 @@
struct sLexString *pNext;
};
-#define pLexBuffer (pCurrentBuffer->pBuffer)
-#define nLexBufferLeng (pCurrentBuffer->nBufferSize)
+#define pLexBuffer (pCurrentBuffer->pBuffer)
+#define nLexBufferLeng (pCurrentBuffer->nBufferSize)
-#define SAFETYMARGIN 1024
+#define SAFETYMARGIN 1024
extern ULONG symvaluetostring (char *dest, char *s);
@@ -37,9 +37,9 @@
ULONG nFloating;
enum eLexerState lexerstate=LEX_STATE_NORMAL;
-#define AtLineStart pCurrentBuffer->oAtLineStart
+#define AtLineStart pCurrentBuffer->oAtLineStart
-#ifdef __GNUC__
+#ifdef __GNUC__
void strupr( char *s )
{
while( *s )
--- a/src/asm/main.c
+++ b/src/asm/main.c
@@ -18,7 +18,7 @@
int yyparse (void);
void setuplex (void);
-#ifdef AMIGA
+#ifdef AMIGA
__near long __stack = 65536L;
#endif
--- a/src/asm/math.c
+++ b/src/asm/math.c
@@ -5,16 +5,16 @@
*
*/
-#include <math.h>
-#include <stdio.h>
-#include "types.h"
-#include "mymath.h"
-#include "symbol.h"
+#include <math.h>
+#include <stdio.h>
+#include "types.h"
+#include "mymath.h"
+#include "symbol.h"
-#define fix2double(i) ((double)(i/65536.0))
-#define double2fix(d) ((SLONG)(d*65536.0))
-#ifndef PI
-#define PI (acos(-1))
+#define fix2double(i) ((double)(i/65536.0))
+#define double2fix(d) ((SLONG)(d*65536.0))
+#ifndef PI
+#define PI (acos(-1))
#endif
/*
--- a/src/asm/output.c
+++ b/src/asm/output.c
@@ -5,18 +5,18 @@
*
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "asm.h"
-#include "output.h"
-#include "symbol.h"
-#include "mylink.h"
-#include "main.h"
-#include "rpn.h"
-#include "fstack.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "asm.h"
+#include "output.h"
+#include "symbol.h"
+#include "mylink.h"
+#include "main.h"
+#include "rpn.h"
+#include "fstack.h"
-#define SECTIONCHUNK 0x4000
+#define SECTIONCHUNK 0x4000
/*
* RGBAsm - OUTPUT.C - Outputs an objectfile
--- a/src/asm/rpn.c
+++ b/src/asm/rpn.c
@@ -10,10 +10,10 @@
#include "symbol.h"
#include "asm.h"
#include "main.h"
-#include "rpn.h"
+#include "rpn.h"
-#include <stdio.h>
-#include <string.h>
+#include <stdio.h>
+#include <string.h>
void mergetwoexpressions( struct Expression *expr, struct Expression *src1, struct Expression *src2 )
{
@@ -25,7 +25,7 @@
expr->isPCRel |= src2->isPCRel;
}
-#define joinexpr() mergetwoexpressions(expr,src1,src2)
+#define joinexpr() mergetwoexpressions(expr,src1,src2)
/*
* RGBAsm - RPN.C - Controls RPN expressions for objectfiles
@@ -192,7 +192,7 @@
}
}
-#ifdef GAMEBOY
+#ifdef GAMEBOY
void rpn_CheckHRAM (struct Expression *expr, struct Expression *src)
{
*expr = *src;
@@ -200,7 +200,7 @@
}
#endif
-#ifdef PCENGINE
+#ifdef PCENGINE
void rpn_CheckZP (struct Expression *expr, struct Expression *src)
{
*expr = *src;
--- a/src/asm/yaccprt1.y
+++ b/src/asm/yaccprt1.y
@@ -11,7 +11,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <ctype.h>
+#include <ctype.h>
char *tzNewMacro;
ULONG ulNewMacroSize;
@@ -327,7 +327,7 @@
}
-#ifdef PCENGINE
+#ifdef PCENGINE
ULONG ZP( struct Expression *expr )
{
return( (!rpn_isReloc(expr)) && (expr->nVal>0x1FFF) && (expr->nVal<0x2100) );
--- a/src/lib/include/library.h
+++ b/src/lib/include/library.h
@@ -1,7 +1,7 @@
-#ifndef LIBRARY_H
-#define LIBRARY_H
+#ifndef LIBRARY_H
+#define LIBRARY_H
-#include "libwrap.h"
+#include "libwrap.h"
extern sLibrary *lib_Read( char *filename );
extern BBOOL lib_Write( sLibrary *lib, char *filename );
--- a/src/lib/include/libwrap.h
+++ b/src/lib/include/libwrap.h
@@ -1,9 +1,9 @@
-#ifndef LIBWRAP_H
-#define LIBWRAP_H
+#ifndef LIBWRAP_H
+#define LIBWRAP_H
-#include "types.h"
+#include "types.h"
-#define MAXNAMELENGTH 256
+#define MAXNAMELENGTH 256
struct LibraryWrapper
{
--- a/src/lib/library.c
+++ b/src/lib/library.c
@@ -1,8 +1,8 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "types.h"
-#include "libwrap.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "types.h"
+#include "libwrap.h"
extern void fatalerror( char *s );
--- a/src/lib/main.c
+++ b/src/lib/main.c
@@ -1,15 +1,15 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
-#include "asmotor.h"
-#include "types.h"
-#include "library.h"
+#include "asmotor.h"
+#include "types.h"
+#include "library.h"
// Quick and dirty...but it works
#ifdef __GNUC__
-#define strcmpi strcasecmp
+#define strcmpi strcasecmp
#endif
/*
--- a/src/link/assign.c
+++ b/src/link/assign.c
@@ -16,7 +16,7 @@
SLONG MaxAvail[MAXBANKS];
SLONG MaxBankUsed;
-#define DOMAXBANK(x) {if( (x)>MaxBankUsed ) MaxBankUsed=(x);}
+#define DOMAXBANK(x) {if( (x)>MaxBankUsed ) MaxBankUsed=(x);}
SLONG area_Avail( SLONG bank )
{
--- a/src/link/include/assign.h
+++ b/src/link/include/assign.h
@@ -1,7 +1,7 @@
-#ifndef ASSIGN_H
-#define ASSIGN_H
+#ifndef ASSIGN_H
+#define ASSIGN_H
-#include "types.h"
+#include "types.h"
enum eBankDefine
{
@@ -11,7 +11,7 @@
BANK_HRAM
};
-#define MAXBANKS 259
+#define MAXBANKS 259
extern SLONG area_Avail( SLONG bank );
extern void AssignSections( void );
--- a/src/link/include/main.h
+++ b/src/link/include/main.h
@@ -1,7 +1,7 @@
-#ifndef MAIN_H
-#define MAIN_H
+#ifndef MAIN_H
+#define MAIN_H
-#include "types.h"
+#include "types.h"
extern void PrintUsage( void );
extern void fatalerror( char *s );
--- a/src/link/include/mylink.h
+++ b/src/link/include/mylink.h
@@ -2,14 +2,14 @@
#define LINK_H 1
#if defined(AMIGA) || defined(__GNUC__)
-#define _MAX_PATH 512
+#define _MAX_PATH 512
#endif
-#include "types.h"
+#include "types.h"
extern SLONG options;
-#define OPT_SMALL 0x01
-#define OPT_SMART_C_LINK 0x02
+#define OPT_SMALL 0x01
+#define OPT_SMART_C_LINK 0x02
enum eRpnData
{
--- a/src/link/include/patch.h
+++ b/src/link/include/patch.h
@@ -1,7 +1,7 @@
-#ifndef PATCH_H
-#define PATCH_H
+#ifndef PATCH_H
+#define PATCH_H
-#include "types.h"
+#include "types.h"
void Patch( void );
extern SLONG nPC;
--- a/src/link/include/symbol.h
+++ b/src/link/include/symbol.h
@@ -1,7 +1,7 @@
-#ifndef SYMBOL_H
-#define SYMBOL_H
+#ifndef SYMBOL_H
+#define SYMBOL_H
-#include "types.h"
+#include "types.h"
void sym_Init( void );
void sym_CreateSymbol( char *tzName, SLONG nValue, SBYTE nBank );
--- a/src/link/library.c
+++ b/src/link/library.c
@@ -1,9 +1,9 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "types.h"
-#include "mylink.h"
-#include "main.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "types.h"
+#include "mylink.h"
+#include "main.h"
static BBOOL symboldefined( char *name )
{
--- a/src/link/main.c
+++ b/src/link/main.c
@@ -1,20 +1,20 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
-#include "object.h"
-#include "output.h"
-#include "assign.h"
-#include "patch.h"
-#include "asmotor.h"
-#include "mylink.h"
-#include "mapfile.h"
-#include "main.h"
-#include "library.h"
+#include "object.h"
+#include "output.h"
+#include "assign.h"
+#include "patch.h"
+#include "asmotor.h"
+#include "mylink.h"
+#include "mapfile.h"
+#include "main.h"
+#include "library.h"
// Quick and dirty...but it works
#ifdef __GNUC__
-#define strcmpi strcasecmp
+#define strcmpi strcasecmp
#endif
enum eBlockType
--- a/src/link/symbol.c
+++ b/src/link/symbol.c
@@ -1,9 +1,9 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "main.h"
-#include "patch.h"
-#include "types.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "main.h"
+#include "patch.h"
+#include "types.h"
#define HASHSIZE 73