summaryrefslogtreecommitdiff
path: root/src/nl.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-06-29 02:11:07 +0000
committerJim Meyering <jim@meyering.net>1998-06-29 02:11:07 +0000
commitdd9470cb58f9c668279aa8dab8164440b73daaad (patch)
treecf22a0d981deca2485740b4b6ec6efd6ae15793d /src/nl.c
parent02fc5fa0d0a68fa070dcb93983ad20590e051164 (diff)
downloadcoreutils-dd9470cb58f9c668279aa8dab8164440b73daaad.tar.xz
Change all uses of unlocked-wrapped functions to their upper case wrapper names.
Diffstat (limited to 'src/nl.c')
-rw-r--r--src/nl.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/nl.c b/src/nl.c
index 6a7fab259..f7d4d747d 100644
--- a/src/nl.c
+++ b/src/nl.c
@@ -295,7 +295,7 @@ proc_header (void)
current_regex = &header_regex;
if (reset_numbers)
line_no = starting_line_number;
- putchar ('\n');
+ PUTCHAR ('\n');
}
/* Switch to a body section. */
@@ -305,7 +305,7 @@ proc_body (void)
{
current_type = body_type;
current_regex = &body_regex;
- putchar ('\n');
+ PUTCHAR ('\n');
}
/* Switch to a footer section. */
@@ -315,7 +315,7 @@ proc_footer (void)
{
current_type = footer_type;
current_regex = &footer_regex;
- putchar ('\n');
+ PUTCHAR ('\n');
}
/* Process a regular text line in `line_buf'. */
@@ -358,8 +358,8 @@ proc_text (void)
print_lineno ();
break;
}
- fwrite (line_buf.buffer, sizeof (char), line_buf.length, stdout);
- putchar ('\n');
+ FWRITE (line_buf.buffer, sizeof (char), line_buf.length, stdout);
+ PUTCHAR ('\n');
}
/* Return the type of line in `line_buf'. */
@@ -431,14 +431,14 @@ nl_file (const char *file)
process_file (stream);
- if (ferror (stream))
+ if (FERROR (stream))
{
error (0, errno, "%s", file);
return 1;
}
if (STREQ (file, "-"))
- clearerr (stream); /* Also clear EOF. */
- else if (fclose (stream) == EOF)
+ CLEARERR (stream); /* Also clear EOF. */
+ else if (FCLOSE (stream) == EOF)
{
error (0, errno, "%s", file);
return 1;
@@ -609,12 +609,12 @@ main (int argc, char **argv)
for (; optind < argc; optind++)
exit_status |= nl_file (argv[optind]);
- if (have_read_stdin && fclose (stdin) == EOF)
+ if (have_read_stdin && FCLOSE (stdin) == EOF)
{
error (0, errno, "-");
exit_status = 1;
}
- 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);