From 87c9d819a16186785d4e7460b3ab0458efbcb013 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonio=20Ni=C3=B1o=20D=C3=ADaz?= Date: Sun, 31 Dec 2017 13:59:17 +0100 Subject: [PATCH] Replace SLONG by int32_t MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All affected `printf` have been fixed. Signed-off-by: Antonio Niño Díaz --- include/asm/asm.h | 3 +- include/asm/fstack.h | 5 +-- include/asm/main.h | 11 ++++--- include/asm/mymath.h | 28 ++++++++-------- include/asm/output.h | 8 ++--- include/asm/rpn.h | 2 +- include/asm/symbol.h | 10 +++--- include/link/assign.h | 8 +++-- include/link/library.h | 4 +-- include/link/main.h | 4 +-- include/link/mapfile.h | 10 +++--- include/link/mylink.h | 22 ++++++------- include/link/patch.h | 4 +-- include/link/symbol.h | 8 +++-- include/types.h | 1 - src/asm/asmy.y | 20 +++++------ src/asm/fstack.c | 10 +++--- src/asm/globlex.c | 27 +++++++-------- src/asm/main.c | 5 +-- src/asm/math.c | 61 +++++++++++++++++----------------- src/asm/output.c | 30 ++++++++--------- src/asm/symbol.c | 32 +++++++++--------- src/link/assign.c | 75 +++++++++++++++++++++--------------------- src/link/main.c | 5 +-- src/link/mapfile.c | 29 ++++++++-------- src/link/object.c | 14 ++++---- src/link/patch.c | 26 +++++++-------- src/link/symbol.c | 17 +++++----- 28 files changed, 247 insertions(+), 232 deletions(-) diff --git a/include/asm/asm.h b/include/asm/asm.h index 231433aa..b1d79a9a 100644 --- a/include/asm/asm.h +++ b/include/asm/asm.h @@ -10,6 +10,7 @@ #define RGBDS_ASM_ASM_H #include +#include #include #include @@ -22,7 +23,7 @@ #define MAXMACROARGS 256 #define MAXINCPATHS 128 -extern SLONG nLineNo; +extern int32_t nLineNo; extern ULONG nTotalLines; extern ULONG nPC; extern ULONG nPass; diff --git a/include/asm/fstack.h b/include/asm/fstack.h index 3d5b909a..65ba3cf6 100644 --- a/include/asm/fstack.h +++ b/include/asm/fstack.h @@ -9,6 +9,7 @@ #ifndef RGBDS_ASM_FSTACK_H #define RGBDS_ASM_FSTACK_H +#include #include #include "asm/asm.h" @@ -21,7 +22,7 @@ struct sContext { struct sContext *pNext; char tzFileName[_MAX_PATH + 1]; char *tzMacroArgs[MAXMACROARGS + 1]; - SLONG nLine; + int32_t nLine; ULONG nStatus; FILE *pFile; char *pREPTBlock; @@ -31,7 +32,7 @@ struct sContext { void fstk_RunInclude(char *); -extern void fstk_RunMacroArg(SLONG s); +extern void fstk_RunMacroArg(int32_t s); void fstk_Init(char *); extern void fstk_Dump(void); diff --git a/include/asm/main.h b/include/asm/main.h index 7fa446bb..72e09850 100644 --- a/include/asm/main.h +++ b/include/asm/main.h @@ -1,13 +1,14 @@ -#ifndef RGBDS_MAIN_H -#define RGBDS_MAIN_H +#ifndef RGBDS_MAIN_H +#define RGBDS_MAIN_H +#include #include #include "extern/stdnoreturn.h" struct sOptions { char gbgfx[4]; char binary[2]; - SLONG fillchar; + int32_t fillchar; bool verbose; bool haltnop; bool exportall; @@ -17,8 +18,8 @@ struct sOptions { extern char *tzNewMacro; extern ULONG ulNewMacroSize; -extern SLONG nGBGfxID; -extern SLONG nBinaryID; +extern int32_t nGBGfxID; +extern int32_t nBinaryID; extern struct sOptions DefaultOptions; extern struct sOptions CurrentOptions; diff --git a/include/asm/mymath.h b/include/asm/mymath.h index 69a83838..246009d7 100644 --- a/include/asm/mymath.h +++ b/include/asm/mymath.h @@ -1,21 +1,21 @@ #ifndef RGBDS_ASM_MATH_H #define RGBDS_ASM_MATH_H -#include "types.h" +#include void math_DefinePI(void); -void math_Print(SLONG i); -SLONG math_Sin(SLONG i); -SLONG math_Cos(SLONG i); -SLONG math_Tan(SLONG i); -SLONG math_ASin(SLONG i); -SLONG math_ACos(SLONG i); -SLONG math_ATan(SLONG i); -SLONG math_ATan2(SLONG i, SLONG j); -SLONG math_Mul(SLONG i, SLONG j); -SLONG math_Div(SLONG i, SLONG j); -SLONG math_Round(SLONG i); -SLONG math_Ceil(SLONG i); -SLONG math_Floor(SLONG i); +void math_Print(int32_t i); +int32_t math_Sin(int32_t i); +int32_t math_Cos(int32_t i); +int32_t math_Tan(int32_t i); +int32_t math_ASin(int32_t i); +int32_t math_ACos(int32_t i); +int32_t math_ATan(int32_t i); +int32_t math_ATan2(int32_t i, int32_t j); +int32_t math_Mul(int32_t i, int32_t j); +int32_t math_Div(int32_t i, int32_t j); +int32_t math_Round(int32_t i); +int32_t math_Ceil(int32_t i); +int32_t math_Floor(int32_t i); #endif diff --git a/include/asm/output.h b/include/asm/output.h index 71c7894b..ebf92c4b 100644 --- a/include/asm/output.h +++ b/include/asm/output.h @@ -22,8 +22,8 @@ struct Section { void out_PrepPass2(void); void out_SetFileName(char *s); void out_NewSection(char *pzName, ULONG secttype); -void out_NewAbsSection(char *pzName, ULONG secttype, SLONG org, SLONG bank); -void out_NewAlignedSection(char *pzName, ULONG secttype, SLONG alignment, SLONG bank); +void out_NewAbsSection(char *pzName, ULONG secttype, int32_t org, int32_t bank); +void out_NewAlignedSection(char *pzName, ULONG secttype, int32_t alignment, int32_t bank); void out_AbsByte(int b); void out_AbsByteGroup(char *s, int length); void out_RelByte(struct Expression * expr); @@ -32,9 +32,9 @@ void out_PCRelByte(struct Expression * expr); void out_WriteObject(void); void out_Skip(int skip); void out_BinaryFile(char *s); -void out_BinaryFileSlice(char *s, SLONG start_pos, SLONG length); +void out_BinaryFileSlice(char *s, int32_t start_pos, int32_t length); void out_String(char *s); -void out_AbsLong(SLONG b); +void out_AbsLong(int32_t b); void out_RelLong(struct Expression * expr); void out_PushSection(void); void out_PopSection(void); diff --git a/include/asm/rpn.h b/include/asm/rpn.h index 72e22906..7e54697a 100644 --- a/include/asm/rpn.h +++ b/include/asm/rpn.h @@ -4,7 +4,7 @@ #include struct Expression { - SLONG nVal; + int32_t nVal; uint8_t tRPN[256]; ULONG nRPNLength; ULONG nRPNOut; diff --git a/include/asm/symbol.h b/include/asm/symbol.h index 105bbc3f..4eb6bc0d 100644 --- a/include/asm/symbol.h +++ b/include/asm/symbol.h @@ -10,14 +10,14 @@ struct sSymbol { char tzName[MAXSYMLEN + 1]; - SLONG nValue; + int32_t nValue; ULONG nType; struct sSymbol *pScope; struct sSymbol *pNext; struct Section *pSection; ULONG ulMacroSize; char *pMacro; - SLONG(*Callback) (struct sSymbol *); + int32_t(*Callback) (struct sSymbol *); char tzFileName[_MAX_PATH + 1]; /* File where the symbol was defined. */ ULONG nFileLine; /* Line where the symbol was defined. */ }; @@ -54,14 +54,14 @@ void sym_SaveCurrentMacroArgs(char *save[]); void sym_RestoreCurrentMacroArgs(char *save[]); void sym_UseNewMacroArgs(void); void sym_FreeCurrentMacroArgs(void); -void sym_AddEqu(char *tzSym, SLONG value); -void sym_AddSet(char *tzSym, SLONG value); +void sym_AddEqu(char *tzSym, int32_t value); +void sym_AddSet(char *tzSym, int32_t value); void sym_Init(void); ULONG sym_GetConstantValue(char *s); ULONG sym_isConstant(char *s); struct sSymbol *sym_FindSymbol(char *tzName); void sym_Global(char *tzSym); -char *sym_FindMacroArg(SLONG i); +char *sym_FindMacroArg(int32_t i); char *sym_GetStringValue(char *tzSym); void sym_UseCurrentMacroArgs(void); void sym_SetMacroArgID(ULONG nMacroCount); diff --git a/include/link/assign.h b/include/link/assign.h index cbe621e3..41d7402a 100644 --- a/include/link/assign.h +++ b/include/link/assign.h @@ -1,6 +1,8 @@ #ifndef RGBDS_LINK_ASSIGN_H #define RGBDS_LINK_ASSIGN_H +#include + #include "mylink.h" #include "types.h" @@ -29,11 +31,11 @@ enum eBankDefine { #define MAXBANKS (BANK_COUNT_ROM0 + BANK_COUNT_ROMX + BANK_COUNT_WRAM0 + BANK_COUNT_WRAMX \ + BANK_COUNT_VRAM + BANK_COUNT_OAM + BANK_COUNT_HRAM + BANK_COUNT_SRAM) -extern SLONG area_Avail(SLONG bank); +extern int32_t area_Avail(int32_t bank); extern void AssignSections(void); extern void CreateSymbolTable(void); -extern SLONG MaxBankUsed; -extern SLONG MaxAvail[MAXBANKS]; +extern int32_t MaxBankUsed; +extern int32_t MaxAvail[MAXBANKS]; int IsSectionNameInUse(const char *name); diff --git a/include/link/library.h b/include/link/library.h index 54c33d83..f1a9c722 100644 --- a/include/link/library.h +++ b/include/link/library.h @@ -1,5 +1,5 @@ -#ifndef RGBDS_LINK_LIBRARY_H -#define RGBDS_LINK_LIBRARY_H +#ifndef RGBDS_LINK_LIBRARY_H +#define RGBDS_LINK_LIBRARY_H extern void AddNeededModules(void); diff --git a/include/link/main.h b/include/link/main.h index 218ca6d0..576eda99 100644 --- a/include/link/main.h +++ b/include/link/main.h @@ -1,9 +1,9 @@ #ifndef RGBDS_LINK_MAIN_H #define RGBDS_LINK_MAIN_H -#include "types.h" +#include -extern SLONG fillchar; +extern int32_t fillchar; extern char *smartlinkstartsymbol; #endif diff --git a/include/link/mapfile.h b/include/link/mapfile.h index 54bfe537..2d6cef4f 100644 --- a/include/link/mapfile.h +++ b/include/link/mapfile.h @@ -1,11 +1,13 @@ -#ifndef RGBDS_LINK_MAPFILE_H -#define RGBDS_LINK_MAPFILE_H +#ifndef RGBDS_LINK_MAPFILE_H +#define RGBDS_LINK_MAPFILE_H + +#include extern void SetMapfileName(char *name); extern void SetSymfileName(char *name); extern void CloseMapfile(void); extern void MapfileWriteSection(struct sSection * pSect); -extern void MapfileInitBank(SLONG bank); -extern void MapfileCloseBank(SLONG slack); +extern void MapfileInitBank(int32_t bank); +extern void MapfileCloseBank(int32_t slack); #endif diff --git a/include/link/mylink.h b/include/link/mylink.h index a3fad57e..034d8840 100644 --- a/include/link/mylink.h +++ b/include/link/mylink.h @@ -9,7 +9,7 @@ #include "types.h" -extern SLONG options; +extern int32_t options; #define OPT_TINY 0x01 #define OPT_SMART_C_LINK 0x02 #define OPT_OVERLAY 0x04 @@ -63,16 +63,16 @@ enum eSectionType { }; struct sSection { - SLONG nBank; - SLONG nOrg; - SLONG nAlign; + int32_t nBank; + int32_t nOrg; + int32_t nAlign; uint8_t oAssigned; char *pzName; - SLONG nByteSize; + int32_t nByteSize; enum eSectionType Type; uint8_t *pData; - SLONG nNumberOfSymbols; + int32_t nNumberOfSymbols; struct sSymbol **tSymbols; struct sPatch *pPatches; struct sSection *pNext; @@ -88,9 +88,9 @@ struct sSymbol { char *pzName; enum eSymbolType Type; /* the following 3 items only valid when Type!=SYM_IMPORT */ - SLONG nSectionID; /* internal to object.c */ + int32_t nSectionID; /* internal to object.c */ struct sSection *pSection; - SLONG nOffset; + int32_t nOffset; char *pzObjFileName; /* Object file where the symbol is located. */ char *pzFileName; /* Source file where the symbol was defined. */ ULONG nFileLine; /* Line where the symbol was defined. */ @@ -104,10 +104,10 @@ enum ePatchType { struct sPatch { char *pzFilename; - SLONG nLineNo; - SLONG nOffset; + int32_t nLineNo; + int32_t nOffset; enum ePatchType Type; - SLONG nRPNSize; + int32_t nRPNSize; uint8_t *pRPN; struct sPatch *pNext; uint8_t oRelocPatch; diff --git a/include/link/patch.h b/include/link/patch.h index 14fca34a..e82b83fd 100644 --- a/include/link/patch.h +++ b/include/link/patch.h @@ -1,9 +1,9 @@ #ifndef RGBDS_LINK_PATCH_H #define RGBDS_LINK_PATCH_H -#include "types.h" +#include void Patch(void); -extern SLONG nPC; +extern int32_t nPC; #endif diff --git a/include/link/symbol.h b/include/link/symbol.h index 806b12da..9c58ff04 100644 --- a/include/link/symbol.h +++ b/include/link/symbol.h @@ -1,12 +1,14 @@ #ifndef RGBDS_LINK_SYMBOL_H #define RGBDS_LINK_SYMBOL_H +#include + #include "types.h" void sym_Init(void); -void sym_CreateSymbol(char *tzName, SLONG nValue, SLONG nBank, +void sym_CreateSymbol(char *tzName, int32_t nValue, int32_t nBank, char *tzObjFileName, char *tzFileName, ULONG nFileLine); -SLONG sym_GetValue(char *tzName); -SLONG sym_GetBank(char *tzName); +int32_t sym_GetValue(char *tzName); +int32_t sym_GetBank(char *tzName); #endif diff --git a/include/types.h b/include/types.h index d660ff42..4306b183 100644 --- a/include/types.h +++ b/include/types.h @@ -6,6 +6,5 @@ #endif typedef unsigned long ULONG; -typedef signed long SLONG; #endif diff --git a/src/asm/asmy.y b/src/asm/asmy.y index bdbf4a39..bb02ae1b 100644 --- a/src/asm/asmy.y +++ b/src/asm/asmy.y @@ -22,9 +22,9 @@ char *tzNewMacro; ULONG ulNewMacroSize; void -bankrangecheck(char *name, ULONG secttype, SLONG org, SLONG bank) +bankrangecheck(char *name, ULONG secttype, int32_t org, int32_t bank) { - SLONG minbank = 0, maxbank = 0; + int32_t minbank = 0, maxbank = 0; char *stype = NULL; switch (secttype) { case SECT_ROMX: @@ -140,7 +140,7 @@ ULONG isEndr( char *s ) void copyrept( void ) { - SLONG level=1, len, instring=0; + int32_t level=1, len, instring=0; char *src=pCurrentBuffer->pBuffer; char *bufferEnd = pCurrentBuffer->pBufferStart + pCurrentBuffer->nBufferSize; @@ -220,7 +220,7 @@ ULONG isEndm( char *s ) void copymacro( void ) { - SLONG level=1, len, instring=0; + int32_t level=1, len, instring=0; char *src=pCurrentBuffer->pBuffer; char *bufferEnd = pCurrentBuffer->pBufferStart + pCurrentBuffer->nBufferSize; @@ -312,7 +312,7 @@ ULONG isEndc(char *s) void if_skip_to_else() { - SLONG level = 1; + int32_t level = 1; bool inString = false; char *src=pCurrentBuffer->pBuffer; @@ -367,7 +367,7 @@ void if_skip_to_else() fatalerror("Unterminated IF construct"); } - SLONG len = src - pCurrentBuffer->pBuffer; + int32_t len = src - pCurrentBuffer->pBuffer; yyskipbytes(len); yyunput('\n'); @@ -376,7 +376,7 @@ void if_skip_to_else() void if_skip_to_endc() { - SLONG level = 1; + int32_t level = 1; bool inString = false; char *src=pCurrentBuffer->pBuffer; @@ -425,7 +425,7 @@ void if_skip_to_endc() fatalerror("Unterminated IF construct"); } - SLONG len = src - pCurrentBuffer->pBuffer; + int32_t len = src - pCurrentBuffer->pBuffer; yyskipbytes(len); yyunput('\n'); @@ -467,7 +467,7 @@ void updateUnion() { char tzSym[MAXSYMLEN + 1]; char tzString[MAXSTRLEN + 1]; struct Expression sVal; - SLONG nConstValue; + int32_t nConstValue; } %type relocconst @@ -922,7 +922,7 @@ printt : T_POP_PRINTT string printv : T_POP_PRINTV const { if( nPass==1 ) - printf( "$%lX", $2 ); + printf( "$%X", $2 ); } ; diff --git a/src/asm/fstack.c b/src/asm/fstack.c index daf07b90..cf4258f4 100644 --- a/src/asm/fstack.c +++ b/src/asm/fstack.c @@ -28,7 +28,7 @@ FILE *pCurrentFile; ULONG nCurrentStatus; char tzCurrentFileName[_MAX_PATH + 1]; char IncludePaths[MAXINCPATHS][_MAX_PATH + 1]; -SLONG NextIncPath = 0; +int32_t NextIncPath = 0; ULONG nMacroCount; char *pCurrentREPTBlock; @@ -200,12 +200,12 @@ fstk_Dump(void) pLastFile = pFileStack; while (pLastFile) { - fprintf(stderr, "%s(%ld) -> ", pLastFile->tzFileName, - pLastFile->nLine); + fprintf(stderr, "%s(%d) -> ", pLastFile->tzFileName, + pLastFile->nLine); pLastFile = pLastFile->pNext; } - fprintf(stderr, "%s(%ld)", tzCurrentFileName, nLineNo); + fprintf(stderr, "%s(%d)", tzCurrentFileName, nLineNo); } /* @@ -320,7 +320,7 @@ fstk_RunMacro(char *s) * Set up a macroargument for parsing */ void -fstk_RunMacroArg(SLONG s) +fstk_RunMacroArg(int32_t s) { char *sym; diff --git a/src/asm/globlex.c b/src/asm/globlex.c index 1a523773..55bb8f6a 100644 --- a/src/asm/globlex.c +++ b/src/asm/globlex.c @@ -8,19 +8,20 @@ #include "asmy.h" #include +#include #include #include #include #include bool oDontExpandStrings = false; -SLONG nGBGfxID = -1; -SLONG nBinaryID = -1; +int32_t nGBGfxID = -1; +int32_t nBinaryID = -1; -SLONG +int32_t gbgfx2bin(char ch) { - SLONG i; + int32_t i; for (i = 0; i <= 3; i += 1) { if (CurrentOptions.gbgfx[i] == ch) { @@ -31,10 +32,10 @@ gbgfx2bin(char ch) return (0); } -SLONG +int32_t binary2bin(char ch) { - SLONG i; + int32_t i; for (i = 0; i <= 1; i += 1) { if (CurrentOptions.binary[i] == ch) { @@ -45,7 +46,7 @@ binary2bin(char ch) return (0); } -SLONG +int32_t char2bin(char ch) { if (ch >= 'a' && ch <= 'f') @@ -60,13 +61,13 @@ char2bin(char ch) return (0); } -typedef SLONG(*x2bin) (char ch); +typedef int32_t(*x2bin) (char ch); -SLONG +int32_t ascii2bin(char *s) { - SLONG radix = 10; - SLONG result = 0; + int32_t radix = 10; + int32_t result = 0; x2bin convertfunc = char2bin; switch (*s) { @@ -93,7 +94,7 @@ ascii2bin(char *s) } if (radix == 4) { - SLONG c; + int32_t c; while (*s != '\0') { c = convertfunc(*s++); @@ -128,7 +129,7 @@ ParseFixedPoint(char *s, ULONG size) yyunputbytes(size); - yylval.nConstValue = (SLONG) (atof(s) * 65536); + yylval.nConstValue = (int32_t) (atof(s) * 65536); return (1); } diff --git a/src/asm/main.c b/src/asm/main.c index 2d826ce9..99af7610 100644 --- a/src/asm/main.c +++ b/src/asm/main.c @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -22,7 +23,7 @@ int cldefines_size; char **cldefines; clock_t nStartClock, nEndClock; -SLONG nLineNo; +int32_t nLineNo; ULONG nTotalLines, nPass, nPC, nIFDepth, nUnionDepth, nErrors; bool skipElif; ULONG unionStart[128], unionSize[128]; @@ -141,7 +142,7 @@ opt_Parse(char *s) if (strlen(&s[1]) <= 2) { int result; - result = sscanf(&s[1], "%lx", &newopt.fillchar); + result = sscanf(&s[1], "%x", &newopt.fillchar); if (!((result == EOF) || (result == 1))) { errx(1, "Invalid argument for option 'z'"); } diff --git a/src/asm/math.c b/src/asm/math.c index 23410bdd..8376c08f 100644 --- a/src/asm/math.c +++ b/src/asm/math.c @@ -3,6 +3,7 @@ */ #include +#include #include #include "types.h" @@ -10,7 +11,7 @@ #include "asm/symbol.h" #define fix2double(i) ((double)(i/65536.0)) -#define double2fix(d) ((SLONG)(d*65536.0)) +#define double2fix(d) ((int32_t)(d*65536.0)) #ifndef PI #define PI (acos(-1)) #endif @@ -28,21 +29,21 @@ math_DefinePI(void) * Print a fixed point value */ void -math_Print(SLONG i) +math_Print(int32_t i) { if (i >= 0) - printf("%ld.%05ld", i >> 16, - ((SLONG) (fix2double(i) * 100000 + 0.5)) % 100000); + printf("%d.%05d", i >> 16, + ((int32_t) (fix2double(i) * 100000 + 0.5)) % 100000); else - printf("-%ld.%05ld", (-i) >> 16, - ((SLONG) (fix2double(-i) * 100000 + 0.5)) % 100000); + printf("-%d.%05d", (-i) >> 16, + ((int32_t) (fix2double(-i) * 100000 + 0.5)) % 100000); } /* * Calculate sine */ -SLONG -math_Sin(SLONG i) +int32_t +math_Sin(int32_t i) { return (double2fix(sin(fix2double(i) * 2 * PI / 65536))); } @@ -50,8 +51,8 @@ math_Sin(SLONG i) /* * Calculate cosine */ -SLONG -math_Cos(SLONG i) +int32_t +math_Cos(int32_t i) { return (double2fix(cos(fix2double(i) * 2 * PI / 65536))); } @@ -59,8 +60,8 @@ math_Cos(SLONG i) /* * Calculate tangent */ -SLONG -math_Tan(SLONG i) +int32_t +math_Tan(int32_t i) { return (double2fix(tan(fix2double(i) * 2 * PI / 65536))); } @@ -68,8 +69,8 @@ math_Tan(SLONG i) /* * Calculate arcsine */ -SLONG -math_ASin(SLONG i) +int32_t +math_ASin(int32_t i) { return (double2fix(asin(fix2double(i)) / 2 / PI * 65536)); } @@ -77,8 +78,8 @@ math_ASin(SLONG i) /* * Calculate arccosine */ -SLONG -math_ACos(SLONG i) +int32_t +math_ACos(int32_t i) { return (double2fix(acos(fix2double(i)) / 2 / PI * 65536)); } @@ -86,8 +87,8 @@ math_ACos(SLONG i) /* * Calculate arctangent */ -SLONG -math_ATan(SLONG i) +int32_t +math_ATan(int32_t i) { return (double2fix(atan(fix2double(i)) / 2 / PI * 65536)); } @@ -95,8 +96,8 @@ math_ATan(SLONG i) /* * Calculate atan2 */ -SLONG -math_ATan2(SLONG i, SLONG j) +int32_t +math_ATan2(int32_t i, int32_t j) { return (double2fix (atan2(fix2double(i), fix2double(j)) / 2 / PI * 65536)); @@ -105,8 +106,8 @@ math_ATan2(SLONG i, SLONG j) /* * Multiplication */ -SLONG -math_Mul(SLONG i, SLONG j) +int32_t +math_Mul(int32_t i, int32_t j) { return (double2fix(fix2double(i) * fix2double(j))); } @@ -114,8 +115,8 @@ math_Mul(SLONG i, SLONG j) /* * Division */ -SLONG -math_Div(SLONG i, SLONG j) +int32_t +math_Div(int32_t i, int32_t j) { return (double2fix(fix2double(i) / fix2double(j))); } @@ -123,8 +124,8 @@ math_Div(SLONG i, SLONG j) /* * Round */ -SLONG -math_Round(SLONG i) +int32_t +math_Round(int32_t i) { return double2fix(round(fix2double(i))); } @@ -132,8 +133,8 @@ math_Round(SLONG i) /* * Ceil */ -SLONG -math_Ceil(SLONG i) +int32_t +math_Ceil(int32_t i) { return double2fix(ceil(fix2double(i))); } @@ -141,8 +142,8 @@ math_Ceil(SLONG i) /* * Floor */ -SLONG -math_Floor(SLONG i) +int32_t +math_Floor(int32_t i) { return double2fix(floor(fix2double(i))); } diff --git a/src/asm/output.c b/src/asm/output.c index a2f1cf75..9e7bb7bf 100644 --- a/src/asm/output.c +++ b/src/asm/output.c @@ -253,7 +253,7 @@ writesymbol(struct sSymbol * pSym, FILE * f) char symname[MAXSYMLEN * 2 + 1]; ULONG type; ULONG offset; - SLONG sectid; + int32_t sectid; if (pSym->nType & SYMF_IMPORT) { /* Symbol should be imported */ @@ -564,7 +564,7 @@ out_SetFileName(char *s) * Find a section by name and type. If it doesn't exist, create it */ struct Section * -out_FindSection(char *pzName, ULONG secttype, SLONG org, SLONG bank, SLONG alignment) +out_FindSection(char *pzName, ULONG secttype, int32_t org, int32_t bank, int32_t alignment) { struct Section *pSect, **ppSect; @@ -646,7 +646,7 @@ out_NewSection(char *pzName, ULONG secttype) * Set the current section by name and type */ void -out_NewAbsSection(char *pzName, ULONG secttype, SLONG org, SLONG bank) +out_NewAbsSection(char *pzName, ULONG secttype, int32_t org, int32_t bank) { out_SetCurrentSection(out_FindSection(pzName, secttype, org, bank, 1)); } @@ -655,7 +655,7 @@ out_NewAbsSection(char *pzName, ULONG secttype, SLONG org, SLONG bank) * Set the current section by name and type, using a given byte alignment */ void -out_NewAlignedSection(char *pzName, ULONG secttype, SLONG alignment, SLONG bank) +out_NewAlignedSection(char *pzName, ULONG secttype, int32_t alignment, int32_t bank) { if (alignment < 0 || alignment > 16) { yyerror("Alignment must be between 0-16 bits."); @@ -805,10 +805,10 @@ out_RelWord(struct Expression * expr) * Output an absolute longword */ void -out_AbsLong(SLONG b) +out_AbsLong(int32_t b) { checkcodesection(); - checksectionoverflow(sizeof(SLONG)); + checksectionoverflow(sizeof(int32_t)); if (nPass == 2) { pCurrentSection->tData[nPC] = b & 0xFF; pCurrentSection->tData[nPC + 1] = b >> 8; @@ -827,7 +827,7 @@ out_AbsLong(SLONG b) void out_RelLong(struct Expression * expr) { - SLONG b; + int32_t b; checkcodesection(); checksectionoverflow(4); @@ -854,7 +854,7 @@ out_RelLong(struct Expression * expr) void out_PCRelByte(struct Expression * expr) { - SLONG b = expr->nVal; + int32_t b = expr->nVal; checkcodesection(); checksectionoverflow(1); @@ -879,7 +879,7 @@ out_BinaryFile(char *s) err(1, "Unable to open incbin file '%s'", s); } - SLONG fsize; + int32_t fsize; fseek(f, 0, SEEK_END); fsize = ftell(f); @@ -889,8 +889,8 @@ out_BinaryFile(char *s) checksectionoverflow(fsize); if (nPass == 2) { - SLONG dest = nPC; - SLONG todo = fsize; + int32_t dest = nPC; + int32_t todo = fsize; while (todo--) pCurrentSection->tData[dest++] = fgetc(f); @@ -902,7 +902,7 @@ out_BinaryFile(char *s) } void -out_BinaryFileSlice(char *s, SLONG start_pos, SLONG length) +out_BinaryFileSlice(char *s, int32_t start_pos, int32_t length) { FILE *f; @@ -917,7 +917,7 @@ out_BinaryFileSlice(char *s, SLONG start_pos, SLONG length) err(1, "Unable to open included file '%s'", s); } - SLONG fsize; + int32_t fsize; fseek(f, 0, SEEK_END); fsize = ftell(f); @@ -934,8 +934,8 @@ out_BinaryFileSlice(char *s, SLONG start_pos, SLONG length) checksectionoverflow(length); if (nPass == 2) { - SLONG dest = nPC; - SLONG todo = length; + int32_t dest = nPC; + int32_t todo = length; while (todo--) pCurrentSection->tData[dest++] = fgetc(f); diff --git a/src/asm/symbol.c b/src/asm/symbol.c index 1d2eabec..498b5894 100644 --- a/src/asm/symbol.c +++ b/src/asm/symbol.c @@ -51,7 +51,7 @@ void helper_RemoveLeadingZeros(char * string){ memmove(string, new_beginning, strlen(new_beginning) + 1); } -SLONG +int32_t Callback_NARG(struct sSymbol * sym) { ULONG i = 0; @@ -62,7 +62,7 @@ Callback_NARG(struct sSymbol * sym) return (i); } -SLONG +int32_t Callback__LINE__(struct sSymbol __attribute__((unused)) * sym) { return (nLineNo); @@ -71,7 +71,7 @@ Callback__LINE__(struct sSymbol __attribute__((unused)) * sym) /* * Get the nValue field of a symbol */ -SLONG +int32_t getvaluefield(struct sSymbol * sym) { if (sym->Callback) { @@ -145,7 +145,7 @@ struct sSymbol ** findpsymbol(char *s, struct sSymbol * scope) { struct sSymbol **ppsym; - SLONG hash; + int32_t hash; char fullname[MAXSYMLEN + 1]; if (s[0] == '.' && scope) { @@ -411,7 +411,7 @@ sym_GetDefinedValue(char *s) void sym_ShiftCurrentMacroArgs(void) { - SLONG i; + int32_t i; free(currentmacroargs[0]); for (i = 0; i < MAXMACROARGS - 1; i += 1) { @@ -421,7 +421,7 @@ sym_ShiftCurrentMacroArgs(void) } char * -sym_FindMacroArg(SLONG i) +sym_FindMacroArg(int32_t i) { if (i == -1) i = MAXMACROARGS + 1; @@ -435,7 +435,7 @@ sym_FindMacroArg(SLONG i) void sym_UseNewMacroArgs(void) { - SLONG i; + int32_t i; for (i = 0; i <= MAXMACROARGS; i += 1) { currentmacroargs[i] = newmacroargs[i]; @@ -446,7 +446,7 @@ sym_UseNewMacroArgs(void) void sym_SaveCurrentMacroArgs(char *save[]) { - SLONG i; + int32_t i; for (i = 0; i <= MAXMACROARGS; i += 1) save[i] = currentmacroargs[i]; @@ -455,7 +455,7 @@ sym_SaveCurrentMacroArgs(char *save[]) void sym_RestoreCurrentMacroArgs(char *save[]) { - SLONG i; + int32_t i; for (i = 0; i <= MAXMACROARGS; i += 1) currentmacroargs[i] = save[i]; @@ -464,7 +464,7 @@ sym_RestoreCurrentMacroArgs(char *save[]) void sym_FreeCurrentMacroArgs(void) { - SLONG i; + int32_t i; for (i = 0; i <= MAXMACROARGS; i += 1) { free(currentmacroargs[i]); @@ -475,7 +475,7 @@ sym_FreeCurrentMacroArgs(void) void sym_AddNewMacroArg(char *s) { - SLONG i = 0; + int32_t i = 0; while (i < MAXMACROARGS && newmacroargs[i] != NULL) i += 1; @@ -501,7 +501,7 @@ sym_SetMacroArgID(ULONG nMacroCount) void sym_UseCurrentMacroArgs(void) { - SLONG i; + int32_t i; for (i = 1; i <= MAXMACROARGS; i += 1) sym_AddNewMacroArg(sym_FindMacroArg(i)); @@ -520,7 +520,7 @@ sym_FindMacro(char *s) * Add an equated symbol */ void -sym_AddEqu(char *tzSym, SLONG value) +sym_AddEqu(char *tzSym, int32_t value) { if ((nPass == 1) || ((nPass == 2) && (sym_isDefined(tzSym) == 0))) { @@ -598,7 +598,7 @@ sym_isString(char *tzSym) * Alter a SET symbols value */ void -sym_AddSet(char *tzSym, SLONG value) +sym_AddSet(char *tzSym, int32_t value) { struct sSymbol *nsym; @@ -834,7 +834,7 @@ sym_PrepPass1(void) void sym_PrepPass2(void) { - SLONG i; + int32_t i; for (i = 0; i < HASHSIZE; i += 1) { struct sSymbol **ppSym = &(tHashedSymbols[i]); @@ -885,7 +885,7 @@ sym_PrepPass2(void) void sym_Init(void) { - SLONG i; + int32_t i; time_t now; for (i = 0; i < MAXMACROARGS; i += 1) { diff --git a/src/link/assign.c b/src/link/assign.c index 17d0dcd0..5ff4830e 100644 --- a/src/link/assign.c +++ b/src/link/assign.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -11,25 +12,25 @@ #include "link/symbol.h" struct sFreeArea { - SLONG nOrg; - SLONG nSize; + int32_t nOrg; + int32_t nSize; struct sFreeArea *pPrev, *pNext; }; struct sSectionAttributes { const char *name; - SLONG bank; - SLONG offset; // bank + offset = bank originally stored in a section struct - SLONG minBank; - SLONG bankCount; + int32_t bank; + int32_t offset; // bank + offset = bank originally stored in a section struct + int32_t minBank; + int32_t bankCount; }; struct sFreeArea *BankFree[MAXBANKS]; -SLONG MaxAvail[MAXBANKS]; -SLONG MaxBankUsed; -SLONG MaxWBankUsed; -SLONG MaxSBankUsed; -SLONG MaxVBankUsed; +int32_t MaxAvail[MAXBANKS]; +int32_t MaxBankUsed; +int32_t MaxWBankUsed; +int32_t MaxSBankUsed; +int32_t MaxVBankUsed; const enum eSectionType SECT_MIN = SECT_WRAM0; const enum eSectionType SECT_MAX = SECT_OAM; @@ -63,10 +64,10 @@ ensureSectionTypeIsValid(enum eSectionType type) } } -SLONG -area_Avail(SLONG bank) +int32_t +area_Avail(int32_t bank) { - SLONG r; + int32_t r; struct sFreeArea *pArea; r = 0; @@ -80,8 +81,8 @@ area_Avail(SLONG bank) return (r); } -SLONG -area_doAlloc(struct sFreeArea *pArea, SLONG org, SLONG size) +int32_t +area_doAlloc(struct sFreeArea *pArea, int32_t org, int32_t size) { if (org >= pArea->nOrg && (org + size) <= (pArea->nOrg + pArea->nSize)) { if (org == pArea->nOrg) { @@ -114,14 +115,14 @@ area_doAlloc(struct sFreeArea *pArea, SLONG org, SLONG size) return -1; } -SLONG -area_AllocAbs(struct sFreeArea ** ppArea, SLONG org, SLONG size) +int32_t +area_AllocAbs(struct sFreeArea ** ppArea, int32_t org, int32_t size) { struct sFreeArea *pArea; pArea = *ppArea; while (pArea) { - SLONG result = area_doAlloc(pArea, org, size); + int32_t result = area_doAlloc(pArea, org, size); if (result != -1) { return result; } @@ -133,13 +134,13 @@ area_AllocAbs(struct sFreeArea ** ppArea, SLONG org, SLONG size) return -1; } -SLONG -area_AllocAbsAnyBank(SLONG org, SLONG size, enum eSectionType type) +int32_t +area_AllocAbsAnyBank(int32_t org, int32_t size, enum eSectionType type) { ensureSectionTypeIsValid(type); - SLONG startBank = SECT_ATTRIBUTES[type].bank; - SLONG bankCount = SECT_ATTRIBUTES[type].bankCount; + int32_t startBank = SECT_ATTRIBUTES[type].bank; + int32_t bankCount = SECT_ATTRIBUTES[type].bankCount; for (int i = 0; i < bankCount; i++) { if (area_AllocAbs(&BankFree[startBank + i], org, size) != -1) { @@ -150,8 +151,8 @@ area_AllocAbsAnyBank(SLONG org, SLONG size, enum eSectionType type) return -1; } -SLONG -area_Alloc(struct sFreeArea ** ppArea, SLONG size, SLONG alignment) { +int32_t +area_Alloc(struct sFreeArea ** ppArea, int32_t size, int32_t alignment) { struct sFreeArea *pArea; if (alignment < 1) { alignment = 1; @@ -159,13 +160,13 @@ area_Alloc(struct sFreeArea ** ppArea, SLONG size, SLONG alignment) { pArea = *ppArea; while (pArea) { - SLONG org = pArea->nOrg; + int32_t org = pArea->nOrg; if (org % alignment) { org += alignment; } org -= org % alignment; - SLONG result = area_doAlloc(pArea, org, size); + int32_t result = area_doAlloc(pArea, org, size); if (result != -1) { return result; } @@ -177,15 +178,15 @@ area_Alloc(struct sFreeArea ** ppArea, SLONG size, SLONG alignment) { return -1; } -SLONG -area_AllocAnyBank(SLONG size, SLONG alignment, enum eSectionType type) { +int32_t +area_AllocAnyBank(int32_t size, int32_t alignment, enum eSectionType type) { ensureSectionTypeIsValid(type); - SLONG startBank = SECT_ATTRIBUTES[type].bank; - SLONG bankCount = SECT_ATTRIBUTES[type].bankCount; + int32_t startBank = SECT_ATTRIBUTES[type].bank; + int32_t bankCount = SECT_ATTRIBUTES[type].bankCount; for (int i = 0; i < bankCount; i++) { - SLONG org = area_Alloc(&BankFree[startBank + i], size, alignment); + int32_t org = area_Alloc(&BankFree[startBank + i], size, alignment); if (org != -1) { return ((startBank + i) << 16) | org; } @@ -198,8 +199,8 @@ struct sSection * FindLargestSection(enum eSectionType type, bool bankFixed) { struct sSection *pSection, *r = NULL; - SLONG nLargest = 0; - SLONG nLargestAlignment = 0; + int32_t nLargest = 0; + int32_t nLargestAlignment = 0; pSection = pSections; while (pSection) { @@ -332,7 +333,7 @@ AssignFloatingBankSections(enum eSectionType type) struct sSection *pSection; while ((pSection = FindLargestSection(type, false))) { - SLONG org; + int32_t org; if ((org = area_AllocAnyBank(pSection->nByteSize, pSection->nAlign, type)) != -1) { if (options & OPT_OVERLAY) { @@ -370,7 +371,7 @@ SetLinkerscriptName(char *tzLinkerscriptFile) void AssignSections(void) { - SLONG i; + int32_t i; struct sSection *pSection; MaxBankUsed = 0; @@ -557,7 +558,7 @@ CreateSymbolTable(void) pSect = pSections; while (pSect) { - SLONG i; + int32_t i; i = pSect->nNumberOfSymbols; diff --git a/src/link/main.c b/src/link/main.c index effa4e85..2e8c5885 100644 --- a/src/link/main.c +++ b/src/link/main.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -21,8 +22,8 @@ enum eBlockType { BLOCK_OUTPUT }; -SLONG options = 0; -SLONG fillchar = 0; +int32_t options = 0; +int32_t fillchar = 0; char *smartlinkstartsymbol; /* diff --git a/src/link/mapfile.c b/src/link/mapfile.c index 0fa99674..e75cbce8 100644 --- a/src/link/mapfile.c +++ b/src/link/mapfile.c @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -10,8 +11,8 @@ FILE *mf = NULL; FILE *sf = NULL; -SLONG currentbank = 0; -SLONG sfbank; +int32_t currentbank = 0; +int32_t sfbank; void SetMapfileName(char *name) @@ -49,26 +50,26 @@ CloseMapfile(void) } void -MapfileInitBank(SLONG bank) +MapfileInitBank(int32_t bank) { if (mf) { currentbank = bank; if (bank == BANK_ROM0) fprintf(mf, "ROM Bank #0 (HOME):\n"); else if (bank < BANK_WRAM0) - fprintf(mf, "ROM Bank #%ld:\n", bank); + fprintf(mf, "ROM Bank #%d:\n", bank); else if (bank == BANK_WRAM0) fprintf(mf, "WRAM Bank #0:\n"); else if (bank < BANK_VRAM) - fprintf(mf, "WRAM Bank #%ld:\n", bank - BANK_WRAMX + 1); + fprintf(mf, "WRAM Bank #%d:\n", bank - BANK_WRAMX + 1); else if (bank == BANK_HRAM) fprintf(mf, "HRAM:\n"); else if (bank == BANK_VRAM || bank == BANK_VRAM + 1) - fprintf(mf, "VRAM Bank #%ld:\n", bank - BANK_VRAM); + fprintf(mf, "VRAM Bank #%d:\n", bank - BANK_VRAM); else if (bank == BANK_OAM) fprintf(mf, "OAM:\n"); else if (bank < MAXBANKS) - fprintf(mf, "SRAM Bank #%ld:\n", bank - BANK_SRAM); + fprintf(mf, "SRAM Bank #%d:\n", bank - BANK_SRAM); } if (sf) { if (bank < BANK_WRAM0) @@ -93,15 +94,15 @@ MapfileInitBank(SLONG bank) void MapfileWriteSection(struct sSection * pSect) { - SLONG i; + int32_t i; if (mf) { if (pSect->nByteSize > 0) { - fprintf(mf, " SECTION: $%04lX-$%04lX ($%04lX bytes) [\"%s\"]\n", + fprintf(mf, " SECTION: $%04X-$%04X ($%04X bytes) [\"%s\"]\n", pSect->nOrg, pSect->nOrg + pSect->nByteSize - 1, pSect->nByteSize, pSect->pzName); } else { - fprintf(mf, " SECTION: $%04lX ($0 bytes) [\"%s\"]\n", + fprintf(mf, " SECTION: $%04X ($0 bytes) [\"%s\"]\n", pSect->nOrg, pSect->pzName); } } @@ -112,12 +113,12 @@ MapfileWriteSection(struct sSection * pSect) if ((pSym->pSection == pSect) && (pSym->Type != SYM_IMPORT)) { if (mf) { - fprintf(mf, " $%04lX = %s\n", + fprintf(mf, " $%04X = %s\n", pSym->nOffset + pSect->nOrg, pSym->pzName); } if (sf) { - fprintf(sf, "%02lX:%04lX %s\n", sfbank, + fprintf(sf, "%02X:%04X %s\n", sfbank, pSym->nOffset + pSect->nOrg, pSym->pzName); } @@ -126,7 +127,7 @@ MapfileWriteSection(struct sSection * pSect) } void -MapfileCloseBank(SLONG slack) +MapfileCloseBank(int32_t slack) { if (!mf) return; @@ -134,5 +135,5 @@ MapfileCloseBank(SLONG slack) if (slack == MaxAvail[currentbank]) fprintf(mf, " EMPTY\n\n"); else - fprintf(mf, " SLACK: $%04lX bytes\n\n", slack); + fprintf(mf, " SLACK: $%04X bytes\n\n", slack); } diff --git a/src/link/object.c b/src/link/object.c index 0bad5707..ac6300e5 100644 --- a/src/link/object.c +++ b/src/link/object.c @@ -27,10 +27,10 @@ uint8_t oReadLib = 0; * */ -SLONG +int32_t readlong(FILE * f) { - SLONG r; + int32_t r; r = fgetc(f); r |= fgetc(f) << 8; @@ -55,7 +55,7 @@ readword(FILE * f) * Read a NULL terminated string from a file * */ -SLONG +int32_t readasciiz(char **dest, FILE *f) { size_t r = 0; @@ -226,7 +226,7 @@ obj_ReadRGBSection(FILE * f) err(1, NULL); } - SLONG nNumberOfPatches; + int32_t nNumberOfPatches; struct sPatch **ppPatch, *pPatch; if (fread(pSection->pData, sizeof(uint8_t), @@ -281,7 +281,7 @@ void obj_ReadRGB(FILE * pObjfile, char *tzObjectfile) { struct sSection *pFirstSection; - SLONG nNumberOfSymbols, nNumberOfSections, i; + int32_t nNumberOfSymbols, nNumberOfSections, i; nNumberOfSymbols = readlong(pObjfile); nNumberOfSections = readlong(pObjfile); @@ -322,7 +322,7 @@ obj_ReadRGB(FILE * pObjfile, char *tzObjectfile) if (tSymbols[i]->Type != SYM_IMPORT && tSymbols[i]->nSectionID != -1) { - SLONG j = 0; + int32_t j = 0; while (j != tSymbols[i]->nSectionID) { j += 1; pConvSect = pConvSect->pNext; @@ -381,7 +381,7 @@ obj_Readfile(char *tzObjectfile) oReadLib = 0; } -SLONG +int32_t file_Length(FILE * f) { ULONG r, p; diff --git a/src/link/patch.c b/src/link/patch.c index 59c9276e..72cbd428 100644 --- a/src/link/patch.c +++ b/src/link/patch.c @@ -10,24 +10,24 @@ #include "link/main.h" struct sSection *pCurrentSection; -SLONG rpnstack[256]; -SLONG rpnp; -SLONG nPC; +int32_t rpnstack[256]; +int32_t rpnp; +int32_t nPC; void -rpnpush(SLONG i) +rpnpush(int32_t i) { rpnstack[rpnp++] = i; } -SLONG +int32_t rpnpop(void) { return (rpnstack[--rpnp]); } -SLONG -getsymvalue(SLONG symid) +int32_t +getsymvalue(int32_t symid) { switch (pCurrentSection->tSymbols[symid]->Type) { case SYM_IMPORT: @@ -52,10 +52,10 @@ getsymvalue(SLONG symid) errx(1, "*INTERNAL* UNKNOWN SYMBOL TYPE"); } -SLONG -getsymbank(SLONG symid) +int32_t +getsymbank(int32_t symid) { - SLONG nBank; + int32_t nBank; switch (pCurrentSection->tSymbols[symid]->Type) { case SYM_IMPORT: @@ -83,10 +83,10 @@ getsymbank(SLONG symid) return nBank; } -SLONG +int32_t calcrpn(struct sPatch * pPatch) { - SLONG t, size; + int32_t t, size; uint8_t *rpn; rpnp = 0; @@ -224,7 +224,7 @@ Patch(void) pCurrentSection = pSect; pPatch = pSect->pPatches; while (pPatch) { - SLONG t; + int32_t t; nPC = pSect->nOrg + pPatch->nOffset; t = calcrpn(pPatch); diff --git a/src/link/symbol.c b/src/link/symbol.c index 10e51c49..20b555ee 100644 --- a/src/link/symbol.c +++ b/src/link/symbol.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -11,8 +12,8 @@ struct ISymbol { char *pzName; - SLONG nValue; - SLONG nBank; /* -1 = constant */ + int32_t nValue; + int32_t nBank; /* -1 = constant */ char tzObjFileName[_MAX_PATH + 1]; /* Object file where the symbol was defined. */ char tzFileName[_MAX_PATH + 1]; /* Source file where the symbol was defined. */ ULONG nFileLine; /* Line where the symbol was defined. */ @@ -21,10 +22,10 @@ struct ISymbol { struct ISymbol *tHash[HASHSIZE]; -SLONG +int32_t calchash(char *s) { - SLONG r = 0; + int32_t r = 0; while (*s) r += *s++; @@ -34,12 +35,12 @@ calchash(char *s) void sym_Init(void) { - SLONG i; + int32_t i; for (i = 0; i < HASHSIZE; i += 1) tHash[i] = NULL; } -SLONG +int32_t sym_GetValue(char *tzName) { if (strcmp(tzName, "@") == 0) { @@ -60,7 +61,7 @@ sym_GetValue(char *tzName) } } -SLONG +int32_t sym_GetBank(char *tzName) { struct ISymbol **ppSym; @@ -78,7 +79,7 @@ sym_GetBank(char *tzName) } void -sym_CreateSymbol(char *tzName, SLONG nValue, SLONG nBank, char *tzObjFileName, +sym_CreateSymbol(char *tzName, int32_t nValue, int32_t nBank, char *tzObjFileName, char *tzFileName, ULONG nFileLine) { if (strcmp(tzName, "@") == 0)