]> git.sur5r.net Git - cc65/blobdiff - src/cc65/preproc.c
Amiga install files by Stefan Haubenthal.
[cc65] / src / cc65 / preproc.c
index 4f7e77fce4caea776ed1c94b769b25a1c4602284..846d07966b938a1c95cb9bb97a9d3929bd0e8777 100644 (file)
@@ -672,8 +672,9 @@ static void MacroCall (StrBuf* Target, Macro* M)
 static void ExpandMacro (StrBuf* Target, Macro* M)
 /* Expand a macro into Target */
 {
+    /* ### printf ("Expanding %s(%u)\n", M->Name, ++V); */
+
     /* Check if this is a function like macro */
-    //printf ("Expanding %s(%u)\n", M->Name, ++V);
     if (M->ArgCount >= 0) {
 
         int Whitespace = IsSpace (CurC);
@@ -710,7 +711,7 @@ static void ExpandMacro (StrBuf* Target, Macro* M)
         DoneMacroExp (&E);
 
     }
-    //printf ("Done with %s(%u)\n", M->Name, V--);
+    /* ### printf ("Done with %s(%u)\n", M->Name, V--); */
 }
 
 
@@ -770,7 +771,7 @@ static void DefineMacro (void)
                 NextChar ();
                 NextChar ();
 
-                /* Remember that the macro is variadic and use __VA_ARGS__ as 
+                /* Remember that the macro is variadic and use __VA_ARGS__ as
                  * the argument name.
                  */
                 AddMacroArg (M, "__VA_ARGS__");
@@ -827,7 +828,7 @@ static void DefineMacro (void)
         SB_Drop (&M->Replacement, 1);
     }
 
-    //printf ("%s: <%.*s>\n", M->Name, SB_GetLen (&M->Replacement), SB_GetConstBuf (&M->Replacement));
+    /* ### printf ("%s: <%.*s>\n", M->Name, SB_GetLen (&M->Replacement), SB_GetConstBuf (&M->Replacement)); */
 
     /* If we have an existing macro, check if the redefinition is identical.
      * Print a diagnostic if not.
@@ -1063,6 +1064,7 @@ static int DoIf (int Skip)
      * the following line.
      */
     SB_AppendStr (Line, ";;");
+    SB_Terminate (Line);
 
     /* Load CurTok and NextTok with tokens from the new input */
     NextToken ();