move client usage help from shared code
authorMischa POSLAWSKY <netris@shiar.org>
Sun, 4 Mar 2007 09:37:53 +0000 (10:37 +0100)
committerMischa POSLAWSKY <netris@shiar.org>
Sun, 4 Mar 2007 09:37:53 +0000 (10:37 +0100)
client.c
util.c
util.h

index 67d6f8df9faa51f2a5d3ca55b4bc29a0f76b980f..bd12f8ec913146649ee64d42efe6ff65f0d05e10 100644 (file)
--- a/client.c
+++ b/client.c
@@ -119,6 +119,36 @@ void WriteConf(void)
        fprintf(stderr, "Wrote new game configuration to %s\n", CONFIG_FILE);
 }
 
+void Usage(void)
+{
+       Header();
+       fprintf(stderr,
+               "Usage: netris <options>\n"
+               "\n"
+               "  -h, --help\t\tPrint this usage information\n"
+               "  -H, --info\t\tShow distribution and warranty information\n"
+               "  -R, --rules\t\tShow game rules\n"
+               "\n"
+               "  -S, --slowterm\tDisable inverse/bold/color for slow terminals\n"
+               "  -a, --ascii\t\tUse ascii characters\n"
+               "  -C, --color=0\t\tDisable color\n"
+               "\n"
+               "  -c, --connect <host>\tInitiate connection\n"
+               "  -p, --port <port>\tSet port number (default is %d)\n"
+               "\n"
+               "  -t, --team <team>\tJoin a team (don't receive lines from your teammates)\n"
+               "  -l, --level <lvl>\tBegin at a higher level (can be used as handicap)\n"
+               "  -k, --keys <keys>\tRemap keys (default is \"%s\" for cursors)\n"
+               "  -d, --dropmode\tDrops go into drop mode\n"
+               "  -D, --instadrop\tInstant drop\n"
+               "\n"
+               "  -r, --robot <cmd>\tExecute program to control the game instead of keyboard\n"
+               "  -F, --fair-robot\tUse fair robot interface\n"
+               "\n",
+               DEFAULT_PORT, DEFAULT_KEYS
+       );
+}
+
 void HandleOption(char tag, char *value)
 {
        switch (tag) {
diff --git a/util.c b/util.c
index a667a5bd0cdb8cc0d674ed5ead0cef39b97bbfe9..e94f526aab94a3fe7cd5e75861d6e7971574d6ae 100644 (file)
--- a/util.c
+++ b/util.c
@@ -61,35 +61,6 @@ void Header(void)
        );
 }
 
-void Usage(void)
-{
-       Header();
-       fprintf(stderr,
-               "Usage: netris <options>\n"
-               "\n"
-               "  -h, --help\t\tPrint this usage information\n"
-               "  -H, --info\t\tShow distribution and warranty information\n"
-               "  -R, --rules\t\tShow game rules\n"
-               "\n"
-               "  -S, --slowterm\tDisable inverse/bold/color for slow terminals\n"
-               "  -a, --ascii\t\tUse ascii characters\n"
-               "  -C, --color=0\t\tDisable color\n"
-               "\n"
-               "  -c, --connect <host>\tInitiate connection\n"
-               "  -p, --port <port>\tSet port number (default is %d)\n"
-               "\n"
-               "  -t, --team <team>\tJoin a team (don't receive lines from your teammates)\n"
-               "  -l, --level <lvl>\tBegin at a higher level (can be used as handicap)\n"
-               "  -k, --keys <keys>\tRemap keys (default is \"%s\" for cursors)\n"
-               "  -d, --dropmode\tDrops go into drop mode\n"
-               "  -D, --instadrop\tInstant drop\n"
-               "\n"
-               "  -r, --robot <cmd>\tExecute program to control the game instead of keyboard\n"
-               "  -F, --fair-robot\tUse fair robot interface\n"
-               "\n", DEFAULT_PORT, DEFAULT_KEYS
-       );
-}
-
 void DistInfo(void)
 {
        fprintf(stderr,
diff --git a/util.h b/util.h
index 0f4deca1a42d32c6325fecc5ae4e8afed7b63dcd..f9d196622181692ec1443e94479d353f54f05527 100644 (file)
--- a/util.h
+++ b/util.h
@@ -6,7 +6,6 @@
 
 extern void AtExit(void (*handler)(void));
 extern void Header(void);
-extern void Usage(void);
 extern void DistInfo(void);
 extern void Rules(void);
 extern void SRandom(int seed);