diff options
author | Jim Meyering <jim@meyering.net> | 1998-06-29 02:11:07 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1998-06-29 02:11:07 +0000 |
commit | dd9470cb58f9c668279aa8dab8164440b73daaad (patch) | |
tree | cf22a0d981deca2485740b4b6ec6efd6ae15793d /src/paste.c | |
parent | 02fc5fa0d0a68fa070dcb93983ad20590e051164 (diff) | |
download | coreutils-dd9470cb58f9c668279aa8dab8164440b73daaad.tar.gz coreutils-dd9470cb58f9c668279aa8dab8164440b73daaad.tar.bz2 coreutils-dd9470cb58f9c668279aa8dab8164440b73daaad.zip |
Change all uses of unlocked-wrapped functions to their upper case wrapper names.
Diffstat (limited to 'src/paste.c')
-rw-r--r-- | src/paste.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/paste.c b/src/paste.c index 9f9850972..abb856c6d 100644 --- a/src/paste.c +++ b/src/paste.c @@ -230,10 +230,10 @@ paste_parallel (int nfiles, char **fnamptr) line_length = 0; /* Clear so we can easily detect EOF. */ if (fileptr[i] != CLOSED) { - chr = getc (fileptr[i]); + chr = GETC (fileptr[i]); if (chr != EOF && delims_saved) { - fwrite (delbuf, sizeof (char), delims_saved, stdout); + FWRITE (delbuf, sizeof (char), delims_saved, stdout); delims_saved = 0; } @@ -242,8 +242,8 @@ paste_parallel (int nfiles, char **fnamptr) line_length++; if (chr == '\n') break; - putc (chr, stdout); - chr = getc (fileptr[i]); + PUTC (chr, stdout); + chr = GETC (fileptr[i]); } } @@ -253,14 +253,14 @@ paste_parallel (int nfiles, char **fnamptr) If an EOF or error, close the file and mark it in the list. */ if (fileptr[i] != CLOSED) { - if (ferror (fileptr[i])) + if (FERROR (fileptr[i])) { error (0, errno, "%s", fnamptr[i]); errors = 1; } if (fileptr[i] == stdin) - clearerr (fileptr[i]); /* Also clear EOF. */ - else if (fclose (fileptr[i]) == EOF) + CLEARERR (fileptr[i]); /* Also clear EOF. */ + else if (FCLOSE (fileptr[i]) == EOF) { error (0, errno, "%s", fnamptr[i]); errors = 1; @@ -279,10 +279,10 @@ paste_parallel (int nfiles, char **fnamptr) /* No. Some files were not closed for this line. */ if (delims_saved) { - fwrite (delbuf, sizeof (char), delims_saved, stdout); + FWRITE (delbuf, sizeof (char), delims_saved, stdout); delims_saved = 0; } - putc ('\n', stdout); + PUTC ('\n', stdout); } continue; /* Next read of files, or exit. */ } @@ -304,14 +304,14 @@ paste_parallel (int nfiles, char **fnamptr) if (fileptr[i + 1] != ENDLIST) { if (chr != '\n') - putc (chr, stdout); + PUTC (chr, stdout); if (*delimptr != EMPTY_DELIM) - putc (*delimptr, stdout); + PUTC (*delimptr, stdout); if (++delimptr == delim_end) delimptr = delims; } else - putc (chr, stdout); + PUTC (chr, stdout); } } } @@ -350,7 +350,7 @@ paste_serial (int nfiles, char **fnamptr) delimptr = delims; /* Set up for delimiter string. */ - charold = getc (fileptr); + charold = GETC (fileptr); if (charold != EOF) { /* `charold' is set up. Hit it! @@ -359,38 +359,38 @@ paste_serial (int nfiles, char **fnamptr) character if needed. After the EOF, output `charold' if it's a newline; otherwise, output it and then a newline. */ - while ((charnew = getc (fileptr)) != EOF) + while ((charnew = GETC (fileptr)) != EOF) { /* Process the old character. */ if (charold == '\n') { if (*delimptr != EMPTY_DELIM) - putc (*delimptr, stdout); + PUTC (*delimptr, stdout); if (++delimptr == delim_end) delimptr = delims; } else - putc (charold, stdout); + PUTC (charold, stdout); charold = charnew; } /* Hit EOF. Process that last character. */ - putc (charold, stdout); + PUTC (charold, stdout); } if (charold != '\n') - putc ('\n', stdout); + PUTC ('\n', stdout); - if (ferror (fileptr)) + if (FERROR (fileptr)) { error (0, errno, "%s", *fnamptr); errors = 1; } if (fileptr == stdin) - clearerr (fileptr); /* Also clear EOF. */ - else if (fclose (fileptr) == EOF) + CLEARERR (fileptr); /* Also clear EOF. */ + else if (FCLOSE (fileptr) == EOF) { error (0, errno, "%s", *fnamptr); errors = 1; @@ -485,9 +485,9 @@ main (int argc, char **argv) exit_status = paste_parallel (argc - optind, &argv[optind]); else exit_status = paste_serial (argc - optind, &argv[optind]); - if (have_read_stdin && fclose (stdin) == EOF) + if (have_read_stdin && FCLOSE (stdin) == EOF) error (EXIT_FAILURE, errno, "-"); - if (ferror (stdout) || fclose (stdout) == EOF) + if (FERROR (stdout) || fclose (stdout) == EOF) error (EXIT_FAILURE, errno, _("write error")); exit (exit_status == 0 ? EXIT_SUCCESS : EXIT_FAILURE); } |