diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-07-12 12:14:47 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-07-12 12:14:47 +0200 |
commit | a5bc2a8b4bdf8b7834326ae6410c3bc7285fa1e8 (patch) | |
tree | ea303676c318c2161a4a89606cbb6449bb40a88e /grammar | |
parent | 80701b698802efe1bcecac09afcd393dd4bd3d5c (diff) | |
download | rsyslog-a5bc2a8b4bdf8b7834326ae6410c3bc7285fa1e8.tar.gz rsyslog-a5bc2a8b4bdf8b7834326ae6410c3bc7285fa1e8.tar.xz rsyslog-a5bc2a8b4bdf8b7834326ae6410c3bc7285fa1e8.zip |
removed emergency config, do error reporting on fatal config file error
Diffstat (limited to 'grammar')
-rw-r--r-- | grammar/lexer.l | 8 | ||||
-rw-r--r-- | grammar/parserif.h | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/grammar/lexer.l b/grammar/lexer.l index d56b4fc2..0c82a4af 100644 --- a/grammar/lexer.l +++ b/grammar/lexer.l @@ -75,7 +75,7 @@ struct bufstack { es_str_t *estr; } *currbs = NULL; -char *currfn; /* name of currently processed file */ +char *cnfcurrfn; /* name of currently processed file */ int popfile(void); int cnfSetLexFile(char *fname); @@ -220,7 +220,7 @@ cnfParseBuffer(char *buf, unsigned lenBuf) bs->bs = yy_scan_buffer(buf, lenBuf); bs->estr = NULL; currbs = bs; - currfn = bs->fn; + cnfcurrfn = bs->fn; yylineno = 1; done: return r; } @@ -259,7 +259,7 @@ cnfSetLexFile(char *fname) bs->bs = yy_scan_buffer((char*)es_getBufAddr(str), es_strlen(str)); bs->estr = str; /* needed so we can free it later */ currbs = bs; - currfn = bs->fn; + cnfcurrfn = bs->fn; yylineno = 1; done: @@ -294,6 +294,6 @@ popfile(void) yy_switch_to_buffer(currbs->bs); yylineno = currbs->lineno; - currfn = currbs->fn; + cnfcurrfn = currbs->fn; return 0; } diff --git a/grammar/parserif.h b/grammar/parserif.h index bebb1dfb..58b8fbdd 100644 --- a/grammar/parserif.h +++ b/grammar/parserif.h @@ -4,6 +4,7 @@ int cnfSetLexFile(char*); int yyparse(); int yydebug; +char *cnfcurrfn; void dbgprintf(char *fmt, ...) __attribute__((format(printf, 1, 2))); void parser_errmsg(char *fmt, ...) __attribute__((format(printf, 1, 2))); |