diff options
author | Jim Meyering <jim@meyering.net> | 1998-06-29 15:57:45 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1998-06-29 15:57:45 +0000 |
commit | 257c5c4737ce0399316199903ae402ae9e794a84 (patch) | |
tree | 649dc55a3e71f5f0cc99fa9b3cb1bfe460536e38 /src/fold.c | |
parent | 391c960cba3d7207149f5148d99c068331add803 (diff) | |
download | coreutils-257c5c4737ce0399316199903ae402ae9e794a84.tar.xz |
revert back to using lower case _unlocked wrapper names
Diffstat (limited to 'src/fold.c')
-rw-r--r-- | src/fold.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/fold.c b/src/fold.c index bd9f738f5..1ffe60ca2 100644 --- a/src/fold.c +++ b/src/fold.c @@ -134,7 +134,7 @@ fold_file (char *filename, int width) return 1; } - while ((c = GETC (istream)) != EOF) + while ((c = getc (istream)) != EOF) { if (offset_out + 1 >= allocated_out) { @@ -145,7 +145,7 @@ fold_file (char *filename, int width) if (c == '\n') { line_out[offset_out++] = c; - FWRITE (line_out, sizeof (char), (size_t) offset_out, stdout); + fwrite (line_out, sizeof (char), (size_t) offset_out, stdout); column = offset_out = 0; continue; } @@ -173,9 +173,9 @@ fold_file (char *filename, int width) /* Found a blank. Don't output the part after it. */ logical_end++; - FWRITE (line_out, sizeof (char), (size_t) logical_end, + fwrite (line_out, sizeof (char), (size_t) logical_end, stdout); - PUTCHAR ('\n'); + putchar ('\n'); /* Move the remainder to the beginning of the next line. The areas being copied here might overlap. */ memmove (line_out, line_out + logical_end, @@ -195,7 +195,7 @@ fold_file (char *filename, int width) } } line_out[offset_out++] = '\n'; - FWRITE (line_out, sizeof (char), (size_t) offset_out, stdout); + fwrite (line_out, sizeof (char), (size_t) offset_out, stdout); column = offset_out = 0; goto rescan; } @@ -204,22 +204,22 @@ fold_file (char *filename, int width) } if (offset_out) - FWRITE (line_out, sizeof (char), (size_t) offset_out, stdout); + fwrite (line_out, sizeof (char), (size_t) offset_out, stdout); - if (FERROR (istream)) + if (ferror (istream)) { error (0, errno, "%s", filename); if (!STREQ (filename, "-")) - FCLOSE (istream); + fclose (istream); return 1; } - if (!STREQ (filename, "-") && FCLOSE (istream) == EOF) + if (!STREQ (filename, "-") && fclose (istream) == EOF) { error (0, errno, "%s", filename); return 1; } - if (FERROR (stdout)) + if (ferror (stdout)) { error (0, errno, _("write error")); return 1; @@ -304,9 +304,9 @@ main (int argc, char **argv) for (i = optind; i < argc; i++) errs |= fold_file (argv[i], width); - if (have_read_stdin && FCLOSE (stdin) == EOF) + if (have_read_stdin && fclose (stdin) == EOF) error (EXIT_FAILURE, errno, "-"); - if (FCLOSE (stdout) == EOF) + if (fclose (stdout) == EOF) error (EXIT_FAILURE, errno, _("write error")); exit (errs == 0 ? EXIT_SUCCESS : EXIT_FAILURE); |