X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=parser.l;h=137ce54cb9734d8b6f2de18c69777f921726aa36;hb=912ff451e7a648f6aa3ba7d2a10df2a1dc2cace5;hp=39264f518da237a0d3147c71f4508ce0a035e3b1;hpb=05bc30b15e31c427ce208495a889e9ff36e6642b;p=xboard.git 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); }