comparison svr-runopts.c @ 1153:67d8a904f5a9

don't silently ignore extra flag arguments
author Matt Johnston <matt@ucc.asn.au>
date Wed, 21 Oct 2015 22:05:50 +0800
parents 47643024fc90
children 1b583b2994ba
comparison
equal deleted inserted replaced
1152:57d09741d46d 1153:67d8a904f5a9
187 } 187 }
188 continue; 188 continue;
189 } 189 }
190 190
191 if (argv[i][0] == '-') { 191 if (argv[i][0] == '-') {
192 switch (argv[i][1]) { 192 char c = argv[i][1];
193 if (strlen(argv[i]) != 2) {
194 /* Ensure only one flag per hyphen. '?' falls through to print help */
195 c = '?';
196 }
197 switch (c) {
193 case 'b': 198 case 'b':
194 next = &svr_opts.bannerfile; 199 next = &svr_opts.bannerfile;
195 break; 200 break;
196 case 'd': 201 case 'd':
197 case 'r': 202 case 'r':