diff options
Diffstat (limited to 'eo_tokenizer.rl')
-rw-r--r-- | eo_tokenizer.rl | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/eo_tokenizer.rl b/eo_tokenizer.rl index 94e8a50..63b7a4b 100644 --- a/eo_tokenizer.rl +++ b/eo_tokenizer.rl @@ -6,13 +6,18 @@ static void _eo_tokenizer_abort(Eo_Tokenizer *toknz, const char *file, const char* fct, int line, - const char *msg) + const char *fmt, ...) { - eina_log_print(_eo_tokenizer_log_dom, EINA_LOG_LEVEL_ERR, file, fct, line, msg); + va_list ap; + va_start (ap, fmt); + eina_log_vprint(_eo_tokenizer_log_dom, EINA_LOG_LEVEL_ERR, + file, fct, line, fmt, ap); + va_end(ap); eo_tokenizer_dump(toknz); exit(EXIT_FAILURE); } -#define ABORT(toknz, msg) _eo_tokenizer_abort(toknz, __FILE__, __FUNCTION__, __LINE__, msg); +#define ABORT(toknz, ...) \ + _eo_tokenizer_abort(toknz, __FILE__, __FUNCTION__, __LINE__, __VA_ARGS__); static const char* _eo_tokenizer_token_get(Eo_Tokenizer *toknz, char *p) |