Mercurial > dnsbl
diff src/tokenizer.h @ 213:44ffef730bc4
cleanup tokenizer differences with other projects, update tld list
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Wed, 30 Apr 2008 13:11:32 -0700 |
parents | c7fc218686f5 |
children | 82886d4dd71f |
line wrap: on
line diff
--- a/src/tokenizer.h Sat Mar 22 11:25:30 2008 -0700 +++ b/src/tokenizer.h Wed Apr 30 13:11:32 2008 -0700 @@ -51,8 +51,8 @@ int nextint(); void skipeol(); // skip to eol void push(char *token) {pending_tokens.push_front(token);}; - char *cur_fn() {return filenames.front();}; - int cur_line() {return linenumbers.front();}; + const char *cur_fn() {return filenames.empty() ? "" : filenames.front();}; + int cur_line() {return linenumbers.empty() ? 0 : linenumbers.front();}; void token_error(const char *err); void token_error(const char *fmt, int d, const char *s); void token_error(const char *fmt, const char *t, const char *h);