summaryrefslogtreecommitdiffstats
path: root/scripts/genksyms/lex.lex.c_shipped
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2011-10-11 12:07:05 +0200
committerMichal Marek <mmarek@suse.cz>2011-10-11 12:07:05 +0200
commit0359de7dd501f694f01b61364c9b633eab41f494 (patch)
tree9c52b92a50c413a7453a8861fcf17d54f3214682 /scripts/genksyms/lex.lex.c_shipped
parentgenksyms: Do not expand internal types (diff)
downloadlinux-0359de7dd501f694f01b61364c9b633eab41f494.tar.xz
linux-0359de7dd501f694f01b61364c9b633eab41f494.zip
genksyms: Regenerate lexer and parser
Diffstat (limited to 'scripts/genksyms/lex.lex.c_shipped')
-rw-r--r--scripts/genksyms/lex.lex.c_shipped12
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/genksyms/lex.lex.c_shipped b/scripts/genksyms/lex.lex.c_shipped
index c83cf60410be..0bf4157e6161 100644
--- a/scripts/genksyms/lex.lex.c_shipped
+++ b/scripts/genksyms/lex.lex.c_shipped
@@ -660,7 +660,7 @@ static int input (void );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
-#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
+#define ECHO fwrite( yytext, yyleng, 1, yyout )
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
@@ -671,7 +671,7 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- unsigned n; \
+ int n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
@@ -1926,6 +1926,7 @@ void yyfree (void * ptr )
cur_node->tag = \
find_symbol(cur_node->string, SYM_ENUM_CONST, 1)?\
SYM_ENUM_CONST : SYM_NORMAL ; \
+ cur_node->in_source_file = in_source_file; \
} while (0)
#define APP _APP(yytext, yyleng)
@@ -1975,6 +1976,13 @@ repeat:
cur_filename = memcpy(xmalloc(e-file+1), file, e-file+1);
cur_line = atoi(yytext+2);
+ if (!source_file) {
+ source_file = xstrdup(cur_filename);
+ in_source_file = 1;
+ } else {
+ in_source_file = (strcmp(cur_filename, source_file) == 0);
+ }
+
goto repeat;
}