From a301310bef5706273148fd10d05d7666bc8f5838 Mon Sep 17 00:00:00 2001 From: Reiner Herrmann Date: Sat, 29 Jan 2011 18:27:14 +0100 Subject: started with the manual and integrating it in main.c --- src/main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 1828e60..217c1e1 100644 --- a/src/main.c +++ b/src/main.c @@ -5,6 +5,7 @@ #include #include "data_store.h" #include "game.h" +#include "manual.h" #define DEFAULT_PORT "12345" @@ -20,7 +21,7 @@ static void print_usage(const char* name) "\t-l\t\t\tstart server\n" "\t-u username\t\tyour nickname in the player list (default: $USER)\n" "\t-p port\t\t\tport to use for connecting/listening (default: %s)\n" - "\t-m\t\t\tdisplay the manual (TODO)\n"; + "\t-m\t\t\tdisplay the manual\n"; fprintf(stderr, usage, name, DEFAULT_PORT); exit(EXIT_FAILURE); @@ -35,7 +36,7 @@ int main(int argc, char *argv[]) bool servermode = false; data_store_t *ds = data_store(); - const char* accepted = "u:s:p:n:hl"; + const char* accepted = "u:s:p:n:hlm"; while((opt = getopt(argc, argv, accepted)) != -1) { switch(opt) @@ -56,6 +57,9 @@ int main(int argc, char *argv[]) case 'l': servermode = true; break; + case 'm': + print_manual(); + break; case 'h': // help default: print_usage(argv[0]); -- cgit v1.2.3