diff options
author | Yaakov Selkowitz <yselkowitz@users.sourceforge.net> | 2010-02-20 23:40:53 -0600 |
---|---|---|
committer | Yaakov Selkowitz <yselkowitz@users.sourceforge.net> | 2010-03-22 01:39:15 -0500 |
commit | 8d112a36bf2d93f8962fbb168132a3f80f573993 (patch) | |
tree | 2032b3cbad31c1debbe4fabf3d0f84c159e6e262 /hw/xwin/winprefslex.l | |
parent | 393f593194f69ab5c9de8f7cebed81caa2511a76 (diff) |
Cygwin/X: Improve XWinrc loading and error recoveryxserver-cygwin-1.7.99.902-1
If $HOME/.XWinrc is present but badly formed, ignore it and try
system.XWinrc instead. If neither file is present or both are badly
formed, provide a built-in default which gives the user the chance to
load their new or fixed configuration without restarting.
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Diffstat (limited to 'hw/xwin/winprefslex.l')
-rw-r--r-- | hw/xwin/winprefslex.l | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/hw/xwin/winprefslex.l b/hw/xwin/winprefslex.l index 463dff4ca..ba8aea696 100644 --- a/hw/xwin/winprefslex.l +++ b/hw/xwin/winprefslex.l @@ -113,14 +113,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; } |