aboutsummaryrefslogtreecommitdiff
path: root/xkbcomp/xkbscan.c
diff options
context:
space:
mode:
Diffstat (limited to 'xkbcomp/xkbscan.c')
-rw-r--r--xkbcomp/xkbscan.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/xkbcomp/xkbscan.c b/xkbcomp/xkbscan.c
index 4fb575536..3aa77472a 100644
--- a/xkbcomp/xkbscan.c
+++ b/xkbcomp/xkbscan.c
@@ -37,7 +37,7 @@
unsigned int scanDebug;
-FILE *yyin = NULL;
+static FILE *yyin;
static char scanFileBuf[1024] = {0};
char *scanFile = scanFileBuf;
@@ -269,6 +269,14 @@ tokText(int tok)
}
#endif
+void
+scan_set_file(FILE *file)
+{
+ readBufLen = 0;
+ readBufPos = 0;
+ yyin = file;
+}
+
static int
scanchar(void)
{