]> git.pond.sub.org Git - empserver/blobdiff - src/util/fairland.c
fairland: Move qprint() and NUMTRIES
[empserver] / src / util / fairland.c
index 027d1534b2dd3e88e7e8cf6edd7d9878e9da53f9..4623ff2fd84edb6add3cc680413f56c112ea9a52 100644 (file)
 #include "version.h"
 #include "xy.h"
 
+/*
+ * Number of retries when growing land fails
+ */
+#define NUMTRIES 10
+
 /* do not change these defines */
 #define LANDMIN                1       /* plate altitude for normal land */
 #define PLATMIN                36      /* plate altitude for plateau */
@@ -300,8 +305,6 @@ static unsigned short *distance;
 static int *bfs_queue;
 static int bfs_queue_head, bfs_queue_tail;
 
-#define NUMTRIES 10            /* keep trying to grow this many times */
-
 static const char *numletter =
     "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
 
@@ -453,6 +456,18 @@ print_vars(void)
     printf("World dimensions: %dx%d\n", WORLD_X, WORLD_Y);
 }
 
+static void
+qprint(const char *const fmt, ...)
+{
+    va_list ap;
+
+    if (!quiet) {
+       va_start(ap, fmt);
+       vfprintf(stdout, fmt, ap);
+       va_end(ap);
+    }
+}
+
 static void
 help(char *complaint)
 {
@@ -1664,15 +1679,3 @@ write_newcap_script(void)
     fclose(script);
     return 1;
 }
-
-static void
-qprint(const char *const fmt, ...)
-{
-    va_list ap;
-
-    if (!quiet) {
-       va_start(ap, fmt);
-       vfprintf(stdout, fmt, ap);
-       va_end(ap);
-    }
-}