50 |
|
void |
51 |
|
parseargs(int *argc, char ***argv, struct lgetopt *opts) |
52 |
|
{ |
53 |
– |
unsigned int i; |
53 |
|
const char *progname = (*argv)[0]; |
54 |
|
|
55 |
< |
/* loop through each argument */ |
55 |
> |
/* Loop through each argument */ |
56 |
|
while (1) |
57 |
|
{ |
58 |
|
int found = 0; |
65 |
|
|
66 |
|
(*argv)[0]++; |
67 |
|
|
68 |
< |
/* search through our argument list, and see if it matches */ |
69 |
< |
for (i = 0; opts[i].opt; i++) |
68 |
> |
/* Search through our argument list, and see if it matches */ |
69 |
> |
for (unsigned int i = 0; opts[i].opt; ++i) |
70 |
|
{ |
71 |
|
if (!strcmp(opts[i].opt, (*argv)[0])) |
72 |
|
{ |
73 |
< |
/* found our argument */ |
73 |
> |
/* Found our argument */ |
74 |
|
found = 1; |
75 |
|
|
76 |
|
switch (opts[i].argtype) |