X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=sect.c;h=64ccb441b759cb6f212fc96faf5210bbc4ee045e;hp=ab5c4aab8dc831a56539c65f04d0231c3d637175;hb=c74d8ef6f193cb2be876c920c5cb7f599dd5418a;hpb=ec655dd3711a3cf470e90ba1f12a8206f7df3fd3 diff --git a/sect.c b/sect.c index ab5c4aa..64ccb44 100644 --- 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 = §[sno]; CHUNK * ch = sc->sffix; @@ -915,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; +} + +