Re: [cc65] "--feature labels_without_colons" not always working with 2.11.0?

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2005-11-17 19:18:07
Hi!

On Tue, Nov 15, 2005 at 12:02:00PM +0100, Spiro Trikaliotis wrote:
> Perhaps, you will come up with an even better solution (it is your
> source, not mine. ;))

My solution looks like follows:

---------------------------------------------------------------------------
Index: src/ca65/scanner.c
===================================================================
RCS file: /usr/local/cvsroot/uz/c64/cc65/src/ca65/scanner.c,v
retrieving revision 1.56
diff -u -b -r1.56 scanner.c
--- src/ca65/scanner.c	31 Aug 2005 21:29:11 -0000	1.56
+++ src/ca65/scanner.c	17 Nov 2005 18:14:17 -0000
@@ -364,10 +364,12 @@
      	IFile  	    = I;
      	++ICount;

-     	/* Setup the next token and character so it will be skipped on the
-         * next call to NextRawTok().
+        /* Read the first character from the new file */
+        NextChar ();
+
+     	/* Setup the next token so it will be skipped on the next call to
+         * NextRawTok().
          */
-        C = ' ';
         Tok = TOK_SEP;

     }
@@ -413,10 +415,12 @@
     I->Next   	= IData;
     IData     	= I;

-    /* Setup the next token and character so it will be skipped on the
-     * next call to NextRawTok().
+    /* Read the first character from the new file */
+    NextChar ();
+
+    /* Setup the next token so it will be skipped on the next call to
+     * NextRawTok().
      */
-    C = ' ';
     Tok = TOK_SEP;
 }
---------------------------------------------------------------------------

This should fix the problem, but I'm not 100% sure it won't introduce others,
so I would be glad if you could test it and tell me the results. If the patch
seems to work without bad side effects, I will apply it officially.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Thu Nov 17 19:18:18 2005

This archive was generated by hypermail 2.1.8 : 2005-11-17 19:18:20 CET