From: Vern Paxson Date: Sun, 3 Oct 1993 17:34:54 +0000 (+0000) Subject: Got rid of (char *) casts of yytext, no longer needed. X-Git-Tag: flex-2-5-5b~385 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fef15fbf76e626005c5b73f95ae00b9be4692abd;p=flex Got rid of (char *) casts of yytext, no longer needed. --- diff --git a/flex.skl b/flex.skl index 09c765c..afb7857 100644 --- a/flex.skl +++ b/flex.skl @@ -71,15 +71,14 @@ /* Copy whatever the last rule matched to the standard output. */ -/* Cast to (char *) is because for 8-bit chars, yytext is (unsigned char *) */ -/* this used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ #ifndef ECHO %- Standard (non-C++) definition -#define ECHO (void) fwrite( (char *) yytext, yyleng, 1, yyout ) +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) %+ C++ definition -#define ECHO LexerOutput( (const char *) yytext, yyleng ) +#define ECHO LexerOutput( yytext, yyleng ) %* #endif diff --git a/gen.c b/gen.c index 9f2f558..ee0f6ff 100644 --- a/gen.c +++ b/gen.c @@ -1052,7 +1052,7 @@ void make_tables() indent_puts( "YY_FATAL_ERROR( \"token too large, exceeds YYLMAX\" ); \\" ); indent_down(); - indent_puts( "strcpy( yytext, (char *) yytext_ptr ); \\" ); + indent_puts( "strcpy( yytext, yytext_ptr ); \\" ); } set_indent( 0 );