summaryrefslogtreecommitdiff
path: root/xkbscan.c
diff options
context:
space:
mode:
Diffstat (limited to 'xkbscan.c')
-rw-r--r--xkbscan.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/xkbscan.c b/xkbscan.c
index 22a034f..a05d569 100644
--- a/xkbscan.c
+++ b/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)
{