Commit fbe8b2e1 authored by Thomas White's avatar Thomas White
Browse files

Fix widespread bug-hiding problem with command line argument handling

parent 9745feca
......@@ -377,7 +377,8 @@ int main(int argc, char *argv[])
break;
default :
return 1;
ERROR("Unhandled option '%c'\n", c);
break;
}
}
......
......@@ -378,9 +378,9 @@ int main(int argc, char *argv[])
}
break;
default :
return 1;
ERROR("Unhandled option '%c'\n", c);
break;
}
......
......@@ -427,7 +427,8 @@ int main(int argc, char *argv[])
break;
default :
return 1;
ERROR("Unhandled option '%c'\n", c);
break;
}
......
......@@ -224,7 +224,8 @@ int main(int argc, char *argv[])
break;
default :
return 1;
ERROR("Unhandled option '%c'\n", c);
break;
}
}
......
......@@ -397,7 +397,8 @@ int main(int argc, char *argv[])
break;
default :
return 1;
ERROR("Unhandled option '%c'\n", c);
break;
}
......
......@@ -404,7 +404,8 @@ int main(int argc, char *argv[])
break;
default :
return 1;
ERROR("Unhandled option '%c'\n", c);
break;
}
}
......
......@@ -371,7 +371,8 @@ int main(int argc, char *argv[])
break;
default :
return 1;
ERROR("Unhandled option '%c'\n", c);
break;
}
......
......@@ -369,7 +369,8 @@ int main(int argc, char *argv[])
break;
default :
return 1;
ERROR("Unhandled option '%c'\n", c);
break;
}
......
......@@ -840,7 +840,8 @@ int main(int argc, char *argv[])
break;
default :
return 1;
ERROR("Unhandled option '%c'\n", c);
break;
}
}
......
......@@ -390,43 +390,46 @@ int main(int argc, char *argv[])
longopts, NULL)) != -1) {
switch (c) {
case 'h' :
case 'h' :
show_help(argv[0]);
return 0;
case 'i' :
case 'i' :
filename = strdup(optarg);
break;
case 'o' :
case 'o' :
output = strdup(optarg);
break;
case 's' :
case 's' :
config_stopafter = atoi(optarg);
break;
case 'f' :
case 'f' :
config_startafter = atoi(optarg);
break;
case 'y' :
case 'y' :
sym_str = strdup(optarg);
break;
case 'g' :
case 'g' :
histo = strdup(optarg);
break;
case 'z' :
case 'z' :
histo_params = strdup(optarg);
break;
case 0 :
case 0 :
break;
default :
ERROR("Unhandled option '%c'\n", c);
break;
default :
return 1;
}
}
......
......@@ -689,7 +689,8 @@ int main(int argc, char *argv[])
break;
default :
return 1;
ERROR("Unhandled option '%c'\n", c);
break;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment