diff options
author | Mightyjo <mightyjo@gmail.com> | 2015-11-27 21:38:23 -0500 |
---|---|---|
committer | Will Estes <westes575@gmail.com> | 2015-11-29 17:20:22 -0500 |
commit | a97cf48486226d538797ef721c62a80b9327c43f (patch) | |
tree | 9744e98330df3c31dbeced82f7ad128bb5268221 /src/scan.l | |
parent | 45db9033fefa30cdc263db6ede60807da7da89c5 (diff) |
Replaced CHAR macro with unsigned char type.
Thanks to Michael McConville for pointing out that the old Char macro
causes problems with static analysis. The macro has been removed and
replaced with 'unsigned char' throughout the flex sources. The macro is
not needed at best and was confusing at worst. It was not used in any of
the example files nor was it mentioned in the manual at all.
Diffstat (limited to 'src/scan.l')
-rw-r--r-- | src/scan.l | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -135,7 +135,7 @@ M4QEND "]]" int doing_codeblock = false; int i, brace_depth=0, brace_start_line=0; - Char nmdef[MAXLINE]; + unsigned char nmdef[MAXLINE]; <INITIAL>{ @@ -627,7 +627,7 @@ M4QEND "]]" * The reason it was disabled is so yacc/bison can parse * ccl operations, such as ccl difference and union. */ - && (cclval = ccllookup( (Char *) nmstr )) != 0 ) + && (cclval = ccllookup( (unsigned char *) nmstr )) != 0 ) { if ( input() != ']' ) synerr( _( "bad character class" ) ); @@ -641,7 +641,7 @@ M4QEND "]]" /* We fudge a bit. We know that this ccl will * soon be numbered as lastccl + 1 by cclinit. */ - cclinstal( (Char *) nmstr, lastccl + 1 ); + cclinstal( (unsigned char *) nmstr, lastccl + 1 ); /* Push back everything but the leading bracket * so the ccl can be rescanned. @@ -661,7 +661,7 @@ M4QEND "]]" * context. */ "{"{NAME}"}"[[:space:]]? { - Char *nmdefptr; + unsigned char *nmdefptr; int end_is_ws, end_ch; end_ch = yytext[yyleng-1]; @@ -947,7 +947,7 @@ nmstr[yyleng - 2 - end_is_ws] = '\0'; /* chop trailing brace */ } <SECT2,QUOTE,FIRSTCCL,CCL>{ESCSEQ} { - yylval = myesc( (Char *) yytext ); + yylval = myesc( (unsigned char *) yytext ); if ( YY_START == FIRSTCCL ) BEGIN(CCL); |