shithub: puzzles

Download patch

ref: fc59e33845b32b07468735a224e0200a590de15a
parent: 7834793e41ba57cadb371f07de55d8deae57ca22
author: Jacob Nevins <jacobn@chiark.greenend.org.uk>
date: Fri Dec 29 19:26:16 EST 2006

Make errors in option parsing actually _do_ something in interactive mode.

[originally from svn r7039]

--- a/gtk.c
+++ b/gtk.c
@@ -1954,6 +1954,11 @@
 	}
     }
 
+    if (*errbuf) {
+	fputs(errbuf, stderr);
+	return 1;
+    }
+
     /*
      * Special standalone mode for generating puzzle IDs on the
      * command line. Useful for generating puzzles to be printed
@@ -1980,11 +1985,6 @@
 	midend *me;
 	char *id;
 	document *doc = NULL;
-
-	if (*errbuf) {
-	    fputs(errbuf, stderr);
-	    return 1;
-	}
 
 	n = ngenerate;