]> git.pond.sub.org Git - empserver/commitdiff
(parse_args): fix the print usage for script file name to print the
authorRon Koenderink <rkoenderink@yahoo.ca>
Wed, 29 Dec 2004 23:01:43 +0000 (23:01 +0000)
committerRon Koenderink <rkoenderink@yahoo.ca>
Wed, 29 Dec 2004 23:01:43 +0000 (23:01 +0000)
default instead of the current file name as per the description.

src/util/fairland.c

index c1436a54fe1004609d1cb7294be7dbd3264da63c..d9154da153ff800c1fb2db33ca40c6285fd43c7c 100644 (file)
@@ -94,7 +94,8 @@ static int quiet = 0;
 static void qprint(const char * const fmt, ...)
     ATTRIBUTE((format (printf, 1, 2)));
 
 static void qprint(const char * const fmt, ...)
     ATTRIBUTE((format (printf, 1, 2)));
 
-static const char *outfile = "newcap_script";
+#define DEFAULT_OUTFILE_NAME "newcap_script"
+static const char *outfile = DEFAULT_OUTFILE_NAME;
 /* mark the continents with a * so you can tell them
    from the islands 1 = mark, 0 = don't mark. */
 static int AIRPORT_MARKER = 0;
 /* mark the continents with a * so you can tell them
    from the islands 1 = mark, 0 = don't mark. */
 static int AIRPORT_MARKER = 0;
@@ -316,8 +317,8 @@ parse_args(int argc, char *argv[])
        puts("-q = quiet, -o = no ore produced");
        puts("-a = Airport marker for continents, -i = islands not distinct");
        puts("-R = seed to use for random, -e = read config file");
        puts("-q = quiet, -o = no ore produced");
        puts("-a = Airport marker for continents, -i = islands not distinct");
        puts("-R = seed to use for random, -e = read config file");
-       printf("-s = name of script (default %s)\n",
-              outfile);
+       printf("-s = name of script (default %s)\n",
+              DEFAULT_OUTFILE_NAME);
        puts("nc = number of continents [MANDATORY]");
        puts("sc = continent size [MANDATORY]");
        puts("ni = number of islands (default = nc)");
        puts("nc = number of continents [MANDATORY]");
        puts("sc = continent size [MANDATORY]");
        puts("ni = number of islands (default = nc)");