Commit e8ae210c authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #451 from monaka/pr-print-usage

[xpcat] Print usage in the parameter error.
parents 3f2743c3 71672494
......@@ -26,8 +26,10 @@ main(int argc, char *argv[])
i++;
if (i < argc)
output = argv[i];
else
else {
usage(argv[0]);
return EXIT_FAILURE;
}
}
}
......@@ -40,7 +42,10 @@ main(int argc, char *argv[])
setbuf(outfile, NULL);
for (i = 1; i < argc; i++) {
if (strcmp(argv[i], "-o") == 0) { i++; continue; }
if (strcmp(argv[i], "-o") == 0) {
i++;
continue;
}
infile = fopen(argv[i], "rb");
if (!infile) {
......
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