some formatting changes

This commit is contained in:
Gitea 2020-12-13 09:17:40 -06:00
parent ab1da63822
commit 74b0ebb9ca
1 changed files with 9 additions and 9 deletions

18
asa.c
View File

@ -14,9 +14,9 @@ int main(int argc, char ** argv) {
else { else {
in_file = fopen(argv[i], "r"); in_file = fopen(argv[i], "r");
if(in_file == NULL) { if(in_file == NULL) {
fprintf(stderr, "Cannot find file %s\n", argv[i]); fprintf(stderr, "Cannot find file %s\n", argv[i]);
error = 1; error = 1;
continue; continue;
} }
} }
eof_reached = 0; eof_reached = 0;
@ -29,12 +29,12 @@ int main(int argc, char ** argv) {
case EOF: eof_reached = 1; continue; case EOF: eof_reached = 1; continue;
} }
for(c_temp = fgetc(in_file); c_temp != '\n'; c_temp = fgetc(in_file)) { for(c_temp = fgetc(in_file); c_temp != '\n'; c_temp = fgetc(in_file)) {
if(c_temp == EOF) { if(c_temp == EOF) {
eof_reached = 1; eof_reached = 1;
break; break;
} }
else else
printf("%c", c_temp); printf("%c", c_temp);
} }
} }
printf("\n"); printf("\n");