From 67c063ab72ebe37d99e036c7a9d3fcecf1e168aa Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sun, 4 Mar 2007 10:37:53 +0100 Subject: [PATCH] move client usage help from shared code --- client.c | 30 ++++++++++++++++++++++++++++++ util.c | 29 ----------------------------- util.h | 1 - 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/client.c b/client.c index 67d6f8d..bd12f8e 100644 --- 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 \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 \tInitiate connection\n" + " -p, --port \tSet port number (default is %d)\n" + "\n" + " -t, --team \tJoin a team (don't receive lines from your teammates)\n" + " -l, --level \tBegin at a higher level (can be used as handicap)\n" + " -k, --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 \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 a667a5b..e94f526 100644 --- a/util.c +++ b/util.c @@ -61,35 +61,6 @@ void Header(void) ); } -void Usage(void) -{ - Header(); - fprintf(stderr, - "Usage: netris \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 \tInitiate connection\n" - " -p, --port \tSet port number (default is %d)\n" - "\n" - " -t, --team \tJoin a team (don't receive lines from your teammates)\n" - " -l, --level \tBegin at a higher level (can be used as handicap)\n" - " -k, --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 \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 0f4deca..f9d1966 100644 --- 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); -- 2.30.0