mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Use spaces instead of tabs after CPP directives
Signed-off-by: Vegard Nossum <vegard.nossum@gmail.com>
This commit is contained in:
@@ -66,7 +66,7 @@ typedef void *pointer;
|
||||
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 @@ typedef char *pointer;
|
||||
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 @@ extern pointer malloc ();
|
||||
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 @@ find_stack_direction ()
|
||||
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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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[] =
|
||||
|
||||
@@ -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 @@ struct sLexInitString staticstrings[] =
|
||||
"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 @@ struct sLexInitString staticstrings[] =
|
||||
"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 @@ struct sLexInitString staticstrings[] =
|
||||
|
||||
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,
|
||||
|
||||
@@ -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 @@ extern UBYTE oDontExpandStrings;
|
||||
#define MAXMACROARGS 9
|
||||
#define MAXINCPATHS 16
|
||||
|
||||
#endif // ASM_H
|
||||
#endif // ASM_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 @@ enum eLexerState
|
||||
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 void yyunputbytes( ULONG count );
|
||||
|
||||
extern YY_BUFFER_STATE pCurrentBuffer;
|
||||
|
||||
#ifdef __GNUC__
|
||||
#ifdef __GNUC__
|
||||
extern void strupr( char *s );
|
||||
extern void strlwr( char *s );
|
||||
#endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef MATH_H
|
||||
#define MATH_H
|
||||
#ifndef MATH_H
|
||||
#define MATH_H
|
||||
|
||||
#include "types.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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
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 tFloatingChars[256];
|
||||
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 )
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
int yyparse (void);
|
||||
void setuplex (void);
|
||||
|
||||
#ifdef AMIGA
|
||||
#ifdef AMIGA
|
||||
__near long __stack = 65536L;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -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
|
||||
|
||||
/*
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 @@ void mergetwoexpressions( struct Expression *expr, struct Expression *src1, stru
|
||||
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 @@ int rpn_RangeCheck( struct Expression *expr, struct Expression *src, SLONG low,
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef GAMEBOY
|
||||
#ifdef GAMEBOY
|
||||
void rpn_CheckHRAM (struct Expression *expr, struct Expression *src)
|
||||
{
|
||||
*expr = *src;
|
||||
@@ -200,7 +200,7 @@ void rpn_CheckHRAM (struct Expression *expr, struct Expression *src)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef PCENGINE
|
||||
#ifdef PCENGINE
|
||||
void rpn_CheckZP (struct Expression *expr, struct Expression *src)
|
||||
{
|
||||
*expr = *src;
|
||||
|
||||
@@ -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 @@ void if_skip_to_endc( void )
|
||||
}
|
||||
|
||||
|
||||
#ifdef PCENGINE
|
||||
#ifdef PCENGINE
|
||||
ULONG ZP( struct Expression *expr )
|
||||
{
|
||||
return( (!rpn_isReloc(expr)) && (expr->nVal>0x1FFF) && (expr->nVal<0x2100) );
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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 );
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
/*
|
||||
|
||||
@@ -16,7 +16,7 @@ struct sFreeArea *BankFree[MAXBANKS];
|
||||
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 )
|
||||
{
|
||||
|
||||
@@ -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 @@ enum eBankDefine
|
||||
BANK_HRAM
|
||||
};
|
||||
|
||||
#define MAXBANKS 259
|
||||
#define MAXBANKS 259
|
||||
|
||||
extern SLONG area_Avail( SLONG bank );
|
||||
extern void AssignSections( void );
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user