# | Line 68 | Line 68 | parseargs(int *argc, char ***argv, struc | |
---|---|---|
68 | { | |
69 | case YESNO: | |
70 | *((int *)opts[i].argloc) = 1; | |
71 | + | (*argc)--; |
72 | + | (*argv)++; |
73 | break; | |
74 | case INTEGER: | |
75 | if (*argc < 2) | |
# | Line 78 | Line 80 | parseargs(int *argc, char ***argv, struc | |
80 | } | |
81 | ||
82 | *((int *)opts[i].argloc) = atoi((*argv)[1]); | |
83 | + | (*argc)--; |
84 | + | (*argv)++; |
85 | break; | |
86 | case STRING: | |
87 | if (*argc < 2) | |
# | Line 89 | Line 93 | parseargs(int *argc, char ***argv, struc | |
93 | ||
94 | *((char**)opts[i].argloc) = malloc(strlen((*argv)[1]) + 1); | |
95 | strcpy(*((char**)opts[i].argloc), (*argv)[1]); | |
96 | + | (*argc)--; |
97 | + | (*argv)++; |
98 | break; | |
99 | ||
100 | case USAGE: |
– | Removed lines |
+ | Added lines |
< | Changed lines (old) |
> | Changed lines (new) |