removed a warning :)
[fw/sdcc] / src / SDCCglue.c
index c2fea95f8db60af23fb62ce15a1ddcbbc4ff1c88..a1d0f57ca5e8db638810a5a18b211ff62f2ba66d 100644 (file)
@@ -463,7 +463,7 @@ pointerTypeToGPByte (const int p_type)
 void 
 _printPointerType (FILE * oFile, const char *name)
 {
-  if (IS_DS390_PORT)
+  if (TARGET_IS_DS390)
     {
       fprintf (oFile, "\t.byte %s,(%s >> 8),(%s >> 16)", name, name, name);
     }
@@ -814,9 +814,9 @@ printIvalCharPtr (symbol * sym, sym_link * type, value * val, FILE * oFile)
        }
     }
 
-
-  if (val->sym && val->sym->isstrlit)
+  if (val->sym && val->sym->isstrlit && !isinSet(statsg->syms, val->sym)) {
     addSet (&statsg->syms, val->sym);
+  }
 
   return 1;
 }
@@ -883,7 +883,11 @@ printIvalPtr (symbol * sym, sym_link * type, initList * ilist, FILE * oFile)
     }
   else if (size == FPTRSIZE)
     {
-      tfprintf (oFile, "\t!dws\n", val->name);
+      if (port->use_dw_for_init) {
+       tfprintf (oFile, "\t!dws\n", val->name);
+      } else {
+       printPointerType (oFile, val->name);
+      }
     }
   else if (size == GPTRSIZE)
     {
@@ -1297,7 +1301,7 @@ glue ()
   if (!options.c1mode)
     {
       sprintf (buffer, srcFileName);
-      strcat (buffer, ".asm");
+      strcat (buffer, port->assembler.file_ext);
     }
   else
     {