summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorReiner Herrmann <reiner@reiner-h.de>2011-01-29 18:27:14 +0100
committerReiner Herrmann <reiner@reiner-h.de>2011-01-29 18:27:14 +0100
commita301310bef5706273148fd10d05d7666bc8f5838 (patch)
tree2b9f156d402a39501d8b39d4d42d652f4c1bad6a /src/main.c
parentab80fa342031a548b549e4581cb946982b433c3a (diff)
started with the manual and integrating it in main.c
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c8
1 files changed, 6 insertions, 2 deletions
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 <getopt.h>
#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]);