]> thyrsus.com Git - intercal.git/commitdiff
Add some const to the *.y and *.l files.
authorArvid Norlander <anmaster@tele2.se>
Tue, 18 Nov 2008 17:45:47 +0000 (12:45 -0500)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 26 Aug 2010 00:35:18 +0000 (20:35 -0400)
src/lexer.l
src/oil.y
src/parser.y

index 9bd5538645b479a9d170e20f69b5b87b923c1901..0ee48a87b9a71874ace4632ac68dec5b0efe2966 100644 (file)
@@ -81,7 +81,7 @@ static char *lineptr = linebuf;
 ick_bool re_send_token = ick_FALSE;
 
 int lexer(void);
-static int myatoi(char *text);
+static int myatoi(const char *text);
 
 #define SETLINENO                                      \
     {if (stbeginline == 0)     stbeginline = iyylineno;\
@@ -469,7 +469,7 @@ int lexer(void)
     return(tok);
 }
 
-static int myatoi(char *text) /* AIS */
+static int myatoi(const char *text) /* AIS */
 {
 #define MAXTEXT 100
     static char buf[MAXTEXT];
@@ -492,7 +492,7 @@ static int myatoi(char *text) /* AIS */
     return atoi(thinbuf);
 }
 
-void yyerror(char *errtype)
+void yyerror(const char *errtype)
 {
 #ifdef MAIN
     (void) printf("lextest: lexer error: %s.\n", errtype);
index 5bb065e9877996f1121b0bd396d5bb6a0e0c757c..e01f2900784fa35c8eaf1c56a6d84a8625393584 100644 (file)
--- a/src/oil.y
+++ b/src/oil.y
@@ -69,12 +69,12 @@ struct ickstype
                         sequence of lvals (=0) or rvals (=1) this is from the
                         root; depth bits from the end are relevant, and the
                         bit nearest the root is least significant */
-  char* condition;    /* Points to a constant string; the condition to generate
+  const char* condition; /* Points to a constant string; the condition to generate
                         on that node. Could also point to something the lexer
                         mallocs, but then the lexer has to keep track of being
                         able to free it again. If this is NULL, it means that
                         there isn't a condition other than maybe mustbemesh */
-  char* nodetypename; /* The name of the type of node this condition matches,
+  const char* nodetypename; /* The name of the type of node this condition matches,
                         or NULL for a LEXERLEAF */
   mybool usec;        /* Whether to append the value of c to the condition */
   mybool mustbemesh;  /* Must this node be a mesh or mesh32? */
index 901b2bced69ed753581fa147083a072c2ed15a87..eb2125df7c4e660a6580e63b41681538b972b682 100644 (file)
@@ -36,7 +36,7 @@ LICENSE TERMS
 #include "feh.h"
 #include "ick_lose.h"
 
-extern int yyerror(char*);
+extern int yyerror(const char*);
 
 /* Intervene our ick_first-stage lexer. */
 extern int lexer(void);