ref: e50e3e5a23b8f72d5f4809e1d9ceebe1c6cccaa8
parent: f63339472e0de6281f61ef0c8eea7ca181fa298a
author: AntonioND <[email protected]>
date: Sun Apr 2 13:46:07 EDT 2017
Remove trailing whitespace Signed-off-by: AntonioND <[email protected]>
--- a/include/asm/rpn.h
+++ b/include/asm/rpn.h
@@ -15,58 +15,58 @@
void rpn_Symbol(struct Expression * expr, char *tzSym);
void rpn_Number(struct Expression * expr, ULONG i);
void rpn_LOGNOT(struct Expression * expr, struct Expression * src1);
-void
+void
rpn_LOGOR(struct Expression * expr, struct Expression * src1,
struct Expression * src2);
-void
+void
rpn_LOGAND(struct Expression * expr, struct Expression * src1,
struct Expression * src2);
-void
+void
rpn_LOGEQU(struct Expression * expr, struct Expression * src1,
struct Expression * src2);
-void
+void
rpn_LOGGT(struct Expression * expr, struct Expression * src1,
struct Expression * src2);
-void
+void
rpn_LOGLT(struct Expression * expr, struct Expression * src1,
struct Expression * src2);
-void
+void
rpn_LOGGE(struct Expression * expr, struct Expression * src1,
struct Expression * src2);
-void
+void
rpn_LOGLE(struct Expression * expr, struct Expression * src1,
struct Expression * src2);
-void
+void
rpn_LOGNE(struct Expression * expr, struct Expression * src1,
struct Expression * src2);
-void
+void
rpn_ADD(struct Expression * expr, struct Expression * src1,
struct Expression * src2);
-void
+void
rpn_SUB(struct Expression * expr, struct Expression * src1,
struct Expression * src2);
-void
+void
rpn_XOR(struct Expression * expr, struct Expression * src1,
struct Expression * src2);
-void
+void
rpn_OR(struct Expression * expr, struct Expression * src1,
struct Expression * src2);
-void
+void
rpn_AND(struct Expression * expr, struct Expression * src1,
struct Expression * src2);
-void
+void
rpn_SHL(struct Expression * expr, struct Expression * src1,
struct Expression * src2);
-void
+void
rpn_SHR(struct Expression * expr, struct Expression * src1,
struct Expression * src2);
-void
+void
rpn_MUL(struct Expression * expr, struct Expression * src1,
struct Expression * src2);
-void
+void
rpn_DIV(struct Expression * expr, struct Expression * src1,
struct Expression * src2);
-void
+void
rpn_MOD(struct Expression * expr, struct Expression * src1,
struct Expression * src2);
void rpn_UNNEG(struct Expression * expr, struct Expression * src);
@@ -74,7 +74,7 @@
UWORD rpn_PopByte(struct Expression * expr);
void rpn_Bank(struct Expression * expr, char *tzSym);
void rpn_Reset(struct Expression * expr);
-int
+int
rpn_RangeCheck(struct Expression * expr, struct Expression * src, SLONG low,
SLONG high);
void rpn_CheckHRAM(struct Expression * expr, struct Expression * src1);
--- a/include/extern/stdnoreturn.h
+++ b/include/extern/stdnoreturn.h
@@ -12,5 +12,5 @@
#define noreturn _declspec( noreturn)
#else
/* unsupported, but no need to throw a fit */
- #define noreturn
+ #define noreturn
#endif
--- a/src/asm/fstack.c
+++ b/src/asm/fstack.c
@@ -47,7 +47,7 @@
/*
* Context push and pop
*/
-void
+void
pushcontext(void)
{
struct sContext **ppFileStack;
@@ -84,7 +84,7 @@
fatalerror("No memory for context");
}
-int
+int
popcontext(void)
{
struct sContext *pLastFile, **ppLastFile;
@@ -148,7 +148,7 @@
return (1);
}
-int
+int
yywrap(void)
{
return (popcontext());
@@ -157,7 +157,7 @@
/*
* Dump the context stack to stderr
*/
-void
+void
fstk_Dump(void)
{
struct sContext *pLastFile;
@@ -176,7 +176,7 @@
/*
* Extra includepath stuff
*/
-void
+void
fstk_AddIncludePath(char *s)
{
if (NextIncPath == MAXINCPATHS) {
@@ -202,7 +202,7 @@
}
for (i = 0; i < NextIncPath; ++i) {
- if (strlcpy(path, IncludePaths[i], sizeof path) >=
+ if (strlcpy(path, IncludePaths[i], sizeof path) >=
sizeof path) {
continue;
}
@@ -251,7 +251,7 @@
/*
* Set up a macro for parsing
*/
-ULONG
+ULONG
fstk_RunMacro(char *s)
{
struct sSymbol *sym;
@@ -278,7 +278,7 @@
/*
* Set up a macroargument for parsing
*/
-void
+void
fstk_RunMacroArg(SLONG s)
{
char *sym;
@@ -301,7 +301,7 @@
/*
* Set up a stringequate for parsing
*/
-void
+void
fstk_RunString(char *s)
{
struct sSymbol *pSym;
@@ -320,7 +320,7 @@
/*
* Set up a repeat block for parsing
*/
-void
+void
fstk_RunRept(ULONG count)
{
if (count) {
--- a/src/asm/globlex.c
+++ b/src/asm/globlex.c
@@ -17,7 +17,7 @@
SLONG nGBGfxID = -1;
SLONG nBinaryID = -1;
-SLONG
+SLONG
gbgfx2bin(char ch)
{
SLONG i;
@@ -31,7 +31,7 @@
return (0);
}
-SLONG
+SLONG
binary2bin(char ch)
{
SLONG i;
@@ -45,7 +45,7 @@
return (0);
}
-SLONG
+SLONG
char2bin(char ch)
{
if (ch >= 'a' && ch <= 'f')
@@ -62,7 +62,7 @@
typedef SLONG(*x2bin) (char ch);
-SLONG
+SLONG
ascii2bin(char *s)
{
SLONG radix = 10;
@@ -107,7 +107,7 @@
return (result);
}
-ULONG
+ULONG
ParseFixedPoint(char *s, ULONG size)
{
//char dest[256];
@@ -133,7 +133,7 @@
return (1);
}
-ULONG
+ULONG
ParseNumber(char *s, ULONG size)
{
char dest[256];
@@ -145,7 +145,7 @@
return (1);
}
-ULONG
+ULONG
ParseSymbol(char *src, ULONG size)
{
char dest[MAXSYMLEN + 1];
@@ -203,7 +203,7 @@
}
}
-ULONG
+ULONG
PutMacroArg(char *src, ULONG size)
{
char *s;
@@ -221,7 +221,7 @@
return (0);
}
-ULONG
+ULONG
PutUniqueArg(char *src, ULONG size)
{
char *s;
@@ -390,7 +390,7 @@
T_LEX_MACROUNIQUE
};
-void
+void
setuplex(void)
{
ULONG id;
--- a/src/asm/lexer.c
+++ b/src/asm/lexer.c
@@ -39,7 +39,7 @@
ULONG nFloating;
enum eLexerState lexerstate = LEX_STATE_NORMAL;
-void
+void
upperstring(char *s)
{
while (*s) {
@@ -48,7 +48,7 @@
}
}
-void
+void
lowerstring(char *s)
{
while (*s) {
@@ -57,19 +57,19 @@
}
}
-void
+void
yyskipbytes(ULONG count)
{
pLexBuffer += count;
}
-void
+void
yyunputbytes(ULONG count)
{
pLexBuffer -= count;
}
-void
+void
yyunput(char c)
{
if (pLexBuffer <= pLexBufferRealStart)
@@ -78,7 +78,7 @@
*(--pLexBuffer) = c;
}
-void
+void
yyunputstr(char *s)
{
int i, len;
@@ -92,19 +92,19 @@
*(--pLexBuffer) = s[i];
}
-void
+void
yy_switch_to_buffer(YY_BUFFER_STATE buf)
{
pCurrentBuffer = buf;
}
-void
+void
yy_set_state(enum eLexerState i)
{
lexerstate = i;
}
-void
+void
yy_delete_buffer(YY_BUFFER_STATE buf)
{
free(buf->pBufferStart - SAFETYMARGIN);
@@ -111,7 +111,7 @@
free(buf);
}
-YY_BUFFER_STATE
+YY_BUFFER_STATE
yy_scan_bytes(char *mem, ULONG size)
{
YY_BUFFER_STATE pBuffer;
@@ -132,7 +132,7 @@
return (NULL);
}
-YY_BUFFER_STATE
+YY_BUFFER_STATE
yy_create_buffer(FILE * f)
{
YY_BUFFER_STATE pBuffer;
@@ -219,7 +219,7 @@
}
}
-void
+void
lex_FloatDeleteRange(ULONG id, UWORD start, UWORD end)
{
lex_CheckCharacterRange(start, end);
@@ -230,7 +230,7 @@
}
}
-void
+void
lex_FloatAddRange(ULONG id, UWORD start, UWORD end)
{
lex_CheckCharacterRange(start, end);
@@ -241,7 +241,7 @@
}
}
-void
+void
lex_FloatDeleteFirstRange(ULONG id, UWORD start, UWORD end)
{
lex_CheckCharacterRange(start, end);
@@ -252,7 +252,7 @@
}
}
-void
+void
lex_FloatAddFirstRange(ULONG id, UWORD start, UWORD end)
{
lex_CheckCharacterRange(start, end);
@@ -263,7 +263,7 @@
}
}
-void
+void
lex_FloatDeleteSecondRange(ULONG id, UWORD start, UWORD end)
{
lex_CheckCharacterRange(start, end);
@@ -274,7 +274,7 @@
}
}
-void
+void
lex_FloatAddSecondRange(ULONG id, UWORD start, UWORD end)
{
lex_CheckCharacterRange(start, end);
@@ -302,7 +302,7 @@
return (&tLexFloat[i]);
}
-ULONG
+ULONG
lexcalchash(char *s)
{
ULONG hash = 0;
@@ -314,7 +314,7 @@
return (hash % LEXHASHSIZE);
}
-void
+void
lex_Init(void)
{
ULONG i;
@@ -333,7 +333,7 @@
nFloating = 0;
}
-void
+void
lex_AddStrings(struct sLexInitString * lex)
{
while (lex->tzName) {
@@ -757,7 +757,7 @@
return 0;
}
-ULONG
+ULONG
yylex(void)
{
switch (lexerstate) {
--- a/src/asm/main.c
+++ b/src/asm/main.c
@@ -42,7 +42,7 @@
struct sOptionStackEntry *pOptionStack = NULL;
-void
+void
opt_SetCurrentOptions(struct sOptions * pOpt)
{
if (nGBGfxID != -1) {
@@ -105,7 +105,7 @@
}
}
-void
+void
opt_Parse(char *s)
{
struct sOptions newopt;
@@ -154,7 +154,7 @@
opt_SetCurrentOptions(&newopt);
}
-void
+void
opt_Push(void)
{
struct sOptionStackEntry *pOpt;
@@ -167,7 +167,7 @@
fatalerror("No memory for option stack");
}
-void
+void
opt_Pop(void)
{
if (pOptionStack) {
@@ -234,7 +234,7 @@
nErrors += 1;
}
-void
+void
yyerror(const char *fmt, ...)
{
va_list args;
@@ -243,7 +243,7 @@
va_end(args);
}
-void
+void
fatalerror(const char *fmt, ...)
{
va_list args;
@@ -268,7 +268,7 @@
va_end(args);
}
-static void
+static void
usage(void)
{
printf(
@@ -277,7 +277,7 @@
exit(1);
}
-int
+int
main(int argc, char *argv[])
{
int ch;
--- a/src/asm/math.c
+++ b/src/asm/math.c
@@ -18,7 +18,7 @@
/*
* Define the _PI symbol
*/
-void
+void
math_DefinePI(void)
{
sym_AddEqu("_PI", double2fix(PI));
@@ -27,7 +27,7 @@
/*
* Print a fixed point value
*/
-void
+void
math_Print(SLONG i)
{
if (i >= 0)
@@ -41,7 +41,7 @@
/*
* Calculate sine
*/
-SLONG
+SLONG
math_Sin(SLONG i)
{
return (double2fix(sin(fix2double(i) * 2 * PI / 65536)));
@@ -50,7 +50,7 @@
/*
* Calculate cosine
*/
-SLONG
+SLONG
math_Cos(SLONG i)
{
return (double2fix(cos(fix2double(i) * 2 * PI / 65536)));
@@ -59,7 +59,7 @@
/*
* Calculate tangent
*/
-SLONG
+SLONG
math_Tan(SLONG i)
{
return (double2fix(tan(fix2double(i) * 2 * PI / 65536)));
@@ -68,7 +68,7 @@
/*
* Calculate arcsine
*/
-SLONG
+SLONG
math_ASin(SLONG i)
{
return (double2fix(asin(fix2double(i)) / 2 / PI * 65536));
@@ -77,7 +77,7 @@
/*
* Calculate arccosine
*/
-SLONG
+SLONG
math_ACos(SLONG i)
{
return (double2fix(acos(fix2double(i)) / 2 / PI * 65536));
@@ -86,7 +86,7 @@
/*
* Calculate arctangent
*/
-SLONG
+SLONG
math_ATan(SLONG i)
{
return (double2fix(atan(fix2double(i)) / 2 / PI * 65536));
@@ -95,7 +95,7 @@
/*
* Calculate atan2
*/
-SLONG
+SLONG
math_ATan2(SLONG i, SLONG j)
{
return (double2fix
@@ -105,7 +105,7 @@
/*
* Multiplication
*/
-SLONG
+SLONG
math_Mul(SLONG i, SLONG j)
{
return (double2fix(fix2double(i) * fix2double(j)));
@@ -114,7 +114,7 @@
/*
* Division
*/
-SLONG
+SLONG
math_Div(SLONG i, SLONG j)
{
return (double2fix(fix2double(i) / fix2double(j)));
@@ -123,7 +123,7 @@
/*
* Round
*/
-SLONG
+SLONG
math_Round(SLONG i)
{
return double2fix(round(fix2double(i)));
@@ -132,7 +132,7 @@
/*
* Ceil
*/
-SLONG
+SLONG
math_Ceil(SLONG i)
{
return double2fix(ceil(fix2double(i)));
@@ -141,7 +141,7 @@
/*
* Floor
*/
-SLONG
+SLONG
math_Floor(SLONG i)
{
return double2fix(floor(fix2double(i)));
--- a/src/asm/output.c
+++ b/src/asm/output.c
@@ -53,7 +53,7 @@
/*
* Section stack routines
*/
-void
+void
out_PushSection(void)
{
struct SectionStackEntry *pSect;
@@ -66,7 +66,7 @@
fatalerror("No memory for section stack");
}
-void
+void
out_PopSection(void)
{
if (pSectionStack) {
@@ -83,7 +83,7 @@
/*
* Count the number of symbols used in this object
*/
-ULONG
+ULONG
countsymbols(void)
{
struct PatchSymbol *pSym;
@@ -102,7 +102,7 @@
/*
* Count the number of sections used in this object
*/
-ULONG
+ULONG
countsections(void)
{
struct Section *pSect;
@@ -121,7 +121,7 @@
/*
* Count the number of patches used in this object
*/
-ULONG
+ULONG
countpatches(struct Section * pSect)
{
struct Patch *pPatch;
@@ -139,7 +139,7 @@
/*
* Write a long to a file (little-endian)
*/
-void
+void
fputlong(ULONG i, FILE * f)
{
fputc(i, f);
@@ -151,7 +151,7 @@
/*
* Write a NULL-terminated string to a file
*/
-void
+void
fputstring(char *s, FILE * f)
{
while (*s)
@@ -162,7 +162,7 @@
/*
* Return a section's ID
*/
-ULONG
+ULONG
getsectid(struct Section * pSect)
{
struct Section *sec;
@@ -184,7 +184,7 @@
/*
* Write a patch to a file
*/
-void
+void
writepatch(struct Patch * pPatch, FILE * f)
{
fputstring(pPatch->tzFilename, f);
@@ -198,7 +198,7 @@
/*
* Write a section to a file
*/
-void
+void
writesection(struct Section * pSect, FILE * f)
{
fputstring(pSect->pzName, f); // RGB3 addition
@@ -209,7 +209,7 @@
fputlong(pSect->nBank, f);
//RGB1 addition
-
+
fputlong(pSect->nAlign, f); // RGB3 addition
if ((pSect->nType == SECT_ROM0)
@@ -230,7 +230,7 @@
/*
* Write a symbol to a file
*/
-void
+void
writesymbol(struct sSymbol * pSym, FILE * f)
{
char symname[MAXSYMLEN * 2 + 1];
@@ -250,7 +250,7 @@
strcat(symname, pSym->tzName);
} else
strcpy(symname, pSym->tzName);
-
+
if (pSym->nType & SYMF_EXPORT) {
/* Symbol should be exported */
type = SYM_EXPORT;
@@ -279,13 +279,12 @@
/*
* Add a symbol to the object
*/
-ULONG
+ULONG
addsymbol(struct sSymbol * pSym)
{
struct PatchSymbol *pPSym, **ppPSym;
static ULONG nextID = 0;
ULONG hash;
-
hash = calchash(pSym->tzName);
ppPSym = &(tHashedPatchSymbols[hash]);
@@ -313,7 +312,7 @@
/*
* Add all exported symbols to the object
*/
-void
+void
addexports(void)
{
int i;
@@ -353,7 +352,7 @@
/*
* Create a new patch (includes the rpn expr)
*/
-void
+void
createpatch(ULONG type, struct Expression * expr)
{
struct Patch *pPatch;
@@ -429,7 +428,7 @@
/*
* A quick check to see if we have an initialized section
*/
-void
+void
checksection(void)
{
if (pCurrentSection)
@@ -442,7 +441,7 @@
* A quick check to see if we have an initialized section that can contain
* this much initialized data
*/
-void
+void
checkcodesection(SLONG size)
{
checksection();
@@ -480,7 +479,7 @@
/*
* Write an objectfile
*/
-void
+void
out_WriteObject(void)
{
FILE *f;
@@ -514,7 +513,7 @@
/*
* Prepare for pass #2
*/
-void
+void
out_PrepPass2(void)
{
struct Section *pSect;
@@ -531,7 +530,7 @@
/*
* Set the objectfilename
*/
-void
+void
out_SetFileName(char *s)
{
tzObjectname = s;
@@ -597,7 +596,7 @@
/*
* Set the current section
*/
-void
+void
out_SetCurrentSection(struct Section * pSect)
{
pCurrentSection = pSect;
@@ -610,7 +609,7 @@
/*
* Set the current section by name and type
*/
-void
+void
out_NewSection(char *pzName, ULONG secttype)
{
out_SetCurrentSection(out_FindSection(pzName, secttype, -1, -1, 1));
@@ -619,7 +618,7 @@
/*
* Set the current section by name and type
*/
-void
+void
out_NewAbsSection(char *pzName, ULONG secttype, SLONG org, SLONG bank)
{
out_SetCurrentSection(out_FindSection(pzName, secttype, org, bank, 1));
@@ -628,7 +627,7 @@
/*
* Set the current section by name and type, using a given byte alignment
*/
-void
+void
out_NewAlignedSection(char *pzName, ULONG secttype, SLONG alignment, SLONG bank)
{
if (alignment < 0 || alignment > 16) {
@@ -640,7 +639,7 @@
/*
* Output an absolute byte
*/
-void
+void
out_AbsByte(int b)
{
checkcodesection(1);
@@ -653,7 +652,7 @@
pPCSymbol->nValue += 1;
}
-void
+void
out_AbsByteGroup(char *s, int length)
{
checkcodesection(length);
@@ -664,7 +663,7 @@
/*
* Skip this many bytes
*/
-void
+void
out_Skip(int skip)
{
checksection();
@@ -683,7 +682,7 @@
/*
* Output a NULL terminated string (excluding the NULL-character)
*/
-void
+void
out_String(char *s)
{
checkcodesection(strlen(s));
@@ -696,7 +695,7 @@
* is an absolute value in disguise.
*/
-void
+void
out_RelByte(struct Expression * expr)
{
checkcodesection(1);
@@ -717,7 +716,7 @@
/*
* Output an absolute word
*/
-void
+void
out_AbsWord(int b)
{
checkcodesection(2);
@@ -735,7 +734,7 @@
* Output a relocatable word. Checking will be done to see if
* it's an absolute value in disguise.
*/
-void
+void
out_RelWord(struct Expression * expr)
{
ULONG b;
@@ -759,7 +758,7 @@
/*
* Output an absolute longword
*/
-void
+void
out_AbsLong(SLONG b)
{
checkcodesection(sizeof(SLONG));
@@ -778,7 +777,7 @@
* Output a relocatable longword. Checking will be done to see if
* is an absolute value in disguise.
*/
-void
+void
out_RelLong(struct Expression * expr)
{
SLONG b;
@@ -804,7 +803,7 @@
/*
* Output a PC-relative byte
*/
-void
+void
out_PCRelByte(struct Expression * expr)
{
SLONG b = expr->nVal;
@@ -821,7 +820,7 @@
/*
* Output a binary file
*/
-void
+void
out_BinaryFile(char *s)
{
FILE *f;
@@ -852,7 +851,7 @@
fclose(f);
}
-void
+void
out_BinaryFileSlice(char *s, SLONG start_pos, SLONG length)
{
FILE *f;
--- a/src/asm/rpn.c
+++ b/src/asm/rpn.c
@@ -12,7 +12,7 @@
#include "asm/main.h"
#include "asm/rpn.h"
-void
+void
mergetwoexpressions(struct Expression * expr, struct Expression * src1,
struct Expression * src2)
{
@@ -28,7 +28,7 @@
/*
* Add a byte to the RPN expression
*/
-void
+void
pushbyte(struct Expression * expr, int b)
{
expr->tRPN[expr->nRPNLength++] = b & 0xFF;
@@ -37,7 +37,7 @@
/*
* Reset the RPN module
*/
-void
+void
rpn_Reset(struct Expression * expr)
{
expr->nRPNLength = expr->nRPNOut = expr->isReloc = expr->isPCRel = 0;
@@ -46,7 +46,7 @@
/*
* Returns the next rpn byte in expression
*/
-UWORD
+UWORD
rpn_PopByte(struct Expression * expr)
{
if (expr->nRPNOut == expr->nRPNLength) {
@@ -58,7 +58,7 @@
/*
* Determine if the current expression is relocatable
*/
-ULONG
+ULONG
rpn_isReloc(struct Expression * expr)
{
return (expr->isReloc);
@@ -67,7 +67,7 @@
/*
* Determine if the current expression can be pc-relative
*/
-ULONG
+ULONG
rpn_isPCRelative(struct Expression * expr)
{
return (expr->isPCRel);
@@ -76,7 +76,7 @@
/*
* Add symbols, constants and operators to expression
*/
-void
+void
rpn_Number(struct Expression * expr, ULONG i)
{
rpn_Reset(expr);
@@ -88,7 +88,7 @@
expr->nVal = i;
}
-void
+void
rpn_Symbol(struct Expression * expr, char *tzSym)
{
if (!sym_isConstant(tzSym)) {
@@ -110,7 +110,7 @@
rpn_Number(expr, sym_GetConstantValue(tzSym));
}
-void
+void
rpn_Bank(struct Expression * expr, char *tzSym)
{
if (!sym_isConstant(tzSym)) {
@@ -128,7 +128,7 @@
yyerror("BANK argument must be a relocatable identifier");
}
-int
+int
rpn_RangeCheck(struct Expression * expr, struct Expression * src, SLONG low,
SLONG high)
{
@@ -150,7 +150,7 @@
}
}
-void
+void
rpn_CheckHRAM(struct Expression * expr, struct Expression * src)
{
*expr = *src;
@@ -157,7 +157,7 @@
pushbyte(expr, RPN_HRAM);
}
-void
+void
rpn_LOGNOT(struct Expression * expr, struct Expression * src)
{
*expr = *src;
@@ -164,7 +164,7 @@
pushbyte(expr, RPN_LOGUNNOT);
}
-void
+void
rpn_LOGOR(struct Expression * expr, struct Expression * src1,
struct Expression * src2)
{
@@ -173,7 +173,7 @@
pushbyte(expr, RPN_LOGOR);
}
-void
+void
rpn_LOGAND(struct Expression * expr, struct Expression * src1,
struct Expression * src2)
{
@@ -182,7 +182,7 @@
pushbyte(expr, RPN_LOGAND);
}
-void
+void
rpn_LOGEQU(struct Expression * expr, struct Expression * src1,
struct Expression * src2)
{
@@ -191,7 +191,7 @@
pushbyte(expr, RPN_LOGEQ);
}
-void
+void
rpn_LOGGT(struct Expression * expr, struct Expression * src1,
struct Expression * src2)
{
@@ -200,7 +200,7 @@
pushbyte(expr, RPN_LOGGT);
}
-void
+void
rpn_LOGLT(struct Expression * expr, struct Expression * src1,
struct Expression * src2)
{
@@ -209,7 +209,7 @@
pushbyte(expr, RPN_LOGLT);
}
-void
+void
rpn_LOGGE(struct Expression * expr, struct Expression * src1,
struct Expression * src2)
{
@@ -218,7 +218,7 @@
pushbyte(expr, RPN_LOGGE);
}
-void
+void
rpn_LOGLE(struct Expression * expr, struct Expression * src1,
struct Expression * src2)
{
@@ -227,7 +227,7 @@
pushbyte(expr, RPN_LOGLE);
}
-void
+void
rpn_LOGNE(struct Expression * expr, struct Expression * src1,
struct Expression * src2)
{
@@ -236,7 +236,7 @@
pushbyte(expr, RPN_LOGNE);
}
-void
+void
rpn_ADD(struct Expression * expr, struct Expression * src1,
struct Expression * src2)
{
@@ -245,7 +245,7 @@
pushbyte(expr, RPN_ADD);
}
-void
+void
rpn_SUB(struct Expression * expr, struct Expression * src1,
struct Expression * src2)
{
@@ -254,7 +254,7 @@
pushbyte(expr, RPN_SUB);
}
-void
+void
rpn_XOR(struct Expression * expr, struct Expression * src1,
struct Expression * src2)
{
@@ -263,7 +263,7 @@
pushbyte(expr, RPN_XOR);
}
-void
+void
rpn_OR(struct Expression * expr, struct Expression * src1,
struct Expression * src2)
{
@@ -272,7 +272,7 @@
pushbyte(expr, RPN_OR);
}
-void
+void
rpn_AND(struct Expression * expr, struct Expression * src1,
struct Expression * src2)
{
@@ -281,7 +281,7 @@
pushbyte(expr, RPN_AND);
}
-void
+void
rpn_SHL(struct Expression * expr, struct Expression * src1,
struct Expression * src2)
{
@@ -290,7 +290,7 @@
pushbyte(expr, RPN_SHL);
}
-void
+void
rpn_SHR(struct Expression * expr, struct Expression * src1,
struct Expression * src2)
{
@@ -299,7 +299,7 @@
pushbyte(expr, RPN_SHR);
}
-void
+void
rpn_MUL(struct Expression * expr, struct Expression * src1,
struct Expression * src2)
{
@@ -308,7 +308,7 @@
pushbyte(expr, RPN_MUL);
}
-void
+void
rpn_DIV(struct Expression * expr, struct Expression * src1,
struct Expression * src2)
{
@@ -320,7 +320,7 @@
pushbyte(expr, RPN_DIV);
}
-void
+void
rpn_MOD(struct Expression * expr, struct Expression * src1,
struct Expression * src2)
{
@@ -332,7 +332,7 @@
pushbyte(expr, RPN_MOD);
}
-void
+void
rpn_UNNEG(struct Expression * expr, struct Expression * src)
{
*expr = *src;
@@ -340,7 +340,7 @@
pushbyte(expr, RPN_UNSUB);
}
-void
+void
rpn_UNNOT(struct Expression * expr, struct Expression * src)
{
*expr = *src;
--- a/src/asm/symbol.c
+++ b/src/asm/symbol.c
@@ -23,7 +23,7 @@
char SavedDATE[256];
bool exportall;
-SLONG
+SLONG
Callback_NARG(struct sSymbol * sym)
{
ULONG i = 0;
@@ -37,7 +37,7 @@
/*
* Get the nValue field of a symbol
*/
-SLONG
+SLONG
getvaluefield(struct sSymbol * sym)
{
if (sym->Callback) {
@@ -49,7 +49,7 @@
/*
* Calculate the hash value for a string
*/
-ULONG
+ULONG
calchash(char *s)
{
ULONG hash = 5381;
@@ -153,7 +153,7 @@
/*
* Purge a symbol
*/
-void
+void
sym_Purge(char *tzName)
{
struct sSymbol **ppSym;
@@ -184,7 +184,7 @@
/*
* Determine if a symbol has been defined
*/
-ULONG
+ULONG
sym_isConstDefined(char *tzName)
{
struct sSymbol *psym, *pscope;
@@ -208,7 +208,7 @@
return (0);
}
-ULONG
+ULONG
sym_isDefined(char *tzName)
{
struct sSymbol *psym, *pscope;
@@ -229,7 +229,7 @@
/*
* Determine if the symbol is a constant
*/
-ULONG
+ULONG
sym_isConstant(char *s)
{
struct sSymbol *psym, *pscope;
@@ -266,7 +266,7 @@
/*
* Return a constant symbols value
*/
-ULONG
+ULONG
sym_GetConstantValue(char *s)
{
struct sSymbol *psym, *pscope;
@@ -292,7 +292,7 @@
/*
* Return a symbols value... "estimated" if not defined yet
*/
-ULONG
+ULONG
sym_GetValue(char *s)
{
struct sSymbol *psym, *pscope;
@@ -331,7 +331,7 @@
/*
* Return a defined symbols value... aborts if not defined yet
*/
-ULONG
+ULONG
sym_GetDefinedValue(char *s)
{
struct sSymbol *psym, *pscope;
@@ -360,7 +360,7 @@
/*
* Macro argument stuff
*/
-void
+void
sym_ShiftCurrentMacroArgs(void)
{
SLONG i;
@@ -384,7 +384,7 @@
return (currentmacroargs[i - 1]);
}
-void
+void
sym_UseNewMacroArgs(void)
{
SLONG i;
@@ -395,7 +395,7 @@
}
}
-void
+void
sym_SaveCurrentMacroArgs(char *save[])
{
SLONG i;
@@ -404,7 +404,7 @@
save[i] = currentmacroargs[i];
}
-void
+void
sym_RestoreCurrentMacroArgs(char *save[])
{
SLONG i;
@@ -413,7 +413,7 @@
currentmacroargs[i] = save[i];
}
-void
+void
sym_FreeCurrentMacroArgs(void)
{
SLONG i;
@@ -424,7 +424,7 @@
}
}
-void
+void
sym_AddNewMacroArg(char *s)
{
SLONG i = 0;
@@ -441,7 +441,7 @@
yyerror("A maximum of %d arguments allowed", MAXMACROARGS);
}
-void
+void
sym_SetMacroArgID(ULONG nMacroCount)
{
char s[256];
@@ -450,7 +450,7 @@
newmacroargs[MAXMACROARGS] = strdup(s);
}
-void
+void
sym_UseCurrentMacroArgs(void)
{
SLONG i;
@@ -471,7 +471,7 @@
/*
* Add an equated symbol
*/
-void
+void
sym_AddEqu(char *tzSym, SLONG value)
{
if ((nPass == 1)
@@ -497,7 +497,7 @@
/*
* Add a string equated symbol
*/
-void
+void
sym_AddString(char *tzSym, char *tzValue)
{
struct sSymbol *nsym;
@@ -523,7 +523,7 @@
/*
* check if symbol is a string equated symbol
*/
-ULONG
+ULONG
sym_isString(char *tzSym)
{
struct sSymbol *pSym;
@@ -538,7 +538,7 @@
/*
* Alter a SET symbols value
*/
-void
+void
sym_AddSet(char *tzSym, SLONG value)
{
struct sSymbol *nsym;
@@ -557,7 +557,7 @@
/*
* Add a local (.name) relocatable symbol
*/
-void
+void
sym_AddLocalReloc(char *tzSym)
{
if ((nPass == 1)
@@ -591,7 +591,7 @@
/*
* Add a relocatable symbol
*/
-void
+void
sym_AddReloc(char *tzSym)
{
if ((nPass == 1)
@@ -622,7 +622,7 @@
/*
* Export a symbol
*/
-void
+void
sym_Export(char *tzSym)
{
if (nPass == 1) {
@@ -649,7 +649,7 @@
/*
* Import a symbol
*/
-void
+void
sym_Import(char *tzSym)
{
if (nPass == 1) {
@@ -667,7 +667,7 @@
/*
* Globalize a symbol (export if defined, import if not)
*/
-void
+void
sym_Global(char *tzSym)
{
if (nPass == 2) {
@@ -692,7 +692,7 @@
/*
* Add a macro definition
*/
-void
+void
sym_AddMacro(char *tzSym)
{
if ((nPass == 1)
@@ -717,7 +717,7 @@
}
}
-/*
+/*
* Set whether to export all relocable symbols by default
*/
void sym_SetExportAll(BBOOL set) {
@@ -727,7 +727,7 @@
/*
* Prepare for pass #1
*/
-void
+void
sym_PrepPass1(void)
{
sym_Init();
@@ -736,7 +736,7 @@
/*
* Prepare for pass #2
*/
-void
+void
sym_PrepPass2(void)
{
SLONG i;
@@ -773,7 +773,7 @@
/*
* Initialize the symboltable
*/
-void
+void
sym_Init(void)
{
SLONG i;
--- a/src/link/assign.c
+++ b/src/link/assign.c
@@ -63,7 +63,7 @@
}
}
-SLONG
+SLONG
area_Avail(SLONG bank)
{
SLONG r;
@@ -554,7 +554,7 @@
}
}
-void
+void
CreateSymbolTable(void)
{
struct sSection *pSect;
--- a/src/link/library.c
+++ b/src/link/library.c
@@ -7,7 +7,7 @@
#include "link/mylink.h"
#include "link/main.h"
-static BBOOL
+static BBOOL
symboldefined(char *name)
{
struct sSection *pSect;
@@ -31,7 +31,7 @@
return (0);
}
-static BBOOL
+static BBOOL
addmodulecontaining(char *name)
{
struct sSection **ppLSect;
@@ -66,7 +66,7 @@
return (0);
}
-void
+void
AddNeededModules(void)
{
struct sSection *pSect;
--- a/src/link/mapfile.c
+++ b/src/link/mapfile.c
@@ -13,7 +13,7 @@
SLONG currentbank = 0;
SLONG sfbank;
-void
+void
SetMapfileName(char *name)
{
mf = fopen(name, "w");
@@ -23,7 +23,7 @@
}
}
-void
+void
SetSymfileName(char *name)
{
sf = fopen(name, "w");
@@ -35,7 +35,7 @@
fprintf(sf, ";File generated by rgblink\n\n");
}
-void
+void
CloseMapfile(void)
{
if (mf) {
@@ -48,7 +48,7 @@
}
}
-void
+void
MapfileInitBank(SLONG bank)
{
if (mf) {
@@ -90,7 +90,7 @@
}
}
-void
+void
MapfileWriteSection(struct sSection * pSect)
{
SLONG i;
@@ -125,7 +125,7 @@
}
}
-void
+void
MapfileCloseBank(SLONG slack)
{
if (!mf)
--- a/src/link/object.c
+++ b/src/link/object.c
@@ -29,7 +29,7 @@
*
*/
-SLONG
+SLONG
readlong(FILE * f)
{
SLONG r;
@@ -42,7 +42,7 @@
return (r);
}
-UWORD
+UWORD
readword(FILE * f)
{
UWORD r;
@@ -224,7 +224,7 @@
return pSection;
}
-void
+void
obj_ReadRGB0(FILE * pObjfile)
{
struct sSection *pFirstSection;
@@ -375,7 +375,7 @@
return pSection;
}
-void
+void
obj_ReadRGB(FILE * pObjfile, enum ObjectFileContents contents)
{
struct sSection *pFirstSection;
@@ -435,7 +435,7 @@
*
*/
-void
+void
obj_ReadOpenFile(FILE * pObjfile, char *tzObjectfile)
{
char tzHeader[8];
@@ -464,7 +464,7 @@
}
}
-void
+void
obj_Readfile(char *tzObjectfile)
{
FILE *pObjfile;
@@ -484,7 +484,7 @@
oReadLib = 0;
}
-SLONG
+SLONG
file_Length(FILE * f)
{
ULONG r, p;
@@ -497,7 +497,7 @@
return (r);
}
-void
+void
lib_ReadXLB0(FILE * f)
{
SLONG size;
--- a/src/link/output.c
+++ b/src/link/output.c
@@ -12,7 +12,7 @@
SLONG MaxOverlayBank;
-void
+void
writehome(FILE * f, FILE * f_overlay)
{
struct sSection *pSect;
@@ -46,7 +46,7 @@
free(mem);
}
-void
+void
writebank(FILE * f, FILE * f_overlay, SLONG bank)
{
struct sSection *pSect;
@@ -80,13 +80,13 @@
free(mem);
}
-void
+void
out_Setname(char *tzOutputfile)
{
tzOutname = tzOutputfile;
}
-void
+void
out_SetOverlayname(char *tzOverlayfile)
{
tzOverlayname = tzOverlayfile;
@@ -93,7 +93,7 @@
}
-void
+void
Output(void)
{
SLONG i;
--- a/src/link/patch.c
+++ b/src/link/patch.c
@@ -13,19 +13,19 @@
SLONG rpnp;
SLONG nPC;
-void
+void
rpnpush(SLONG i)
{
rpnstack[rpnp++] = i;
}
-SLONG
+SLONG
rpnpop(void)
{
return (rpnstack[--rpnp]);
}
-SLONG
+SLONG
getsymvalue(SLONG symid)
{
switch (pCurrentSection->tSymbols[symid]->Type) {
@@ -51,7 +51,7 @@
errx(1, "*INTERNAL* UNKNOWN SYMBOL TYPE");
}
-SLONG
+SLONG
getsymbank(SLONG symid)
{
SLONG nBank;
@@ -79,7 +79,7 @@
return nBank;
}
-SLONG
+SLONG
calcrpn(struct sPatch * pPatch)
{
SLONG t, size;
@@ -231,7 +231,7 @@
return (rpnpop());
}
-void
+void
Patch(void)
{
struct sSection *pSect;
--- a/src/link/symbol.c
+++ b/src/link/symbol.c
@@ -19,7 +19,7 @@
struct ISymbol *tHash[HASHSIZE];
-SLONG
+SLONG
calchash(char *s)
{
SLONG r = 0;
@@ -29,7 +29,7 @@
return (r % HASHSIZE);
}
-void
+void
sym_Init(void)
{
SLONG i;
@@ -37,7 +37,7 @@
tHash[i] = NULL;
}
-SLONG
+SLONG
sym_GetValue(char *tzName)
{
if (strcmp(tzName, "@") == 0) {
@@ -58,7 +58,7 @@
}
}
-SLONG
+SLONG
sym_GetBank(char *tzName)
{
struct ISymbol **ppSym;
@@ -75,7 +75,7 @@
errx(1, "Unknown symbol '%s'", tzName);
}
-void
+void
sym_CreateSymbol(char *tzName, SLONG nValue, SLONG nBank)
{
if (strcmp(tzName, "@") == 0)