]> Shamusworld >> Repos - rmac/blobdiff - sect.c
Visual Studio 2015 project files. A few warnings about unused variables fixed.
[rmac] / sect.c
diff --git a/sect.c b/sect.c
index 80acece60ac221107589a104713916b87119baef..64ccb441b759cb6f212fc96faf5210bbc4ee045e 100644 (file)
--- a/sect.c
+++ b/sect.c
@@ -3,7 +3,7 @@
 // SECT.C - Code Generation, Fixups and Section Management
 // Copyright (C) 199x Landon Dyer, 2011 Reboot and Friends
 // RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986
-// Source Utilised with the Kind Permission of Landon Dyer
+// Source utilised with the kind permission of Landon Dyer
 //
 
 #include "sect.h"
@@ -274,7 +274,11 @@ int AddFixup(WORD attr, LONG loc, TOKEN * fexpr)
        SECT * p;
        // Shamus: Expression lengths are voodoo ATM (variable "i"). Need to fix
        //         this.
-#warning "!!! AddFixup() is filled with VOODOO !!!"
+#ifndef _MSC_VER
+#pragma warning "!!! AddFixup() is filled with VOODOO !!!"
+#else
+#pragma WARNING(!!! AddFixup() is filled with VOODOO !!!)
+#endif
        DEBUG printf("FIXUP@$%X: $%X\n", loc, attr);
 
        // Compute length of expression (could be faster); determine if it's the
@@ -380,27 +384,6 @@ int AddFixup(WORD attr, LONG loc, TOKEN * fexpr)
 }
 
 
-//
-// Resolve all fixups
-//
-int ResolveAllFixups(void)
-{
-       unsigned i;
-       char buf[EBUFSIZ];
-
-       // Make undefined symbols GLOBL
-       if (glob_flag)
-               ForceUndefinedSymbolsGlobal();
-
-       DEBUG printf("Resolving TEXT sections...\n");
-       ResolveFixups(TEXT);
-       DEBUG printf("Resolving DATA sections...\n");
-       ResolveFixups(DATA);
-
-       return 0;
-}
-
-
 //
 // Resolve fixups in a section
 //
@@ -422,8 +405,8 @@ int ResolveFixups(int sno)
        WORD flags;
        unsigned page_jump = 0;
        unsigned address = 0;
-       unsigned j;
-       char buf[EBUFSIZ];
+       //unsigned j;
+       //char buf[EBUFSIZ];
        
        SECT * sc = &sect[sno];
        CHUNK * ch = sc->sffix;
@@ -506,7 +489,6 @@ DEBUG { printf("ResolveFixups: cfileno=%u\n", cfileno); }
 
                                if ((eattr & (GLOBAL | DEFINED)) == GLOBAL)
                                        esym = sy;
-printf("DoFixups: found symbol (%s) [%08X]\n", sy->sname, sy->sattr);
                        }
 
                        tdb = (WORD)(eattr & TDB);
@@ -916,3 +898,24 @@ range:
        return 0;
 }
 
+//
+// Resolve all fixups
+//
+int ResolveAllFixups(void)
+{
+       //unsigned i;
+       //char buf[EBUFSIZ];
+
+       // Make undefined symbols GLOBL
+       if (glob_flag)
+               ForceUndefinedSymbolsGlobal();
+
+       DEBUG printf("Resolving TEXT sections...\n");
+       ResolveFixups(TEXT);
+       DEBUG printf("Resolving DATA sections...\n");
+       ResolveFixups(DATA);
+
+       return 0;
+}
+
+