56
64
void usage( char * progname )
58
fprintf(stdout,"Usage: %s [options] [song_directory]\n", progname);
66
fprintf(stdout,"Usage: %s [OPTIONS] [SONG_DIRECTORY]\n", progname);
59
67
fprintf(stdout,"Options:\n");
60
fprintf(stdout,"--------\n");
61
fprintf(stdout,"-h, --help\n");
62
fprintf(stdout,"\tDisplay this text and exit\n");
63
fprintf(stdout,"-W, --width (Default: 640)\n");
64
fprintf(stdout,"\tSet window width\n");
65
fprintf(stdout,"-H, --height (Default: 480)\n");
66
fprintf(stdout,"\tSet window height\n");
67
fprintf(stdout,"-t, --theme\n");
68
fprintf(stdout,"\tSet theme (theme name or absolute path to the theme)\n");
69
fprintf(stdout,"-c, --no-capture\n");
70
fprintf(stdout,"\tDisable sound capture thread\n");
71
fprintf(stdout,"-f, --fullscreen\n");
72
fprintf(stdout,"\tEnable fullscreen video output\n");
73
fprintf(stdout,"-v, --version\n");
74
fprintf(stdout,"\tDisplay version number and exit\n");
69
fprintf(stdout," -W, --width (default: 640) set window width\n");
70
fprintf(stdout," -H, --height (default: 480) set window height\n");
71
fprintf(stdout," -t, --theme set theme (theme name or absolute path to the\n");
72
fprintf(stdout," theme)\n");
73
fprintf(stdout," -c, --no-capture disable sound capture thread\n");
74
fprintf(stdout," -f, --fullscreen enable fullscreen video output\n");
75
fprintf(stdout," -d, --difficulty set difficulty level\n");
76
fprintf(stdout," (0: easy, 1:medium, 2:hard (default))\n");
77
fprintf(stdout," -h, --help display this text and exit\n");
78
fprintf(stdout," -v, --version display version number and exit\n");
75
79
exit(EXIT_SUCCESS);
91
96
{"help",no_argument,NULL,'h'},
92
97
{"no-capture",no_argument,NULL,'c'},
93
98
{"version",no_argument,NULL,'v'},
99
{"difficulty",required_argument,NULL,'d'},
94
100
{"fullscreen",no_argument,NULL,'f'},
98
while ((ch = getopt_long(argc, argv, "t:W:H:hcfv", long_options, NULL)) != -1) {
104
while ((ch = getopt_long(argc, argv, "t:W:H:hcfd:v", long_options, NULL)) != -1) {
101
107
theme_name = optarg;