--- a/tokenizer.c Mon Jul 24 16:38:12 2000 +0200 +++ b/tokenizer.c Sun Aug 27 21:21:29 2000 +0200 @@ -115,19 +115,14 @@ }else{ c=getc(tokz->file); } -/* if(c=='\n') - tokz->line++;*/ - + return c; } static void _ungetch(Tokenizer *tokz, int c) { -/* if(c=='\n') - tokz->line--;*/ tokz->ungetc=c; - /*ungetc(c, tokz->file);*/ } @@ -557,10 +552,17 @@ if(e==E_TOKZ_UNEXPECTED_EOF) line=0; - if(e<0) - warn_obj_line(tokz->name, line, "%s", strerror(-e)); - else - warn_obj_line(tokz->name, line, "%s", TR(errors[e])); + if(tokz!=NULL){ + if(e<0) + warn_obj_line(tokz->name, line, "%s", strerror(-e)); + else + warn_obj_line(tokz->name, line, "%s", TR(errors[e])); + }else{ + if(e<0) + warn("%s", strerror(-e)); + else + warn("%s", TR(errors[e])); + } }