Commit 4e5cf521 authored by Jan Gerber's avatar Jan Gerber
Browse files

warn if more than one input is given

parent 363a7181
......@@ -2537,7 +2537,7 @@ int main(int argc, char **argv) {
snprintf(outputfile_name, sizeof(outputfile_name), "-");
outputfile_set = 1;
}
while(optind<argc) {
if(optind<argc) {
/* assume that anything following the options must be a filename */
snprintf(inputfile_name,sizeof(inputfile_name),"%s",argv[optind]);
if (!strcmp(inputfile_name,"-")) {
......@@ -2559,6 +2559,9 @@ int main(int argc, char **argv) {
}
optind++;
}
if(optind<argc) {
fprintf(stderr, "WARNING: Only one input file supported, others will be ignored\n");
}
//FIXME: is using_stdin still neded? is it needed as global variable?
using_stdin |= !strcmp(inputfile_name, "pipe:" ) ||
......
Markdown is supported
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