X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fxa51%2Fgen.c;h=bf86fa619ca685b20ae43a15d41d15e273f5019b;hb=3062f96ccb55d1d05caf9c8782f4961f87b341ce;hp=508d890fbb7669c4b40e458229bc78e758fc60a0;hpb=90bdb43b342189fcb94a398855d43f3f47f96738;p=fw%2Fsdcc diff --git a/src/xa51/gen.c b/src/xa51/gen.c index 508d890f..bf86fa61 100755 --- a/src/xa51/gen.c +++ b/src/xa51/gen.c @@ -40,12 +40,6 @@ #include "ralloc.h" #include "gen.h" -#if defined(__BORLANDC__) || defined(_MSC_VER) -#define STRCASECMP stricmp -#else -#define STRCASECMP strcasecmp -#endif - extern int allocInfo; /* this is the down and dirty file with all kinds of @@ -66,7 +60,7 @@ _G; extern int xa51_ptrRegReq; extern int xa51_nRegs; -extern FILE *codeOutFile; +extern struct dbuf_s *codeOutBuf; static lineNode *lineHead = NULL; static lineNode *lineCurr = NULL; @@ -814,7 +808,7 @@ static void genFunction (iCode * ic) { emitcode (";", "genFunction %s", sym->rname); /* print the allocation information */ - printAllocInfo (currFunc, codeOutFile); + printAllocInfo (currFunc, codeOutBuf); emitcode ("", "%s:", sym->rname); @@ -1946,7 +1940,9 @@ void genXA51Code (iCode * lic) { cln = ic->lineno; } if (options.iCodeInAsm) { - emitcode("", ";ic:%d: %s", ic->key, printILine(ic)); + char *iLine = printILine(ic); + emitcode("", ";ic:%d: %s", ic->key, iLine); + dbuf_free(iLine); } /* if the result is marked as @@ -2156,6 +2152,6 @@ void genXA51Code (iCode * lic) { peepHole (&lineHead); /* now do the actual printing */ - printLine (lineHead, codeOutFile); + printLine (lineHead, codeOutBuf); return; }