shithub: rgbds

Download patch

ref: e5e64b8cec6d3b36c2eae2ff9597199664bf5112
parent: 8534f3a14895ab172397d0a74230e584609076f4
author: Anthony J. Bentley <[email protected]>
date: Wed Jan 7 18:36:08 EST 2015

rgbasm: trim ludicrously redundant comments.

--- a/src/asm/fstack.c
+++ b/src/asm/fstack.c
@@ -1,8 +1,5 @@
 /*
- * RGBAsm - FSTACK.C (FileStack routines)
- *
- * INCLUDES
- *
+ * FileStack routines
  */
 
 #include <errno.h>
@@ -23,13 +20,6 @@
 #define PATH_MAX 256
 #endif
 
-/*
- * RGBAsm - FSTACK.C (FileStack routines)
- *
- * VARIABLES
- *
- */
-
 struct sContext *pFileStack;
 struct sSymbol *pCurrentMacro;
 YY_BUFFER_STATE CurrentFlexHandle;
@@ -55,12 +45,8 @@
 #define STAT_isREPTBlock	3
 
 /*
- * RGBAsm - FSTACK.C (FileStack routines)
- *
  * Context push and pop
- *
  */
-
 void 
 pushcontext(void)
 {
@@ -167,13 +153,10 @@
 {
 	return (popcontext());
 }
+
 /*
- * RGBAsm - FSTACK.C (FileStack routines)
- *
  * Dump the context stack to stderr
- *
  */
-
 void 
 fstk_Dump(void)
 {
@@ -189,13 +172,10 @@
 
 	fprintf(stderr, "%s(%ld)", tzCurrentFileName, nLineNo);
 }
+
 /*
- * RGBAsm - FSTACK.C (FileStack routines)
- *
  * Extra includepath stuff
- *
  */
-
 void 
 fstk_AddIncludePath(char *s)
 {
@@ -230,13 +210,10 @@
 	errno = ENOENT;
 	return NULL;
 }
+
 /*
- * RGBAsm - FSTACK.C (FileStack routines)
- *
  * Set up an include file for parsing
- *
  */
-
 void
 fstk_RunInclude(char *tzFileName)
 {
@@ -262,13 +239,10 @@
 	yyunput('\n');
 	nLineNo -= 1;
 }
+
 /*
- * RGBAsm - FSTACK.C (FileStack routines)
- *
  * Set up a macro for parsing
- *
  */
-
 ULONG 
 fstk_RunMacro(char *s)
 {
@@ -290,13 +264,10 @@
 	} else
 		return (0);
 }
+
 /*
- * RGBAsm - FSTACK.C (FileStack routines)
- *
  * Set up a macroargument for parsing
- *
  */
-
 void 
 fstk_RunMacroArg(SLONG s)
 {
@@ -316,13 +287,10 @@
 	} else
 		fatalerror("No such macroargument");
 }
+
 /*
- * RGBAsm - FSTACK.C (FileStack routines)
- *
  * Set up a stringequate for parsing
- *
  */
-
 void 
 fstk_RunString(char *s)
 {
@@ -338,13 +306,10 @@
 	} else
 		yyerror("No such string symbol '%s'", s);
 }
+
 /*
- * RGBAsm - FSTACK.C (FileStack routines)
- *
  * Set up a repeat block for parsing
- *
  */
-
 void 
 fstk_RunRept(ULONG count)
 {
@@ -362,13 +327,10 @@
 		yy_switch_to_buffer(CurrentFlexHandle);
 	}
 }
+
 /*
- * RGBAsm - FSTACK.C (FileStack routines)
- *
  * Initialize the filestack routines
- *
  */
-
 void
 fstk_Init(char *s)
 {
--- a/src/asm/main.c
+++ b/src/asm/main.c
@@ -1,10 +1,3 @@
-/*
- * RGBAsm - MAIN.C
- *
- * INCLUDES
- *
- */
-
 #include <math.h>
 #include <stdarg.h>
 #include <stdio.h>
@@ -22,13 +15,6 @@
 int yyparse(void);
 void setuplex(void);
 
-/*
- * RGBAsm - MAIN.C
- *
- * VARIABLES
- *
- */
-
 clock_t nStartClock, nEndClock;
 SLONG nLineNo;
 ULONG nTotalLines, nPass, nPC, nIFDepth, nErrors;
@@ -36,10 +22,7 @@
 extern int yydebug;
 
 /*
- * RGBAsm - MAIN.C
- *
  * Option stack
- *
  */
 
 struct sOptions DefaultOptions;
@@ -190,13 +173,10 @@
 	} else
 		fatalerror("No entries in the option stack");
 }
+
 /*
- * RGBAsm - MAIN.C
- *
  * Error handling
- *
  */
-
 void
 verror(const char *fmt, va_list args)
 {
@@ -226,12 +206,6 @@
 	va_end(args);
 	exit(5);
 }
-/*
- * RGBAsm - MAIN.C
- *
- * Help text
- *
- */
 
 static void 
 usage(void)
@@ -241,12 +215,6 @@
 "              [-p pad_value] file.asm\n");
 	exit(1);
 }
-/*
- * RGBAsm - MAIN.C
- *
- * main
- *
- */
 
 int 
 main(int argc, char *argv[])
--- a/src/asm/math.c
+++ b/src/asm/math.c
@@ -1,8 +1,5 @@
 /*
- * RGBAsm - MATH.C (Fixedpoint math routines)
- *
- * INCLUDES
- *
+ * Fixedpoint math routines
  */
 
 #include <math.h>
@@ -19,24 +16,17 @@
 #endif
 
 /*
- * RGBAsm - MATH.C (Fixedpoint math routines)
- *
  * Define the _PI symbol
- *
  */
-
 void 
 math_DefinePI(void)
 {
 	sym_AddEqu("_PI", double2fix(PI));
 }
+
 /*
- * RGBAsm - MATH.C (Fixedpoint math routines)
- *
  * Print a fixed point value
- *
  */
-
 void 
 math_Print(SLONG i)
 {
@@ -47,85 +37,64 @@
 		printf("-%ld.%05ld", (-i) >> 16,
 		    ((SLONG) (fix2double(-i) * 100000 + 0.5)) % 100000);
 }
+
 /*
- * RGBAsm - MATH.C (Fixedpoint math routines)
- *
  * Calculate sine
- *
  */
-
 SLONG 
 math_Sin(SLONG i)
 {
 	return (double2fix(sin(fix2double(i) * 2 * PI / 65536)));
 }
+
 /*
- * RGBAsm - MATH.C (Fixedpoint math routines)
- *
  * Calculate cosine
- *
  */
-
 SLONG 
 math_Cos(SLONG i)
 {
 	return (double2fix(cos(fix2double(i) * 2 * PI / 65536)));
 }
+
 /*
- * RGBAsm - MATH.C (Fixedpoint math routines)
- *
  * Calculate tangent
- *
  */
-
 SLONG 
 math_Tan(SLONG i)
 {
 	return (double2fix(tan(fix2double(i) * 2 * PI / 65536)));
 }
+
 /*
- * RGBAsm - MATH.C (Fixedpoint math routines)
- *
- * Calculate sine^-1
- *
+ * Calculate arcsine
  */
-
 SLONG 
 math_ASin(SLONG i)
 {
 	return (double2fix(asin(fix2double(i)) / 2 / PI * 65536));
 }
+
 /*
- * RGBAsm - MATH.C (Fixedpoint math routines)
- *
- * Calculate cosine^-1
- *
+ * Calculate arccosine
  */
-
 SLONG 
 math_ACos(SLONG i)
 {
 	return (double2fix(acos(fix2double(i)) / 2 / PI * 65536));
 }
+
 /*
- * RGBAsm - MATH.C (Fixedpoint math routines)
- *
- * Calculate tangent^-1
- *
+ * Calculate arctangent
  */
-
 SLONG 
 math_ATan(SLONG i)
 {
 	return (double2fix(atan(fix2double(i)) / 2 / PI * 65536));
 }
+
 /*
- * RGBAsm - MATH.C (Fixedpoint math routines)
- *
  * Calculate atan2
- *
  */
-
 SLONG 
 math_ATan2(SLONG i, SLONG j)
 {
@@ -132,58 +101,46 @@
 	return (double2fix
 	    (atan2(fix2double(i), fix2double(j)) / 2 / PI * 65536));
 }
+
 /*
- * RGBAsm - MATH.C (Fixedpoint math routines)
- *
  * Multiplication
- *
  */
-
 SLONG 
 math_Mul(SLONG i, SLONG j)
 {
 	return (double2fix(fix2double(i) * fix2double(j)));
 }
+
 /*
- * RGBAsm - MATH.C (Fixedpoint math routines)
- *
  * Division
- *
  */
-
 SLONG 
 math_Div(SLONG i, SLONG j)
 {
 	return (double2fix(fix2double(i) / fix2double(j)));
-}/*
- * RGBAsm - MATH.C (Fixedpoint math routines)
- *
+}
+
+/*
  * Round
- *
  */
-
 SLONG 
 math_Round(SLONG i)
 {
 	return double2fix(round(fix2double(i)));
-}/*
- * RGBAsm - MATH.C (Fixedpoint math routines)
- *
+}
+
+/*
  * Ceil
- *
  */
-
 SLONG 
 math_Ceil(SLONG i)
 {
 	return double2fix(ceil(fix2double(i)));
-}/*
- * RGBAsm - MATH.C (Fixedpoint math routines)
- *
+}
+
+/*
  * Floor
- *
  */
-
 SLONG 
 math_Floor(SLONG i)
 {
--- a/src/asm/output.c
+++ b/src/asm/output.c
@@ -1,8 +1,5 @@
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
- * INCLUDES
- *
+ * Outputs an objectfile
  */
 
 #include <errno.h>
@@ -22,13 +19,6 @@
 
 #define SECTIONCHUNK	0x4000
 
-/*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
- * Internal structures
- *
- */
-
 void out_SetCurrentSection(struct Section * pSect);
 
 struct Patch {
@@ -52,12 +42,6 @@
 	struct Section *pSection;
 	struct SectionStackEntry *pNext;
 };
-/*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
- * VARIABLES
- *
- */
 
 struct PatchSymbol *tHashedPatchSymbols[HASHSIZE];
 struct Section *pSectionList = NULL, *pCurrentSection = NULL;
@@ -67,12 +51,8 @@
 struct SectionStackEntry *pSectionStack = NULL;
 
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * Section stack routines
- *
  */
-
 void 
 out_PushSection(void)
 {
@@ -99,13 +79,10 @@
 	} else
 		fatalerror("No entries in the section stack");
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * Count the number of symbols used in this object
- *
  */
-
 ULONG 
 countsymbols(void)
 {
@@ -121,13 +98,10 @@
 
 	return (count);
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * Count the number of sections used in this object
- *
  */
-
 ULONG 
 countsections(void)
 {
@@ -143,13 +117,10 @@
 
 	return (count);
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * Count the number of patches used in this object
- *
  */
-
 ULONG 
 countpatches(struct Section * pSect)
 {
@@ -164,13 +135,10 @@
 
 	return (r);
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * Write a long to a file (little-endian)
- *
  */
-
 void 
 fputlong(ULONG i, FILE * f)
 {
@@ -179,13 +147,10 @@
 	fputc(i >> 16, f);
 	fputc(i >> 24, f);
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * Write a NULL-terminated string to a file
- *
  */
-
 void 
 fputstring(char *s, FILE * f)
 {
@@ -193,13 +158,10 @@
 		fputc(*s++, f);
 	fputc(0, f);
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
- * Return a sections ID
- *
+ * Return a section's ID
  */
-
 ULONG 
 getsectid(struct Section * pSect)
 {
@@ -218,13 +180,10 @@
 	fatalerror("INTERNAL: Unknown section");
 	return ((ULONG) - 1);
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * Write a patch to a file
- *
  */
-
 void 
 writepatch(struct Patch * pPatch, FILE * f)
 {
@@ -235,13 +194,10 @@
 	fputlong(pPatch->nRPNSize, f);
 	fwrite(pPatch->pRPN, 1, pPatch->nRPNSize, f);
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * Write a section to a file
- *
  */
-
 void 
 writesection(struct Section * pSect, FILE * f)
 {
@@ -269,13 +225,10 @@
 		}
 	}
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * Write a symbol to a file
- *
  */
-
 void 
 writesymbol(struct sSymbol * pSym, FILE * f)
 {
@@ -319,13 +272,10 @@
 		fputlong(offset, f);
 	}
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * Add a symbol to the object
- *
  */
-
 ULONG 
 addsymbol(struct sSymbol * pSym)
 {
@@ -355,13 +305,10 @@
 
 	return pPSym->ID;
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * Add all exported symbols to the object
- *
  */
-
 void 
 addexports(void)
 {
@@ -378,13 +325,10 @@
 		}
 	}
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * Allocate a new patchstructure and link it into the list
- *
  */
-
 struct Patch *
 allocpatch(void)
 {
@@ -401,13 +345,10 @@
 
 	return (pPatch);
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * Create a new patch (includes the rpn expr)
- *
  */
-
 void 
 createpatch(ULONG type, struct Expression * expr)
 {
@@ -473,13 +414,10 @@
 		pPatch->nRPNSize = rpnptr;
 	}
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * A quick check to see if we have an initialized section
- *
  */
-
 void 
 checksection(void)
 {
@@ -488,14 +426,11 @@
 	else
 		fatalerror("Code generation before SECTION directive");
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * A quick check to see if we have an initialized section that can contain
  * this much initialized data
- *
  */
-
 void 
 checkcodesection(SLONG size)
 {
@@ -524,13 +459,10 @@
 	} else
 		errx(1, "Section '%s' is too big", pCurrentSection->pzName);
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * Write an objectfile
- *
  */
-
 void 
 out_WriteObject(void)
 {
@@ -561,13 +493,10 @@
 		fclose(f);
 	}
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * Prepare for pass #2
- *
  */
-
 void 
 out_PrepPass2(void)
 {
@@ -581,13 +510,10 @@
 	pCurrentSection = NULL;
 	pSectionStack = NULL;
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * Set the objectfilename
- *
  */
-
 void 
 out_SetFileName(char *s)
 {
@@ -599,16 +525,12 @@
 	pCurrentSection = NULL;
 	pPatchSymbols = NULL;
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * 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)
+out_FindSection(char *pzName, ULONG secttype, SLONG org, SLONG bank)
 {
 	struct Section *pSect, **ppSect;
 
@@ -652,13 +574,10 @@
 
 	return (NULL);
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * Set the current section
- *
  */
-
 void 
 out_SetCurrentSection(struct Section * pSect)
 {
@@ -668,37 +587,28 @@
 	pPCSymbol->nValue = nPC;
 	pPCSymbol->pSection = pCurrentSection;
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * Set the current section by name and type
- *
  */
-
 void 
 out_NewSection(char *pzName, ULONG secttype)
 {
 	out_SetCurrentSection(out_FindSection(pzName, secttype, -1, -1));
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * Set the current section by name and type
- *
  */
-
 void 
 out_NewAbsSection(char *pzName, ULONG secttype, SLONG org, SLONG bank)
 {
 	out_SetCurrentSection(out_FindSection(pzName, secttype, org, bank));
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * Output an absolute byte
- *
  */
-
 void 
 out_AbsByte(int b)
 {
@@ -719,13 +629,10 @@
 	while (length--)
 		out_AbsByte(*s++);
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * Skip this many bytes
- *
  */
-
 void 
 out_Skip(int skip)
 {
@@ -741,13 +648,10 @@
 			out_AbsByte(CurrentOptions.fillchar);
 	}
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * Output a NULL terminated string (excluding the NULL-character)
- *
  */
-
 void 
 out_String(char *s)
 {
@@ -755,12 +659,10 @@
 	while (*s)
 		out_AbsByte(*s++);
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * Output a relocatable byte.  Checking will be done to see if it
  * is an absolute value in disguise.
- *
  */
 
 void 
@@ -780,13 +682,10 @@
 
 	rpn_Reset(expr);
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * Output an absolute word
- *
  */
-
 void 
 out_AbsWord(int b)
 {
@@ -800,14 +699,11 @@
 	nPC += 2;
 	pPCSymbol->nValue += 2;
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * Output a relocatable word.  Checking will be done to see if
- * is an absolute value in disguise.
- *
+ * it's an absolute value in disguise.
  */
-
 void 
 out_RelWord(struct Expression * expr)
 {
@@ -828,13 +724,10 @@
 		out_AbsWord(expr->nVal);
 	rpn_Reset(expr);
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * Output an absolute longword
- *
  */
-
 void 
 out_AbsLong(SLONG b)
 {
@@ -849,14 +742,11 @@
 	nPC += 4;
 	pPCSymbol->nValue += 4;
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * Output a relocatable longword.  Checking will be done to see if
  * is an absolute value in disguise.
- *
  */
-
 void 
 out_RelLong(struct Expression * expr)
 {
@@ -879,13 +769,10 @@
 		out_AbsLong(expr->nVal);
 	rpn_Reset(expr);
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * Output a PC-relative byte
- *
  */
-
 void 
 out_PCRelByte(struct Expression * expr)
 {
@@ -899,13 +786,10 @@
 	out_AbsByte(b);
 	rpn_Reset(expr);
 }
+
 /*
- * RGBAsm - OUTPUT.C - Outputs an objectfile
- *
  * Output a binary file
- *
  */
-
 void 
 out_BinaryFile(char *s)
 {
--- a/src/asm/rpn.c
+++ b/src/asm/rpn.c
@@ -1,8 +1,5 @@
 /*
- * RGBAsm - RPN.C - Controls RPN expressions for objectfiles
- *
- * INCLUDES
- *
+ * Controls RPN expressions for objectfiles
  */
 
 #include <stdio.h>
@@ -29,49 +26,26 @@
 #define joinexpr() mergetwoexpressions(expr,src1,src2)
 
 /*
- * RGBAsm - RPN.C - Controls RPN expressions for objectfiles
- *
- * VARIABLES
- *
- */
-
-//UBYTE rpnexpr[2048];
-//ULONG rpnptr = 0;
-//ULONG rpnoutptr = 0;
-//ULONG reloc = 0;
-//ULONG pcrel = 0;
-
-/*
- * RGBAsm - RPN.C - Controls RPN expressions for objectfiles
- *
  * Add a byte to the RPN expression
- *
  */
-
 void 
 pushbyte(struct Expression * expr, int b)
 {
 	expr->tRPN[expr->nRPNLength++] = b & 0xFF;
 }
+
 /*
- * RGBAsm - RPN.C - Controls RPN expressions for objectfiles
- *
  * Reset the RPN module
- *
  */
-
 void 
 rpn_Reset(struct Expression * expr)
 {
 	expr->nRPNLength = expr->nRPNOut = expr->isReloc = expr->isPCRel = 0;
 }
+
 /*
- * RGBAsm - RPN.C - Controls RPN expressions for objectfiles
- *
  * Returns the next rpn byte in expression
- *
  */
-
 UWORD 
 rpn_PopByte(struct Expression * expr)
 {
@@ -80,37 +54,28 @@
 	} else
 		return (expr->tRPN[expr->nRPNOut++]);
 }
+
 /*
- * RGBAsm - RPN.C - Controls RPN expressions for objectfiles
- *
  * Determine if the current expression is relocatable
- *
  */
-
 ULONG 
 rpn_isReloc(struct Expression * expr)
 {
 	return (expr->isReloc);
 }
+
 /*
- * RGBAsm - RPN.C - Controls RPN expressions for objectfiles
- *
  * Determine if the current expression can be pc-relative
- *
  */
-
 ULONG 
 rpn_isPCRelative(struct Expression * expr)
 {
 	return (expr->isPCRel);
 }
+
 /*
- * RGBAsm - RPN.C - Controls RPN expressions for objectfiles
- *
  * Add symbols, constants and operators to expression
- *
  */
-
 void 
 rpn_Number(struct Expression * expr, ULONG i)
 {
@@ -187,6 +152,7 @@
 		return (expr->nVal >= low && expr->nVal <= high);
 	}
 }
+
 void 
 rpn_CheckHRAM(struct Expression * expr, struct Expression * src)
 {
--- a/src/asm/symbol.c
+++ b/src/asm/symbol.c
@@ -1,8 +1,5 @@
 /*
- * RGBAsm - SYMBOL.C - Symboltable and macroargs stuff
- *
- * INCLUDES
- *
+ * Symboltable and macroargs stuff
  */
 
 #include <assert.h>
@@ -16,13 +13,6 @@
 #include "asm/mymath.h"
 #include "asm/output.h"
 
-/*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
- * VARIABLES
- *
- */
-
 struct sSymbol *tHashedSymbols[HASHSIZE];
 struct sSymbol *pScope = NULL;
 struct sSymbol *pPCSymbol = NULL;
@@ -44,12 +34,8 @@
 }
 
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
  * Get the nValue field of a symbol
- *
  */
-
 SLONG 
 getvaluefield(struct sSymbol * sym)
 {
@@ -58,13 +44,10 @@
 	} else
 		return (sym->nValue);
 }
+
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
  * Calculate the hash value for a string
- *
  */
-
 ULONG 
 calchash(char *s)
 {
@@ -75,13 +58,10 @@
 
 	return (hash % HASHSIZE);
 }
+
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
  * Create a new symbol by name
- *
  */
-
 struct sSymbol *
 createsymbol(char *s)
 {
@@ -110,12 +90,8 @@
 	}
 }
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
  * Find a symbol by name and scope
- *
  */
-
 struct sSymbol *
 findsymbol(char *s, struct sSymbol * scope)
 {
@@ -134,13 +110,10 @@
 	}
 	return (NULL);
 }
+
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
  * Find the pointer to a symbol by name and scope
- *
  */
-
 struct sSymbol **
 findpsymbol(char *s, struct sSymbol * scope)
 {
@@ -159,13 +132,10 @@
 	}
 	return (NULL);
 }
+
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
  * Find a symbol by name and scope
- *
  */
-
 struct sSymbol *
 sym_FindSymbol(char *tzName)
 {
@@ -178,13 +148,10 @@
 
 	return (findsymbol(tzName, pscope));
 }
+
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
  * Purge a symbol
- *
  */
-
 void 
 sym_Purge(char *tzName)
 {
@@ -212,13 +179,10 @@
 		yyerror("'%s' not defined", tzName);
 	}
 }
+
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
  * Determine if a symbol has been defined
- *
  */
-
 ULONG 
 sym_isConstDefined(char *tzName)
 {
@@ -260,13 +224,10 @@
 	else
 		return (0);
 }
+
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
  * Determine if the symbol is a constant
- *
  */
-
 ULONG 
 sym_isConstant(char *s)
 {
@@ -283,13 +244,10 @@
 	}
 	return (0);
 }
+
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
  * Get a string equate's value
- *
  */
-
 char *
 sym_GetStringValue(char *tzSym)
 {
@@ -303,13 +261,10 @@
 
 	return (NULL);
 }
+
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
  * Return a constant symbols value
- *
  */
-
 ULONG 
 sym_GetConstantValue(char *s)
 {
@@ -332,13 +287,10 @@
 
 	return (0);
 }
+
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
  * Return a symbols value... "estimated" if not defined yet
- *
  */
-
 ULONG 
 sym_GetValue(char *s)
 {
@@ -374,13 +326,10 @@
 
 	return (0);
 }
+
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
  * Return a defined symbols value... aborts if not defined yet
- *
  */
-
 ULONG 
 sym_GetDefinedValue(char *s)
 {
@@ -406,13 +355,10 @@
 
 	return (0);
 }
+
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
  * Macro argument stuff
- *
  */
-
 void 
 sym_ShiftCurrentMacroArgs(void)
 {
@@ -510,25 +456,19 @@
 	for (i = 1; i <= MAXMACROARGS; i += 1)
 		sym_AddNewMacroArg(sym_FindMacroArg(i));
 }
+
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
  * Find a macro by name
- *
  */
-
 struct sSymbol *
 sym_FindMacro(char *s)
 {
 	return (findsymbol(s, NULL));
 }
+
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
  * Add an equated symbol
- *
  */
-
 void 
 sym_AddEqu(char *tzSym, SLONG value)
 {
@@ -551,13 +491,10 @@
 		}
 	}
 }
+
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
  * Add a string equated symbol
- *
  */
-
 void 
 sym_AddString(char *tzSym, char *tzValue)
 {
@@ -580,13 +517,10 @@
 		nsym->pScope = NULL;
 	}
 }
+
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
  * check if symbol is a string equated symbol
- *
  */
-
 ULONG 
 sym_isString(char *tzSym)
 {
@@ -598,13 +532,10 @@
 	}
 	return (0);
 }
+
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
  * Alter a SET symbols value
- *
  */
-
 void 
 sym_AddSet(char *tzSym, SLONG value)
 {
@@ -620,13 +551,10 @@
 		nsym->pScope = NULL;
 	}
 }
+
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
  * Add a local (.name) relocatable symbol
- *
  */
-
 void 
 sym_AddLocalReloc(char *tzSym)
 {
@@ -654,13 +582,10 @@
 			fatalerror("Local label in main scope");
 	}
 }
+
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
  * Add a relocatable symbol
- *
  */
-
 void 
 sym_AddReloc(char *tzSym)
 {
@@ -684,15 +609,11 @@
 		}
 	}
 	pScope = findsymbol(tzSym, NULL);
-
 }
+
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
  * Export a symbol
- *
  */
-
 void 
 sym_Export(char *tzSym)
 {
@@ -716,13 +637,10 @@
 	}
 
 }
+
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
  * Import a symbol
- *
  */
-
 void 
 sym_Import(char *tzSym)
 {
@@ -737,13 +655,10 @@
 			nsym->nType |= SYMF_IMPORT;
 	}
 }
+
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
  * Globalize a symbol (export if defined, import if not)
- *
  */
-
 void 
 sym_Global(char *tzSym)
 {
@@ -765,13 +680,10 @@
 		}
 	}
 }
+
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
  * Add a macro definition
- *
  */
-
 void 
 sym_AddMacro(char *tzSym)
 {
@@ -796,25 +708,19 @@
 		}
 	}
 }
+
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
  * Prepare for pass #1
- *
  */
-
 void 
 sym_PrepPass1(void)
 {
 	sym_Init();
 }
+
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
  * Prepare for pass #2
- *
  */
-
 void 
 sym_PrepPass2(void)
 {
@@ -846,13 +752,10 @@
 	p_NARGSymbol = findsymbol("_NARG", NULL);
 	p_NARGSymbol->Callback = Callback_NARG;
 }
+
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
- * Initialise the symboltable
- *
+ * Initialize the symboltable
  */
-
 void 
 sym_Init(void)
 {
@@ -889,13 +792,10 @@
 	math_DefinePI();
 
 }
+
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
  * DEBUG: Print the symbol table
- *
  */
-
 void 
 sym_PrintSymbolTable(void)
 {
@@ -943,13 +843,10 @@
 		}
 	}
 }
+
 /*
- * RGBAsm - SYMBOL.C - Symboltable stuff
- *
  * DEBUG: Dump the macroargs
- *
  */
-
 void 
 sym_DumpMacroArgs(void)
 {