]> Shamusworld >> Repos - rmac/blobdiff - sect.c
More fixups to remove warnings, removal of more cruft.
[rmac] / sect.c
diff --git a/sect.c b/sect.c
index f9c8a588531a4d655b2981189b845ad859294b51..fe630b15d3a2f8aaf1b4f8a36ac0d33f34b65f78 100644 (file)
--- a/sect.c
+++ b/sect.c
 #include "token.h"
 
 
+// Function prototypes
+void mksect(int, WORD);
+void switchsect(int);
+
 // Section descriptors
 SECT sect[NSECTS];                             // All sections... 
 int cursect;                                   // Current section number
@@ -38,10 +42,6 @@ LONG fchalloc;                                       // # bytes alloc'd to fixup chunk
 LONG fchsize;                                  // # bytes used in fixup chunk
 PTR fchptr;                                            // Deposit point in fixup chunk buffer
 
-// BOLLOCKS
-//unsigned fwdjump[MAXFWDJUMPS];       // forward jump check table
-//unsigned fwindex = 0;                        // forward jump index
-
 // Return a size (SIZB, SIZW, SIZL) or 0, depending on what kind of fixup is
 // associated with a location.
 static char fusiztab[] = {
@@ -68,6 +68,28 @@ static char fusizoffs[] = {
 };
 
 
+//
+// Initialize Sections; Setup initial ABS, TEXT, DATA and BSS sections
+//
+void InitSection(void)
+{
+       int i;
+
+       // Cleanup all sections
+       for(i=0; i<NSECTS; i++)
+               mksect(i, 0);
+
+       // Construct default sections, make TEXT the current section
+       mksect(ABS,   SUSED | SABS | SBSS);             // ABS
+       mksect(TEXT,  SUSED | TEXT       );             // TEXT
+       mksect(DATA,  SUSED | DATA       );             // DATA
+       mksect(BSS,   SUSED | BSS | SBSS );             // BSS
+//     mksect(M6502, SUSED | TEXT       );             // 6502 code section
+
+       switchsect(TEXT);                                               // Switch to TEXT for starters
+}
+
+
 //
 // Make a New (Clean) Section
 //
@@ -136,28 +158,6 @@ void savsect(void)
 }
 
 
-//
-// Initialize Sections; Setup initial ABS, TEXT, DATA and BSS sections
-//
-void init_sect(void)
-{
-       int i;
-
-       // Cleanup all sections
-       for(i=0; i<NSECTS; i++)
-               mksect(i, 0);
-
-       // Construct default sections, make TEXT the current section
-       mksect(ABS,   SUSED | SABS | SBSS);             // ABS
-       mksect(TEXT,  SUSED | TEXT       );             // TEXT
-       mksect(DATA,  SUSED | DATA       );             // DATA
-       mksect(BSS,   SUSED | BSS | SBSS );             // BSS
-//     mksect(M6502, SUSED | TEXT       );             // 6502 code section
-
-       switchsect(TEXT);                                               // Switch to TEXT for starters
-}
-
-
 //
 // Test to see if a location has a fixup sic'd on it.  This is used by the
 // listing generator to print 'xx's instead of '00's for forward references