forked from suyu/suyu
PR#3 review: -l's arg is now optional
This commit is contained in:
parent
1ed34b1e47
commit
f9c3b8dc75
1 changed files with 2 additions and 2 deletions
|
@ -234,7 +234,7 @@ int main(int argc, char** argv) {
|
||||||
{"fullscreen", no_argument, 0, 'f'},
|
{"fullscreen", no_argument, 0, 'f'},
|
||||||
{"help", no_argument, 0, 'h'},
|
{"help", no_argument, 0, 'h'},
|
||||||
{"game", required_argument, 0, 'g'},
|
{"game", required_argument, 0, 'g'},
|
||||||
{"applet-params", required_argument, 0, 'l'},
|
{"applet-params", optional_argument, 0, 'l'},
|
||||||
{"multiplayer", required_argument, 0, 'm'},
|
{"multiplayer", required_argument, 0, 'm'},
|
||||||
{"program", optional_argument, 0, 'p'},
|
{"program", optional_argument, 0, 'p'},
|
||||||
{"user", required_argument, 0, 'u'},
|
{"user", required_argument, 0, 'u'},
|
||||||
|
@ -244,7 +244,7 @@ int main(int argc, char** argv) {
|
||||||
};
|
};
|
||||||
|
|
||||||
while (optind < argc) {
|
while (optind < argc) {
|
||||||
int arg = getopt_long(argc, argv, "g:fhvp::c:u:l:", long_options, &option_index);
|
int arg = getopt_long(argc, argv, "g:fhvp::c:u:l::", long_options, &option_index);
|
||||||
if (arg != -1) {
|
if (arg != -1) {
|
||||||
switch (static_cast<char>(arg)) {
|
switch (static_cast<char>(arg)) {
|
||||||
case 'c':
|
case 'c':
|
||||||
|
|
Loading…
Reference in a new issue