summaryrefslogtreecommitdiff
path: root/src/nl.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-04-12 18:44:53 +0000
committerJim Meyering <jim@meyering.net>2003-04-12 18:44:53 +0000
commitd5fdbeda8958743229b88b0151268bd02848fc87 (patch)
tree70bb9601dfe4e2fbaf59dff6f1eed5d5d379164b /src/nl.c
parentd730a311aa7e0dd8c44880047df76f01aa195b2b (diff)
downloadcoreutils-d5fdbeda8958743229b88b0151268bd02848fc87.tar.gz
coreutils-d5fdbeda8958743229b88b0151268bd02848fc87.tar.bz2
coreutils-d5fdbeda8958743229b88b0151268bd02848fc87.zip
(proc_text): Fix a bug introduced on 2001-11-10,
for textutils-2.0.17, that would make nl output extra newlines in some cases.
Diffstat (limited to 'src/nl.c')
-rw-r--r--src/nl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nl.c b/src/nl.c
index d9011242f..ca4ed3370 100644
--- a/src/nl.c
+++ b/src/nl.c
@@ -349,7 +349,7 @@ proc_text (void)
blank_lines = 0;
}
else
- puts (print_no_line_fmt);
+ fputs (print_no_line_fmt, stdout);
}
else
print_lineno ();
@@ -358,15 +358,15 @@ proc_text (void)
if (1 < line_buf.length)
print_lineno ();
else
- puts (print_no_line_fmt);
+ fputs (print_no_line_fmt, stdout);
break;
case 'n':
- puts (print_no_line_fmt);
+ fputs (print_no_line_fmt, stdout);
break;
case 'p':
if (re_search (current_regex, line_buf.buffer, line_buf.length - 1,
0, line_buf.length - 1, (struct re_registers *) 0) < 0)
- puts (print_no_line_fmt);
+ fputs (print_no_line_fmt, stdout);
else
print_lineno ();
break;