]> git.sur5r.net Git - cc65/blobdiff - src/ca65/repeat.c
New module strstack
[cc65] / src / ca65 / repeat.c
index b442c165f0a57e609abe0bf57984699db643ee4a..cfe27279bddb57e089efc56f17310fcb39c9d456 100644 (file)
@@ -33,6 +33,8 @@
 
 
 
+#include <string.h>
+
 /* common */
 #include "xmalloc.h"
 
@@ -65,7 +67,7 @@ static TokList* CollectRepeatTokens (void)
 
        /* Check for end of input */
                if (Tok == TOK_EOF) {
-           Error (ERR_UNEXPECTED_EOF);
+           Error ("Unexpected end of file");
            FreeTokList (List);
            return 0;
        }
@@ -106,7 +108,7 @@ static void RepeatTokenCheck (TokList* L)
 /* Called each time a token from a repeat token list is set. Is used to check
  * for and replace identifiers that are the repeat counter.
  */
-{                
+{
     if (Tok == TOK_IDENT && L->Data != 0 && strcmp (SVal, L->Data) == 0) {
        /* Must replace by the repeat counter */
        Tok  = TOK_INTCON;
@@ -125,7 +127,7 @@ void ParseRepeat (void)
     /* Repeat count follows */
     long RepCount = ConstExpression ();
     if (RepCount < 0) {
-       Error (ERR_RANGE);
+       Error ("Range error");
        RepCount = 0;
     }
 
@@ -138,7 +140,7 @@ void ParseRepeat (void)
 
                /* Check for an identifier */
                if (Tok != TOK_IDENT) {
-                   ErrorSkip (ERR_IDENT_EXPECTED);
+                   ErrorSkip ("Identifier expected");
                } else {
                    /* Remember the name and skip it */
                    Name = xstrdup (SVal);