|
|
@ -83,17 +83,23 @@ int main(int argc, char **argv) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!infilename || !strcmp(infilename, "-")) |
|
|
|
if (!infilename || !strcmp(infilename, "-")) { |
|
|
|
infilename = "/dev/stdin"; |
|
|
|
infilename = "stdin"; |
|
|
|
infile = fopen(infilename, "r"); |
|
|
|
infile = stdin; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
infile = fopen(infilename, "r"); |
|
|
|
|
|
|
|
} |
|
|
|
if (!infile) { |
|
|
|
if (!infile) { |
|
|
|
fprintf(stderr, "Impossible to open input file '%s': %s\n", infilename, strerror(errno)); |
|
|
|
fprintf(stderr, "Impossible to open input file '%s': %s\n", infilename, strerror(errno)); |
|
|
|
return 1; |
|
|
|
return 1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (!outfilename || !strcmp(outfilename, "-")) |
|
|
|
if (!outfilename || !strcmp(outfilename, "-")) { |
|
|
|
outfilename = "/dev/stdout"; |
|
|
|
outfilename = "stdout"; |
|
|
|
outfile = fopen(outfilename, "w"); |
|
|
|
outfile = stdout; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
outfile = fopen(outfilename, "w"); |
|
|
|
|
|
|
|
} |
|
|
|
if (!outfile) { |
|
|
|
if (!outfile) { |
|
|
|
fprintf(stderr, "Impossible to open output file '%s': %s\n", outfilename, strerror(errno)); |
|
|
|
fprintf(stderr, "Impossible to open output file '%s': %s\n", outfilename, strerror(errno)); |
|
|
|
return 1; |
|
|
|
return 1; |
|
|
|