forked from github/server
commandline argument parsing improved.
This commit is contained in:
parent
c8f8c064d3
commit
338a0fae4a
|
@ -84,16 +84,16 @@ static int parse_args(int argc, char **argv, int *exitcode)
|
||||||
entry_point = NULL;
|
entry_point = NULL;
|
||||||
break;
|
break;
|
||||||
case 'e':
|
case 'e':
|
||||||
entry_point = argv[++i];
|
entry_point = argv[i][2] ? argv[i]+2 : argv[++i];
|
||||||
break;
|
break;
|
||||||
case 't':
|
case 't':
|
||||||
turn = atoi(argv[++i]);
|
turn = atoi(argv[i][2] ? argv[i]+2 : argv[++i]);
|
||||||
break;
|
break;
|
||||||
case 'q':
|
case 'q':
|
||||||
verbosity = 0;
|
verbosity = 0;
|
||||||
break;
|
break;
|
||||||
case 'v':
|
case 'v':
|
||||||
verbosity = atoi(argv[++i]);
|
verbosity = atoi(argv[i][2] ? argv[i]+2 : argv[++i]);
|
||||||
break;
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
usage(argv[0], NULL);
|
usage(argv[0], NULL);
|
||||||
|
|
Loading…
Reference in New Issue