old edits uncommitted

This commit is contained in:
2022-08-30 20:38:36 -04:00
parent 18b8f57f04
commit d255de5940
2 changed files with 3 additions and 5 deletions
+2 -2
View File
@@ -33,7 +33,7 @@ error(enum error_type type, char *argv0, char *file_name){
/* print input to output, returns 0 if successful and 1 if unsuccessful */
int
file_copy(FILE *input, FILE *output){
char c;
int c;
while((c = getc(input)) != EOF)
if(putc(c, output) == EOF)
return 1;
@@ -76,7 +76,7 @@ main(int argc, char *argv[]){
/* ignore `-u` if still parsing options */
}else if(parsing_opts && !strcmp(argv[i], "-u"))
continue;
setbuf(output, (char *)NULL);
/* take `-` to mean standard input if still parsing options */
else if(parsing_opts && !strcmp(argv[i], "-")){