aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winprefslex.l
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xwin/winprefslex.l')
-rw-r--r--xorg-server/hw/xwin/winprefslex.l10
1 files changed, 7 insertions, 3 deletions
diff --git a/xorg-server/hw/xwin/winprefslex.l b/xorg-server/hw/xwin/winprefslex.l
index 5a443407f..83204b61c 100644
--- a/xorg-server/hw/xwin/winprefslex.l
+++ b/xorg-server/hw/xwin/winprefslex.l
@@ -111,14 +111,18 @@ yywrap (void)
/*
* Run a file through the yacc parser
*/
-void
+int
parse_file (FILE *file)
{
+ int ret;
+
if (!file)
- return;
+ return 1;
yylineno = 1;
yyin = file;
- yyparse ();
+ ret = yyparse ();
+ yylex_destroy ();
+ return ret;
}