* src/SDCCmain.c: removed option -C since SDCC compiler doesn't know
[fw/sdcc] / src / pic16 / gen.c
index 00ffa03838faa168bf1fa0b3b5d3fb709d9a4fda..7f9dbe233b1fe782e292a873fe6e4482ede89c58 100644 (file)
@@ -182,7 +182,7 @@ static struct {
 
 extern int pic16_ptrRegReq ;
 extern int pic16_nRegs;
-extern FILE *codeOutFile;
+extern struct dbuf_s *codeOutBuf;
 //static void saverbank (int, iCode *,bool);
 
 static lineNode *lineHead = NULL;
@@ -955,7 +955,9 @@ static asmop *aopForRemat (operand *op, bool result) // x symbol *sym)
        for (;;) {
                oldic = ic;
 
-//             pic16_emitpcomment("ic: %s\n", printILine(ic));
+//              chat *iLine = printILine(ic);
+//             pic16_emitpcomment("ic: %s\n", iLine);
+//              dbuf_free(iLine);
        
                if (ic->op == '+') {
                        val += (int) operandLitValue(IC_RIGHT(ic));
@@ -3596,12 +3598,6 @@ static int resultRemat (iCode *ic)
   return 0;
 }
 
-#if defined(__BORLANDC__) || defined(_MSC_VER)
-#define STRCASECMP stricmp
-#else
-#define STRCASECMP strcasecmp
-#endif
-
 #if 0
 /*-----------------------------------------------------------------*/
 /* inExcludeList - return 1 if the string is in exclude Reg list   */
@@ -13179,12 +13175,12 @@ static void genCast (iCode *ic)
              tag = GPTR_TAG_CODE;
            } else if (IS_PTR(rtype)) {
              PERFORM_ONCE(weirdcast,
-             fprintf (stderr, "%s:%u: WARNING: casting `(generic*)(unknown*)' -- assumimg __data space\n", ic->filename, ic->lineno);
+             fprintf (stderr, "%s:%u: WARNING: casting `(generic*)(unknown*)' -- assuming __data space\n", ic->filename, ic->lineno);
              );
              tag = GPTR_TAG_DATA;
            } else {
              PERFORM_ONCE(weirdcast,
-             fprintf (stderr, "%s:%u: WARNING: casting `(generic*)(non-pointer)' -- assumimg __data space\n", ic->filename, ic->lineno);
+             fprintf (stderr, "%s:%u: WARNING: casting `(generic*)(non-pointer)' -- assuming __data space\n", ic->filename, ic->lineno);
              );
              tag = GPTR_TAG_DATA;
            }
@@ -13638,11 +13634,12 @@ void genpic16Code (iCode *lic)
       }
        
       if(options.iCodeInAsm) {
-        char *l;
+        char *iLine;
 
           /* insert here code to print iCode as comment */
-          l = Safe_strdup(printILine(ic));
-          pic16_emitpcomment("ic:%d: %s", ic->seq, l);
+          iLine = printILine(ic);
+          pic16_emitpcomment("ic:%d: %s", ic->seq, iLine);
+          dbuf_free(iLine);
       }
 
       /* if the result is marked as
@@ -13850,7 +13847,7 @@ void genpic16Code (iCode *lic)
       peepHole (&lineHead);
 
     /* now do the actual printing */
-    printLine (lineHead, codeOutFile);
+    printLine (lineHead, codeOutBuf);
 
 #ifdef PCODE_DEBUG
     DFPRINTF((stderr,"printing pBlock\n\n"));