1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-20 10:51:48 +02:00

Change all uses of unlocked-wrapped functions to their upper case wrapper names.

This commit is contained in:
Jim Meyering
1998-06-29 02:11:07 +00:00
parent 02fc5fa0d0
commit dd9470cb58
24 changed files with 250 additions and 250 deletions

View File

@@ -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);
}