Revert "use u_char for buffers in yylex"

This reverts commit 03b19f1487.

This merely generates pointer signedness warnings for strtonum() and
lookup() and problems with the const char * prototype of xstrdup().
This commit is contained in:
Christian Neukirchen 2013-12-06 23:16:54 +01:00
parent 873763f4c6
commit 27513daee2

10
parse.y
View File

@ -288,9 +288,9 @@ lookup(char *s)
#define MAXPUSHBACK 128 #define MAXPUSHBACK 128
u_char *parsebuf; char *parsebuf;
int parseindex; int parseindex;
u_char pushback_buffer[MAXPUSHBACK]; char pushback_buffer[MAXPUSHBACK];
int pushback_index = 0; int pushback_index = 0;
int int
@ -383,8 +383,8 @@ findeol(void)
int int
yylex(void) yylex(void)
{ {
u_char buf[8096]; char buf[8096];
u_char *p; char *p;
int quotec, next, c; int quotec, next, c;
int token; int token;
@ -425,7 +425,7 @@ yylex(void)
yyerror("string too long"); yyerror("string too long");
return (findeol()); return (findeol());
} }
*p++ = c; *p++ = (char)c;
} }
yylval.v.string = xstrdup(buf); yylval.v.string = xstrdup(buf);
return (STRING); return (STRING);