mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
reran indent (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:
@@ -11,13 +11,15 @@
|
||||
struct ISymbol {
|
||||
char *pzName;
|
||||
SLONG nValue;
|
||||
SLONG nBank; // -1=const
|
||||
SLONG nBank;
|
||||
//-1 = const
|
||||
struct ISymbol *pNext;
|
||||
};
|
||||
|
||||
struct ISymbol *tHash[HASHSIZE];
|
||||
|
||||
SLONG calchash(char *s)
|
||||
SLONG
|
||||
calchash(char *s)
|
||||
{
|
||||
SLONG r = 0;
|
||||
while (*s)
|
||||
@@ -26,14 +28,16 @@ SLONG calchash(char *s)
|
||||
return (r % HASHSIZE);
|
||||
}
|
||||
|
||||
void sym_Init(void)
|
||||
void
|
||||
sym_Init(void)
|
||||
{
|
||||
SLONG i;
|
||||
for (i = 0; i < HASHSIZE; i += 1)
|
||||
tHash[i] = NULL;
|
||||
}
|
||||
|
||||
SLONG sym_GetValue(char *tzName)
|
||||
SLONG
|
||||
sym_GetValue(char *tzName)
|
||||
{
|
||||
if (strcmp(tzName, "@") == 0) {
|
||||
return (nPC);
|
||||
@@ -55,7 +59,8 @@ SLONG sym_GetValue(char *tzName)
|
||||
}
|
||||
}
|
||||
|
||||
SLONG sym_GetBank(char *tzName)
|
||||
SLONG
|
||||
sym_GetBank(char *tzName)
|
||||
{
|
||||
struct ISymbol **ppSym;
|
||||
|
||||
@@ -73,7 +78,8 @@ SLONG sym_GetBank(char *tzName)
|
||||
return (0);
|
||||
}
|
||||
|
||||
void sym_CreateSymbol(char *tzName, SLONG nValue, SBYTE nBank)
|
||||
void
|
||||
sym_CreateSymbol(char *tzName, SLONG nValue, SBYTE nBank)
|
||||
{
|
||||
if (strcmp(tzName, "@") == 0)
|
||||
return;
|
||||
@@ -90,8 +96,8 @@ void sym_CreateSymbol(char *tzName, SLONG nValue, SBYTE nBank)
|
||||
return;
|
||||
|
||||
sprintf(temptext,
|
||||
"Symbol '%s' defined more than once\n",
|
||||
tzName);
|
||||
"Symbol '%s' defined more than once\n",
|
||||
tzName);
|
||||
fatalerror(temptext);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user