From a68c5b7b29eb1433b1be73b50c4248e10eab8e64 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Thu, 1 Nov 2012 16:37:03 +1100 Subject: Reset scan state when opening a new file When we opened a new file after encountering a parse error, we weren't resetting our scan state, and continued to read out of the old buffer rather than that of the new file. Fixes a regression introduced in 9887842e ('Use fread() instead of getc()'). Test case: xkbcomp -lfhlpR "path/to/xkeyboard-config.git/symbols/*" The Makefiles in that tree would cause parse errors, the resulting directory file is incomplete (down from ~12000 to ~230 lines). Reported-by: Peter Hutterer Signed-off-by: Daniel Stone --- parseutils.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'parseutils.h') diff --git a/parseutils.h b/parseutils.h index 8b8a6c1..8c381d4 100644 --- a/parseutils.h +++ b/parseutils.h @@ -198,11 +198,10 @@ extern int yywrap(void); extern int yylex(void); extern int yyparse(void); +extern void scan_set_file(FILE *file); extern int setScanState(char * /* file */ , int /* line */ ); -extern FILE *yyin; - #endif /* XKBPARSE_H */ -- cgit v1.2.3