X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cfe780fb99dc42d454625b1ea88ae687c54acbf1..f7a11f8c8e665992e2d1956b2b89d2f562c92669:/src/common/lexer.l?ds=inline diff --git a/src/common/lexer.l b/src/common/lexer.l index 02e95f54a9..4c90a2966c 100644 --- a/src/common/lexer.l +++ b/src/common/lexer.l @@ -12,6 +12,7 @@ WORDCHAR [^'\\] * either lex and flex. */ #include +#include /* +++steve162e: added, otherwise, PROIO_input will be undefined (at least under LINUX) please check, if this is also TRUE under other UNIXes. @@ -24,9 +25,6 @@ WORDCHAR [^'\\] #include "wx/expr.h" -#ifdef wx_x -extern char *malloc(); -#endif #define Return(x) return x; #if defined(VMS) && !defined(strdup) @@ -39,10 +37,9 @@ static size_t lex_string_ptr = 0; static int lex_read_from_string = 0; static int my_input(void); -static int my_unput(char); #ifdef FLEX_SCANNER -#undef YY_INPUT +# undef YY_INPUT # define YY_INPUT(buf,result,max_size) \ if (lex_read_from_string) \ { int c = my_input(); result = (c == 0) ? YY_NULL : ((buf)[0]=(c), 1); } \ @@ -52,6 +49,7 @@ static int my_unput(char); #else # undef unput # define unput(_c) my_unput(_c) + static int my_unput(char); #endif %} @@ -120,9 +118,6 @@ static int lex_input() { static int lex_input() { return input(); } -/* # undef unput -# define unput(_c) my_unput(_c) -*/ # undef input # define input() my_input() @@ -190,6 +185,8 @@ static int my_input( void ) void wxExprCleanUp() { +#ifdef FLEX_SCANNER if (yy_current_buffer) yy_delete_buffer(yy_current_buffer); +#endif }