2
0
Fork 0

Improve option error handling

master
Stefan Bühler 10 years ago
parent 1ebdbb88ff
commit c14ac587e0

@ -277,7 +277,11 @@ int main(int argc, char *argv[]) {
headers_num++;
break;
case '?':
W_ERROR("unkown option: -%c", optopt);
if ('?' != optopt) W_ERROR("unkown option: -%c\n", optopt);
show_help();
return 1;
case ':':
W_ERROR("option requires an argument: -%c\n", optopt);
show_help();
return 1;
}

Loading…
Cancel
Save