mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
run indent on header files (whitespace changes)
Merging lai's source with this one is very irritating because they have different indentation styles. I couldn't find what profile vegard used for his version, so I used these flags (which should bring the source close to KNF): -bap -br -ce -ci4 -cli0 -d0 -di0 -i8 -ip -l79 -nbc -ncdb -ndj -ei -nfc1 -nlp -npcs -psl -sc -sob
This commit is contained in:
@@ -33,4 +33,4 @@ extern UBYTE oDontExpandStrings;
|
|||||||
#define MAXMACROARGS 9
|
#define MAXMACROARGS 9
|
||||||
#define MAXINCPATHS 16
|
#define MAXINCPATHS 16
|
||||||
|
|
||||||
#endif // ASM_H
|
#endif /* // ASM_H */
|
||||||
|
|||||||
@@ -105,7 +105,6 @@ enum {
|
|||||||
REG_HL_IND,
|
REG_HL_IND,
|
||||||
REG_A
|
REG_A
|
||||||
};
|
};
|
||||||
|
|
||||||
/* "rr" defs */
|
/* "rr" defs */
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
@@ -114,7 +113,6 @@ enum {
|
|||||||
REG_HL_INDINC,
|
REG_HL_INDINC,
|
||||||
REG_HL_INDDEC,
|
REG_HL_INDDEC,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* "ss" defs */
|
/* "ss" defs */
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
@@ -123,7 +121,6 @@ enum {
|
|||||||
REG_HL,
|
REG_HL,
|
||||||
REG_SP
|
REG_SP
|
||||||
};
|
};
|
||||||
|
|
||||||
/* "tt" defs */
|
/* "tt" defs */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -28,7 +28,6 @@ enum eLexerState {
|
|||||||
LEX_STATE_NORMAL,
|
LEX_STATE_NORMAL,
|
||||||
LEX_STATE_MACROARGS
|
LEX_STATE_MACROARGS
|
||||||
};
|
};
|
||||||
|
|
||||||
#define INITIAL 0
|
#define INITIAL 0
|
||||||
#define macroarg 3
|
#define macroarg 3
|
||||||
|
|
||||||
@@ -39,7 +38,7 @@ extern YY_BUFFER_STATE yy_create_buffer(FILE * f);
|
|||||||
extern YY_BUFFER_STATE yy_scan_bytes(char *mem, ULONG size);
|
extern YY_BUFFER_STATE yy_scan_bytes(char *mem, ULONG size);
|
||||||
extern void yy_delete_buffer(YY_BUFFER_STATE);
|
extern void yy_delete_buffer(YY_BUFFER_STATE);
|
||||||
extern void yy_switch_to_buffer(YY_BUFFER_STATE);
|
extern void yy_switch_to_buffer(YY_BUFFER_STATE);
|
||||||
extern ULONG lex_FloatAlloc(struct sLexFloat *tok);
|
extern ULONG lex_FloatAlloc(struct sLexFloat * tok);
|
||||||
extern void lex_FloatAddRange(ULONG id, UWORD start, UWORD end);
|
extern void lex_FloatAddRange(ULONG id, UWORD start, UWORD end);
|
||||||
extern void lex_FloatDeleteRange(ULONG id, UWORD start, UWORD end);
|
extern void lex_FloatDeleteRange(ULONG id, UWORD start, UWORD end);
|
||||||
extern void lex_FloatAddFirstRange(ULONG id, UWORD start, UWORD end);
|
extern void lex_FloatAddFirstRange(ULONG id, UWORD start, UWORD end);
|
||||||
@@ -47,7 +46,7 @@ extern void lex_FloatDeleteFirstRange(ULONG id, UWORD start, UWORD end);
|
|||||||
extern void lex_FloatAddSecondRange(ULONG id, UWORD start, UWORD end);
|
extern void lex_FloatAddSecondRange(ULONG id, UWORD start, UWORD end);
|
||||||
extern void lex_FloatDeleteSecondRange(ULONG id, UWORD start, UWORD end);
|
extern void lex_FloatDeleteSecondRange(ULONG id, UWORD start, UWORD end);
|
||||||
extern void lex_Init(void);
|
extern void lex_Init(void);
|
||||||
extern void lex_AddStrings(struct sLexInitString *lex);
|
extern void lex_AddStrings(struct sLexInitString * lex);
|
||||||
extern void lex_SetBuffer(char *buffer, ULONG len);
|
extern void lex_SetBuffer(char *buffer, ULONG len);
|
||||||
extern ULONG yylex(void);
|
extern ULONG yylex(void);
|
||||||
extern void yyunput(char c);
|
extern void yyunput(char c);
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ struct sOptions {
|
|||||||
ULONG endian;
|
ULONG endian;
|
||||||
char gbgfx[4];
|
char gbgfx[4];
|
||||||
char binary[2];
|
char binary[2];
|
||||||
SLONG fillchar; // -1 == random
|
SLONG fillchar;
|
||||||
|
//-1 == random
|
||||||
};
|
};
|
||||||
|
|
||||||
extern char *tzNewMacro;
|
extern char *tzNewMacro;
|
||||||
|
|||||||
@@ -115,5 +115,4 @@ enum {
|
|||||||
PATCH_WORD_B,
|
PATCH_WORD_B,
|
||||||
PATCH_LONG_B
|
PATCH_LONG_B
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -20,15 +20,15 @@ void out_SetFileName(char *s);
|
|||||||
void out_NewSection(char *pzName, ULONG secttype);
|
void out_NewSection(char *pzName, ULONG secttype);
|
||||||
void out_NewAbsSection(char *pzName, ULONG secttype, SLONG org, SLONG bank);
|
void out_NewAbsSection(char *pzName, ULONG secttype, SLONG org, SLONG bank);
|
||||||
void out_AbsByte(int b);
|
void out_AbsByte(int b);
|
||||||
void out_RelByte(struct Expression *expr);
|
void out_RelByte(struct Expression * expr);
|
||||||
void out_RelWord(struct Expression *expr);
|
void out_RelWord(struct Expression * expr);
|
||||||
void out_PCRelByte(struct Expression *expr);
|
void out_PCRelByte(struct Expression * expr);
|
||||||
void out_WriteObject(void);
|
void out_WriteObject(void);
|
||||||
void out_Skip(int skip);
|
void out_Skip(int skip);
|
||||||
void out_BinaryFile(char *s);
|
void out_BinaryFile(char *s);
|
||||||
void out_String(char *s);
|
void out_String(char *s);
|
||||||
void out_AbsLong(SLONG b);
|
void out_AbsLong(SLONG b);
|
||||||
void out_RelLong(struct Expression *expr);
|
void out_RelLong(struct Expression * expr);
|
||||||
void out_PushSection(void);
|
void out_PushSection(void);
|
||||||
void out_PopSection(void);
|
void out_PopSection(void);
|
||||||
|
|
||||||
|
|||||||
@@ -10,59 +10,78 @@ struct Expression {
|
|||||||
ULONG isPCRel;
|
ULONG isPCRel;
|
||||||
};
|
};
|
||||||
|
|
||||||
ULONG rpn_isReloc(struct Expression *expr);
|
ULONG rpn_isReloc(struct Expression * expr);
|
||||||
ULONG rpn_isPCRelative(struct Expression *expr);
|
ULONG rpn_isPCRelative(struct Expression * expr);
|
||||||
void rpn_Symbol(struct Expression *expr, char *tzSym);
|
void rpn_Symbol(struct Expression * expr, char *tzSym);
|
||||||
void rpn_Number(struct Expression *expr, ULONG i);
|
void rpn_Number(struct Expression * expr, ULONG i);
|
||||||
void rpn_LOGNOT(struct Expression *expr, struct Expression *src1);
|
void rpn_LOGNOT(struct Expression * expr, struct Expression * src1);
|
||||||
void rpn_LOGOR(struct Expression *expr, struct Expression *src1,
|
void
|
||||||
struct Expression *src2);
|
rpn_LOGOR(struct Expression * expr, struct Expression * src1,
|
||||||
void rpn_LOGAND(struct Expression *expr, struct Expression *src1,
|
struct Expression * src2);
|
||||||
struct Expression *src2);
|
void
|
||||||
void rpn_LOGEQU(struct Expression *expr, struct Expression *src1,
|
rpn_LOGAND(struct Expression * expr, struct Expression * src1,
|
||||||
struct Expression *src2);
|
struct Expression * src2);
|
||||||
void rpn_LOGGT(struct Expression *expr, struct Expression *src1,
|
void
|
||||||
struct Expression *src2);
|
rpn_LOGEQU(struct Expression * expr, struct Expression * src1,
|
||||||
void rpn_LOGLT(struct Expression *expr, struct Expression *src1,
|
struct Expression * src2);
|
||||||
struct Expression *src2);
|
void
|
||||||
void rpn_LOGGE(struct Expression *expr, struct Expression *src1,
|
rpn_LOGGT(struct Expression * expr, struct Expression * src1,
|
||||||
struct Expression *src2);
|
struct Expression * src2);
|
||||||
void rpn_LOGLE(struct Expression *expr, struct Expression *src1,
|
void
|
||||||
struct Expression *src2);
|
rpn_LOGLT(struct Expression * expr, struct Expression * src1,
|
||||||
void rpn_LOGNE(struct Expression *expr, struct Expression *src1,
|
struct Expression * src2);
|
||||||
struct Expression *src2);
|
void
|
||||||
void rpn_ADD(struct Expression *expr, struct Expression *src1,
|
rpn_LOGGE(struct Expression * expr, struct Expression * src1,
|
||||||
struct Expression *src2);
|
struct Expression * src2);
|
||||||
void rpn_SUB(struct Expression *expr, struct Expression *src1,
|
void
|
||||||
struct Expression *src2);
|
rpn_LOGLE(struct Expression * expr, struct Expression * src1,
|
||||||
void rpn_XOR(struct Expression *expr, struct Expression *src1,
|
struct Expression * src2);
|
||||||
struct Expression *src2);
|
void
|
||||||
void rpn_OR(struct Expression *expr, struct Expression *src1,
|
rpn_LOGNE(struct Expression * expr, struct Expression * src1,
|
||||||
struct Expression *src2);
|
struct Expression * src2);
|
||||||
void rpn_AND(struct Expression *expr, struct Expression *src1,
|
void
|
||||||
struct Expression *src2);
|
rpn_ADD(struct Expression * expr, struct Expression * src1,
|
||||||
void rpn_SHL(struct Expression *expr, struct Expression *src1,
|
struct Expression * src2);
|
||||||
struct Expression *src2);
|
void
|
||||||
void rpn_SHR(struct Expression *expr, struct Expression *src1,
|
rpn_SUB(struct Expression * expr, struct Expression * src1,
|
||||||
struct Expression *src2);
|
struct Expression * src2);
|
||||||
void rpn_MUL(struct Expression *expr, struct Expression *src1,
|
void
|
||||||
struct Expression *src2);
|
rpn_XOR(struct Expression * expr, struct Expression * src1,
|
||||||
void rpn_DIV(struct Expression *expr, struct Expression *src1,
|
struct Expression * src2);
|
||||||
struct Expression *src2);
|
void
|
||||||
void rpn_MOD(struct Expression *expr, struct Expression *src1,
|
rpn_OR(struct Expression * expr, struct Expression * src1,
|
||||||
struct Expression *src2);
|
struct Expression * src2);
|
||||||
void rpn_UNNEG(struct Expression *expr, struct Expression *src);
|
void
|
||||||
void rpn_UNNOT(struct Expression *expr, struct Expression *src);
|
rpn_AND(struct Expression * expr, struct Expression * src1,
|
||||||
UWORD rpn_PopByte(struct Expression *expr);
|
struct Expression * src2);
|
||||||
void rpn_Bank(struct Expression *expr, char *tzSym);
|
void
|
||||||
void rpn_Reset(struct Expression *expr);
|
rpn_SHL(struct Expression * expr, struct Expression * src1,
|
||||||
int rpn_RangeCheck(struct Expression *expr, struct Expression *src, SLONG low,
|
struct Expression * src2);
|
||||||
|
void
|
||||||
|
rpn_SHR(struct Expression * expr, struct Expression * src1,
|
||||||
|
struct Expression * src2);
|
||||||
|
void
|
||||||
|
rpn_MUL(struct Expression * expr, struct Expression * src1,
|
||||||
|
struct Expression * src2);
|
||||||
|
void
|
||||||
|
rpn_DIV(struct Expression * expr, struct Expression * src1,
|
||||||
|
struct Expression * src2);
|
||||||
|
void
|
||||||
|
rpn_MOD(struct Expression * expr, struct Expression * src1,
|
||||||
|
struct Expression * src2);
|
||||||
|
void rpn_UNNEG(struct Expression * expr, struct Expression * src);
|
||||||
|
void rpn_UNNOT(struct Expression * expr, struct Expression * src);
|
||||||
|
UWORD rpn_PopByte(struct Expression * expr);
|
||||||
|
void rpn_Bank(struct Expression * expr, char *tzSym);
|
||||||
|
void rpn_Reset(struct Expression * expr);
|
||||||
|
int
|
||||||
|
rpn_RangeCheck(struct Expression * expr, struct Expression * src, SLONG low,
|
||||||
SLONG high);
|
SLONG high);
|
||||||
#ifdef GAMEBOY
|
#ifdef GAMEBOY
|
||||||
void rpn_CheckHRAM(struct Expression *expr, struct Expression *src1);
|
void rpn_CheckHRAM(struct Expression * expr, struct Expression * src1);
|
||||||
#endif
|
#endif
|
||||||
#ifdef PCENGINE
|
#ifdef PCENGINE
|
||||||
void rpn_CheckZP(struct Expression *expr, struct Expression *src);
|
void rpn_CheckZP(struct Expression * expr, struct Expression * src);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -17,17 +17,23 @@ struct sSymbol {
|
|||||||
char *pMacro;
|
char *pMacro;
|
||||||
SLONG(*Callback) (struct sSymbol *);
|
SLONG(*Callback) (struct sSymbol *);
|
||||||
};
|
};
|
||||||
|
#define SYMF_RELOC 0x001 /* symbol will be reloc'ed during
|
||||||
#define SYMF_RELOC 0x001 /* symbol will be reloc'ed during linking, it's absolute value is unknown */
|
* linking, it's absolute value is
|
||||||
#define SYMF_EQU 0x002 /* symbol is defined using EQU, will not be changed during linking */
|
* unknown */
|
||||||
#define SYMF_SET 0x004 /* symbol is (re)defined using SET, will not be changed during linking */
|
#define SYMF_EQU 0x002 /* symbol is defined using EQU, will
|
||||||
|
* not be changed during linking */
|
||||||
|
#define SYMF_SET 0x004 /* symbol is (re)defined using SET,
|
||||||
|
* will not be changed during linking */
|
||||||
#define SYMF_EXPORT 0x008 /* symbol should be exported */
|
#define SYMF_EXPORT 0x008 /* symbol should be exported */
|
||||||
#define SYMF_IMPORT 0x010 /* symbol is imported, it's value is unknown */
|
#define SYMF_IMPORT 0x010 /* symbol is imported, it's value is
|
||||||
|
* unknown */
|
||||||
#define SYMF_LOCAL 0x020 /* symbol is a local symbol */
|
#define SYMF_LOCAL 0x020 /* symbol is a local symbol */
|
||||||
#define SYMF_DEFINED 0x040 /* symbol has been defined, not only referenced */
|
#define SYMF_DEFINED 0x040 /* symbol has been defined, not only
|
||||||
|
* referenced */
|
||||||
#define SYMF_MACRO 0x080 /* symbol is a macro */
|
#define SYMF_MACRO 0x080 /* symbol is a macro */
|
||||||
#define SYMF_STRING 0x100 /* symbol is a stringsymbol */
|
#define SYMF_STRING 0x100 /* symbol is a stringsymbol */
|
||||||
#define SYMF_CONST 0x200 /* symbol has a constant value, will not be changed during linking */
|
#define SYMF_CONST 0x200 /* symbol has a constant value, will
|
||||||
|
* not be changed during linking */
|
||||||
|
|
||||||
void sym_PrepPass1(void);
|
void sym_PrepPass1(void);
|
||||||
void sym_PrepPass2(void);
|
void sym_PrepPass2(void);
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ enum eBankDefine {
|
|||||||
BANK_VRAM,
|
BANK_VRAM,
|
||||||
BANK_HRAM
|
BANK_HRAM
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MAXBANKS 259
|
#define MAXBANKS 259
|
||||||
|
|
||||||
extern SLONG area_Avail(SLONG bank);
|
extern SLONG area_Avail(SLONG bank);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
extern void SetMapfileName(char *name);
|
extern void SetMapfileName(char *name);
|
||||||
extern void SetSymfileName(char *name);
|
extern void SetSymfileName(char *name);
|
||||||
extern void CloseMapfile(void);
|
extern void CloseMapfile(void);
|
||||||
extern void MapfileWriteSection(struct sSection *pSect);
|
extern void MapfileWriteSection(struct sSection * pSect);
|
||||||
extern void MapfileInitBank(SLONG bank);
|
extern void MapfileInitBank(SLONG bank);
|
||||||
extern void MapfileCloseBank(SLONG slack);
|
extern void MapfileCloseBank(SLONG slack);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user