diff options
Diffstat (limited to 'runtime/rsconf.c')
-rw-r--r-- | runtime/rsconf.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/runtime/rsconf.c b/runtime/rsconf.c index abce53b8..c855779e 100644 --- a/runtime/rsconf.c +++ b/runtime/rsconf.c @@ -292,6 +292,21 @@ finalize_it: extern int yylineno; void +parser_warnmsg(char *fmt, ...) +{ + va_list ap; + char errBuf[1024]; + + va_start(ap, fmt); + if(vsnprintf(errBuf, sizeof(errBuf), fmt, ap) == sizeof(errBuf)) + errBuf[sizeof(errBuf)-1] = '\0'; + errmsg.LogError(0, RS_RET_CONF_PARSE_WARNING, + "warning during parsing file %s, on or before line %d: %s", + cnfcurrfn, yylineno, errBuf); + va_end(ap); +} + +void parser_errmsg(char *fmt, ...) { va_list ap; |