* src/regression/compare10.c,
[fw/sdcc] / src / pic / glue.c
index 7b92ab2e79c96869fbada40157e7c700f9418120..41afbc4c75fe85a19a481c2309137d5682d0a6a8 100644 (file)
@@ -1,6 +1,6 @@
 /*-------------------------------------------------------------------------
 
-  SDCCglue.c - glues everything we have done together into one file.
+  glue.c - glues everything we have done together into one file.
                 Written By -  Sandeep Dutta . sandeep.dutta@usa.net (1998)
 
    This program is free software; you can redistribute it and/or modify it
@@ -37,11 +37,9 @@ extern set *externs;
 extern symbol *mainf;
 extern struct dbuf_s *codeOutBuf;
 
-extern DEFSETFUNC(closeTmpFiles);
-extern DEFSETFUNC(rmTmpFiles);
-extern void initialComments(FILE *afile);
-extern operand *operandFromAst(ast *tree, int lvl);
-extern value *initPointer(initList *ilist, sym_link *toType);
+extern void initialComments (FILE *afile);
+extern operand *operandFromAst (ast *tree, int lvl);
+extern value *initPointer (initList *ilist, sym_link *toType);
 
 
 set *pic14_localFunctions = NULL;
@@ -66,7 +64,7 @@ static struct dbuf_s *ivalBuf, *extBuf, *gloBuf, *gloDefBuf;
 
 static set *emitted = NULL;
 
-static void showAllMemmaps(FILE *of); // XXX: emits initialized symbols
+static void showAllMemmaps (FILE *of); // XXX: emits initialized symbols
 
 static void
 emitPseudoStack(struct dbuf_s *oBuf, struct dbuf_s *oBufExt)
@@ -264,7 +262,8 @@ pic14createInterruptVect (struct dbuf_s * vBuf)
         dbuf_printf (vBuf, "%s", iComments2);
         dbuf_printf (vBuf, "; reset vector \n");
         dbuf_printf (vBuf, "%s", iComments2);
-        dbuf_printf (vBuf, "STARTUP\t%s\n", CODE_NAME); // Lkr file should place section STARTUP at address 0x0
+        // Lkr file should place section STARTUP at address 0x0, but does not ...
+        dbuf_printf (vBuf, "STARTUP\t%s 0x0000\n", CODE_NAME);
         dbuf_printf (vBuf, "\tnop\n"); /* first location for used by incircuit debugger */
         dbuf_printf (vBuf, "\tpagesel __sdcc_gsinit_startup\n");
         dbuf_printf (vBuf, "\tgoto\t__sdcc_gsinit_startup\n");
@@ -280,7 +279,7 @@ pic14initialComments (FILE * afile)
 {
         initialComments (afile);
         fprintf (afile, "; PIC port for the 14-bit core\n");
-        fprintf (afile, iComments2);
+        fprintf (afile, "%s", iComments2);
 
 }
 
@@ -542,11 +541,11 @@ picglue ()
 
         if ((noAssemble || options.c1mode) && fullDstFileName)
         {
-                sprintf (buffer, fullDstFileName);
+                sprintf (buffer, "%s", fullDstFileName);
         }
         else
         {
-                sprintf (buffer, dstFileName);
+                sprintf (buffer, "%s", dstFileName);
                 strcat (buffer, ".asm");
         }