summaryrefslogtreecommitdiff
path: root/xkbcomp.c
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2012-11-01 16:37:03 +1100
committerDaniel Stone <daniel@fooishbar.org>2012-11-01 16:37:03 +1100
commita68c5b7b29eb1433b1be73b50c4248e10eab8e64 (patch)
treea02314bd93b42d550e30a1eac435a3a0180322c3 /xkbcomp.c
parente119cbec7e750ffc4d4bd08b577db2c697035a30 (diff)
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 <peter.hutterer@who-t.net> Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'xkbcomp.c')
-rw-r--r--xkbcomp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xkbcomp.c b/xkbcomp.c
index 063ae87..116bcfa 100644
--- a/xkbcomp.c
+++ b/xkbcomp.c
@@ -883,7 +883,7 @@ main(int argc, char *argv[])
XkbFileInfo result;
Status status;
- yyin = stdin;
+ scan_set_file(stdin);
uSetEntryFile(NullString);
uSetDebugFile(NullString);
uSetErrorFile(NullString);