1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-25 13:55:34 -05:00

New FLEX version compares against 0 for EOF other (old) against EOF (-1)

This commit is contained in:
Dave Davenport 2017-04-05 08:26:11 +02:00
parent cada24250c
commit 557241ba94

View file

@ -1,4 +1,5 @@
%option noyywrap
%option nodefault noyywrap
%option nostdinit
%option nounput
%option never-interactive
%option bison-locations
@ -59,7 +60,7 @@ static char * rofi_theme_parse_prepare_file ( const char *file, const char *pare
#define YY_INPUT(buf,result,max_size) \
{\
if ( current == NULL ) {\
result = YY_NULL;\
result = 0;\
} else {\
switch ( current->type ) { \
case PT_FILE:\
@ -86,8 +87,8 @@ static char * rofi_theme_parse_prepare_file ( const char *file, const char *pare
current->str_len-=len;\
result = len;\
} else {\
result = YY_NULL;\
} \
result = 0;\
}\
}\
}\
}\
@ -171,14 +172,15 @@ if ( queue == NULL ){
*/
<*>"//" {
int c;
while ((c = input()) != 0){
int c = input();
while ( c != 0 && c != EOF){
if (c == '\n') {
yylloc->last_column = 1;
yylloc->last_line ++;
break;
}
yylloc->last_column++;
c = input();
}
YY_LLOC_START
}
@ -197,6 +199,7 @@ if ( queue == NULL ){
break;
}
case 0: nesting_depth = 0; break;
case EOF: nesting_depth = 0; break;
default:
yylloc->last_column++;
;