]> git.sur5r.net Git - cc65/blobdiff - src/ca65/symtab.c
The longbranch macros did not work with numeric addresses
[cc65] / src / ca65 / symtab.c
index 7af07dbfedeb847d14c62066126f01a27363a1f0..c54445faec0de0fecbb96804284abb55891ca74a 100644 (file)
@@ -592,7 +592,11 @@ void SymConDes (const char* Name, unsigned Type, unsigned Prio)
     SymEntry* S;
 
     /* Check the parameters */
+#if (CD_TYPE_MIN != 0)
     CHECK (Type >= CD_TYPE_MIN && Type <= CD_TYPE_MAX);
+#else
+    CHECK (Type <= CD_TYPE_MAX);
+#endif
     CHECK (Prio >= CD_PRIO_MIN && Prio <= CD_PRIO_MAX);
 
     /* Don't accept local symbols */
@@ -1019,13 +1023,14 @@ void SymDump (FILE* F)
     while (S) {
        /* Ignore trampoline symbols */
        if ((S->Flags & SF_TRAMPOLINE) != 0) {
-           printf ("%-24s %s %s %s %s %s\n",
-                   S->Name,
-                   (S->Flags & SF_DEFINED)? "DEF" : "---",
-                   (S->Flags & SF_REFERENCED)? "REF" : "---",
-                   (S->Flags & SF_IMPORT)? "IMP" : "---",
-                   (S->Flags & SF_EXPORT)? "EXP" : "---",
-                   (S->Flags & SF_ZP)? "ZP" : "--");
+           fprintf (F,
+                    "%-24s %s %s %s %s %s\n",
+                    S->Name,
+                    (S->Flags & SF_DEFINED)? "DEF" : "---",
+                    (S->Flags & SF_REFERENCED)? "REF" : "---",
+                    (S->Flags & SF_IMPORT)? "IMP" : "---",
+                    (S->Flags & SF_EXPORT)? "EXP" : "---",
+                    (S->Flags & SF_ZP)? "ZP" : "--");
        }
        /* Next symbol */
        S = S->List;