minor style changes
This commit is contained in:
parent
59d0b5cd97
commit
b700d5a8ed
5
cat.c
5
cat.c
|
@ -25,7 +25,8 @@ main(int argc, char *argv[])
|
|||
|
||||
if(argc == 0) {
|
||||
concat(stdin, "<stdin>", stdout, "<stdout>");
|
||||
} else for(i = 0; i < argc; i++) {
|
||||
} else {
|
||||
for(i = 0; i < argc; i++) {
|
||||
if(!(fp = fopen(argv[i], "r"))) {
|
||||
weprintf("fopen %s:", argv[i]);
|
||||
continue;
|
||||
|
@ -33,6 +34,6 @@ main(int argc, char *argv[])
|
|||
concat(fp, argv[i], stdout, "<stdout>");
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
}
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
4
fold.c
4
fold.c
|
@ -44,7 +44,8 @@ main(int argc, char *argv[])
|
|||
|
||||
if(argc == 0) {
|
||||
fold(stdin, width);
|
||||
} else for(; argc > 0; argc--, argv++) {
|
||||
} else {
|
||||
for(; argc > 0; argc--, argv++) {
|
||||
if(!(fp = fopen(argv[0], "r"))) {
|
||||
weprintf("fopen %s:", argv[0]);
|
||||
continue;
|
||||
|
@ -52,6 +53,7 @@ main(int argc, char *argv[])
|
|||
fold(fp, width);
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
4
head.c
4
head.c
|
@ -32,7 +32,8 @@ main(int argc, char *argv[])
|
|||
|
||||
if(argc == 0) {
|
||||
head(stdin, "<stdin>", n);
|
||||
} else for(; argc > 0; argc--, argv++) {
|
||||
} else {
|
||||
for(; argc > 0; argc--, argv++) {
|
||||
if(!(fp = fopen(argv[0], "r"))) {
|
||||
weprintf("fopen %s:", argv[0]);
|
||||
continue;
|
||||
|
@ -40,6 +41,7 @@ main(int argc, char *argv[])
|
|||
head(fp, argv[0], n);
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user