From 7872dd67ef41b2812819bf7682cc96a81ca75f70 Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Sat, 28 Feb 2009 22:58:14 +0000 Subject: [PATCH] fixed parser.l. Should fix bug #22812 --- parser.l | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/parser.l b/parser.l index 39264f5..137ce54 100644 --- a/parser.l +++ b/parser.l @@ -77,6 +77,15 @@ char *yy_text = (char *) yytext; #ifdef FLEX_SCANNER /* This is flex */ +/* use prototypes in function declarations */ +#define YY_USE_PROTOS + +#ifdef YY_USE_PROTOS +#define YY_PROTO(proto) proto +#else +#define YY_PROTO(proto) () +#endif + #undef YY_INPUT #define YY_INPUT(buf, result, max_size) my_yy_input(buf, &result, max_size) #undef YY_DECL @@ -855,9 +864,9 @@ static YY_BUFFER_STATE my_file_buffer = NULL; */ int yyoffset() { - int pos = yy_c_buf_p - yy_current_buffer->yy_ch_buf; + int pos = yy_c_buf_p - YY_CURRENT_BUFFER->yy_ch_buf; - return(ftell(yy_current_buffer->yy_input_file) - + return(ftell(YY_CURRENT_BUFFER->yy_input_file) - yy_n_chars + pos); } -- 1.7.0.4