Browse Source

better use of bad arguments

master
tonton th 2 years ago
parent
commit
79ab384136
  1. 7
      tools/fimgstats.c

7
tools/fimgstats.c

@ -96,15 +96,20 @@ if (argc == 1) { @@ -96,15 +96,20 @@ if (argc == 1) {
exit(0);
}
while ((opt = getopt(argc, argv, "cv")) != -1) {
while ((opt = getopt(argc, argv, "chv")) != -1) {
switch(opt) {
case 'c': make_csv++; break;
case 'v': verbosity++; break;
case 'h': /* tombe dedans */
default: help(1); exit(1);
}
}
if (NULL==argv[optind]) {
fprintf(stderr, "optind %d is wtf\n", optind);
return 1;
}
foo = various_numbers_from_file(argv[optind], 0);
if (foo) {
fprintf(stderr, "got a %d ?\n", foo);

Loading…
Cancel
Save