commandline argument parsing improved.

This commit is contained in:
Enno Rehling 2012-05-21 18:10:42 -07:00
parent c8f8c064d3
commit 338a0fae4a
1 changed files with 3 additions and 3 deletions

View File

@ -84,16 +84,16 @@ static int parse_args(int argc, char **argv, int *exitcode)
entry_point = NULL;
break;
case 'e':
entry_point = argv[++i];
entry_point = argv[i][2] ? argv[i]+2 : argv[++i];
break;
case 't':
turn = atoi(argv[++i]);
turn = atoi(argv[i][2] ? argv[i]+2 : argv[++i]);
break;
case 'q':
verbosity = 0;
break;
case 'v':
verbosity = atoi(argv[++i]);
verbosity = atoi(argv[i][2] ? argv[i]+2 : argv[++i]);
break;
case 'h':
usage(argv[0], NULL);