mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-17 18:02:09 +03:00
(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.
This commit is contained in:
1 parent
d730a311aa
commit
d5fdbeda89
1 file changed
+4
-4
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user