From: ian Date: Sun, 13 Jul 2008 19:24:32 +0000 (+0000) Subject: get line number right in error msgs X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=commitdiff_plain;h=fbe71e9d38182be632dafdf676a8d9beb5318fe2;p=trains.git get line number right in error msgs --- diff --git a/hostside/record.c b/hostside/record.c index 672b743..7687649 100644 --- a/hostside/record.c +++ b/hostside/record.c @@ -487,7 +487,7 @@ static void parse_file(const char *why) { f= fopen(filename,"r"); if (!f) diee("config: cannot open %s: %s", why, filename); record_yyrestart(f); - record_yylineno= 0; + record_yylineno= 1; r= record_yyparse(); assert(!r); /* we're supposed to call yyerror which dies */ fclose(f);