]> git.sur5r.net Git - cc65/blobdiff - src/ca65/nexttok.c
Add co65 utility
[cc65] / src / ca65 / nexttok.c
index 5de8b9cb69b474cb5c83c145bebf2ae4577572bf..9c3b709b2e2f99a44c0a68cd5349082fe0807400 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 2000     Ullrich von Bassewitz                                        */
-/*              Wacholderweg 14                                              */
-/*              D-70597 Stuttgart                                            */
-/* EMail:       uz@musoftware.de                                             */
+/* (C) 2000-2003 Ullrich von Bassewitz                                       */
+/*               Wacholderweg 14                                             */
+/*               D-70597 Stuttgart                                           */
+/* EMail:        uz@musoftware.de                                            */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
@@ -79,7 +79,7 @@ static TokList* CollectTokens (unsigned Start, unsigned Count)
     while (Parens != 0 || Tok != TOK_RPAREN) {
 
        /* Check for end of line or end of input */
-       if (Tok == TOK_SEP || Tok == TOK_EOF) {
+       if (TokIsSep (Tok)) {
            Error (ERR_UNEXPECTED_EOL);
            return List;
        }
@@ -295,7 +295,7 @@ static void FuncRight (void)
     List = CollectTokens (0, 9999);
 
     /* Delete tokens from the list until Count tokens are remaining */
-    while (List->Count > Count) {
+    while (List->Count > (unsigned) Count) {
        /* Get the first node */
        TokNode* T = List->Root;
 
@@ -459,7 +459,7 @@ void ConsumeComma (void)
 void SkipUntilSep (void)
 /* Skip tokens until we reach a line separator or end of file */
 {
-    while (Tok != TOK_SEP && Tok != TOK_EOF) {
+    while (!TokIsSep (Tok)) {
        NextTok ();
     }
 }