1 /*
2 * xtrojka (c) 1994,1995,1996 Maarten Los
3 *
4 * #include "COPYRIGHT"
5 *
6 * created: 26.xi.1995
7 * modified:
8 *
9 * The options scanning module
10 */
11
12 #include <stdio.h>
13 #include "xtrojka.h"
14 #include "debug.h"
15
16 extern flag is_debug_info;
17
18
19 /*
20 * implementation
21 */
get_options(argc,argv)22 void get_options(argc, argv)
23 int argc;
24 char **argv;
25 /*
26 * parse the arguments
27 */
28 {
29 DEBUG("options.c","get_options");
30
31 while(--argc) {
32 if((!strcmp(argv[argc], "-debug"))
33 || (!strcmp(argv[argc], "-d"))) {
34 #ifdef DEBUG_INFO
35 is_debug_info = True;
36 #else
37 show_no_debug();
38 #endif
39 }
40 if((!strcmp(argv[argc], "-help"))
41 || (!strcmp(argv[argc], "-h"))
42 || (!strcmp(argv[argc], "-?"))) {
43 show_help();
44 exit(0);
45 }
46 if((!strcmp(argv[argc], "-scores"))
47 || (!strcmp(argv[argc], "-s"))) {
48 show_scores_offline();
49 exit(0);
50 }
51 }
52 }
53
54
55