diff options
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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]); |
