mirror of
https://github.com/lbonn/rofi
synced 2024-11-15 08:37:17 +00:00
New FLEX version compares against 0 for EOF other (old) against EOF (-1)
This commit is contained in:
parent
cada24250c
commit
557241ba94
1 changed files with 9 additions and 6 deletions
|
@ -1,4 +1,5 @@
|
||||||
%option noyywrap
|
%option nodefault noyywrap
|
||||||
|
%option nostdinit
|
||||||
%option nounput
|
%option nounput
|
||||||
%option never-interactive
|
%option never-interactive
|
||||||
%option bison-locations
|
%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) \
|
#define YY_INPUT(buf,result,max_size) \
|
||||||
{\
|
{\
|
||||||
if ( current == NULL ) {\
|
if ( current == NULL ) {\
|
||||||
result = YY_NULL;\
|
result = 0;\
|
||||||
} else {\
|
} else {\
|
||||||
switch ( current->type ) { \
|
switch ( current->type ) { \
|
||||||
case PT_FILE:\
|
case PT_FILE:\
|
||||||
|
@ -86,7 +87,7 @@ static char * rofi_theme_parse_prepare_file ( const char *file, const char *pare
|
||||||
current->str_len-=len;\
|
current->str_len-=len;\
|
||||||
result = len;\
|
result = len;\
|
||||||
} else {\
|
} else {\
|
||||||
result = YY_NULL;\
|
result = 0;\
|
||||||
}\
|
}\
|
||||||
}\
|
}\
|
||||||
}\
|
}\
|
||||||
|
@ -171,14 +172,15 @@ if ( queue == NULL ){
|
||||||
*/
|
*/
|
||||||
|
|
||||||
<*>"//" {
|
<*>"//" {
|
||||||
int c;
|
int c = input();
|
||||||
while ((c = input()) != 0){
|
while ( c != 0 && c != EOF){
|
||||||
if (c == '\n') {
|
if (c == '\n') {
|
||||||
yylloc->last_column = 1;
|
yylloc->last_column = 1;
|
||||||
yylloc->last_line ++;
|
yylloc->last_line ++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
yylloc->last_column++;
|
yylloc->last_column++;
|
||||||
|
c = input();
|
||||||
}
|
}
|
||||||
YY_LLOC_START
|
YY_LLOC_START
|
||||||
}
|
}
|
||||||
|
@ -197,6 +199,7 @@ if ( queue == NULL ){
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 0: nesting_depth = 0; break;
|
case 0: nesting_depth = 0; break;
|
||||||
|
case EOF: nesting_depth = 0; break;
|
||||||
default:
|
default:
|
||||||
yylloc->last_column++;
|
yylloc->last_column++;
|
||||||
;
|
;
|
||||||
|
|
Loading…
Reference in a new issue