X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=blobdiff_plain;f=parser.l;fp=parser.l;h=bdf11d0858cc47fa13a7a8f1c37ab9039e2ebdb5;hp=48e78f33d8a6a722395b8ed235a295335377cd3b;hb=ea750683ac62717dd7346de17b5ae072622ff92a;hpb=74025874f2010f84fd4f7f2e120e84b56ee9781b diff --git a/parser.l b/parser.l index 48e78f3..bdf11d0 100755 --- a/parser.l +++ b/parser.l @@ -87,6 +87,16 @@ char *yy_text = (char *) yytext; #ifdef FLEX_SCANNER /* This is flex */ +/* [AP] use prototypes in function declarations */ +#define YY_USE_PROTOS + +#ifdef YY_USE_PROTOS +#define YY_PROTO(proto) proto +#else +#define YY_PROTO(proto) () +#endif +/* end of [AP] fix */ + #undef YY_INPUT #define YY_INPUT(buf, result, max_size) my_yy_input(buf, &result, max_size) #undef YY_DECL @@ -1040,9 +1050,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); }