git-svn: trunk@4065
Tomasz Kojm authored on 2008/08/02 04:48:05... | ... |
@@ -48,24 +48,27 @@ static void printopt(const struct cfgoption *opt, const struct cfgstruct *cpt, i |
48 | 48 |
return; |
49 | 49 |
} |
50 | 50 |
|
51 |
- switch(opt->argtype) { |
|
52 |
- case OPT_STR: |
|
53 |
- case OPT_FULLSTR: |
|
54 |
- case OPT_QUOTESTR: |
|
55 |
- if(!nondef || !opt->strarg || strcmp(opt->strarg, cpt->strarg)) |
|
56 |
- printf("%s = \"%s\"\n", opt->name, cpt->strarg); |
|
57 |
- break; |
|
58 |
- case OPT_NUM: |
|
59 |
- case OPT_COMPSIZE: |
|
60 |
- if(!nondef || (opt->numarg != cpt->numarg)) |
|
61 |
- printf("%s = %u\n", opt->name, cpt->numarg); |
|
62 |
- break; |
|
63 |
- case OPT_BOOL: |
|
64 |
- if(!nondef || (opt->numarg != cpt->numarg)) |
|
65 |
- printf("%s = %s\n", opt->name, cpt->enabled ? "yes" : "no"); |
|
66 |
- break; |
|
67 |
- default: |
|
68 |
- printf("%s: UNKNOWN ARGUMENT TYPE\n", opt->name); |
|
51 |
+ while(cpt) { |
|
52 |
+ switch(opt->argtype) { |
|
53 |
+ case OPT_STR: |
|
54 |
+ case OPT_FULLSTR: |
|
55 |
+ case OPT_QUOTESTR: |
|
56 |
+ if(!nondef || !opt->strarg || strcmp(opt->strarg, cpt->strarg)) |
|
57 |
+ printf("%s = \"%s\"\n", opt->name, cpt->strarg); |
|
58 |
+ break; |
|
59 |
+ case OPT_NUM: |
|
60 |
+ case OPT_COMPSIZE: |
|
61 |
+ if(!nondef || (opt->numarg != cpt->numarg)) |
|
62 |
+ printf("%s = %u\n", opt->name, cpt->numarg); |
|
63 |
+ break; |
|
64 |
+ case OPT_BOOL: |
|
65 |
+ if(!nondef || (opt->numarg != cpt->numarg)) |
|
66 |
+ printf("%s = %s\n", opt->name, cpt->enabled ? "yes" : "no"); |
|
67 |
+ break; |
|
68 |
+ default: |
|
69 |
+ printf("%s: UNKNOWN ARGUMENT TYPE\n", opt->name); |
|
70 |
+ } |
|
71 |
+ cpt = cpt->nextarg; |
|
69 | 72 |
} |
70 | 73 |
} |
71 | 74 |
|