minor style changes
This commit is contained in:
15
cat.c
15
cat.c
@@ -25,14 +25,15 @@ main(int argc, char *argv[])
|
||||
|
||||
if(argc == 0) {
|
||||
concat(stdin, "<stdin>", stdout, "<stdout>");
|
||||
} else for(i = 0; i < argc; i++) {
|
||||
if(!(fp = fopen(argv[i], "r"))) {
|
||||
weprintf("fopen %s:", argv[i]);
|
||||
continue;
|
||||
} else {
|
||||
for(i = 0; i < argc; i++) {
|
||||
if(!(fp = fopen(argv[i], "r"))) {
|
||||
weprintf("fopen %s:", argv[i]);
|
||||
continue;
|
||||
}
|
||||
concat(fp, argv[i], stdout, "<stdout>");
|
||||
fclose(fp);
|
||||
}
|
||||
concat(fp, argv[i], stdout, "<stdout>");
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
Reference in New Issue
Block a user