1 |
diff -u flex-2.5.35/scan.c flex-2.5.35/scan.c |
2 |
--- flex-2.5.35/scan.c |
3 |
+++ flex-2.5.35/scan.c |
4 |
@@ -2096,7 +2096,7 @@ |
5 |
/* This used to be an fputs(), but since the string might contain NUL's, |
6 |
* we now use fwrite(). |
7 |
*/ |
8 |
-#define ECHO fwrite( yytext, yyleng, 1, yyout ) |
9 |
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) |
10 |
#endif |
11 |
|
12 |
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |
13 |
diff -u flex-2.5.35/flex.skl flex-2.5.35/flex.skl |
14 |
--- flex-2.5.35/flex.skl |
15 |
+++ flex-2.5.35/flex.skl |
16 |
@@ -1075,7 +1075,7 @@ |
17 |
/* This used to be an fputs(), but since the string might contain NUL's, |
18 |
* we now use fwrite(). |
19 |
*/ |
20 |
-#define ECHO fwrite( yytext, yyleng, 1, yyout ) |
21 |
+#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) |
22 |
%endif |
23 |
%if-c++-only C++ definition |
24 |
#define ECHO LexerOutput( yytext, yyleng ) |
25 |
diff -u flex-2.5.35/skel.c flex-2.5.35/skel.c |
26 |
--- flex-2.5.35/skel.c |
27 |
+++ flex-2.5.35/skel.c |
28 |
@@ -1142,7 +1142,7 @@ |
29 |
"/* This used to be an fputs(), but since the string might contain NUL's,", |
30 |
" * we now use fwrite().", |
31 |
" */", |
32 |
- "#define ECHO fwrite( yytext, yyleng, 1, yyout )", |
33 |
+ "#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)", |
34 |
"%endif", |
35 |
"%if-c++-only C++ definition", |
36 |
"#define ECHO LexerOutput( yytext, yyleng )", |