]> granicus.if.org Git - flex/commitdiff
Got rid of (char *) casts of yytext, no longer needed.
authorVern Paxson <vern@ee.lbl.gov>
Sun, 3 Oct 1993 17:34:54 +0000 (17:34 +0000)
committerVern Paxson <vern@ee.lbl.gov>
Sun, 3 Oct 1993 17:34:54 +0000 (17:34 +0000)
flex.skl
gen.c

index 09c765c29b20a08489647bda34d7113ba2177908..afb785747caf07b0d68fa50ab44e30ca42eb389b 100644 (file)
--- a/flex.skl
+++ b/flex.skl
 
 /* 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 9f2f5587123bcfef14d1979814691d2f64e27abb..ee0f6ffdb2387de4e87020957262f713e4b3e034 100644 (file)
--- 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 );