summaryrefslogtreecommitdiffstats
path: root/contrib/diff
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2000-09-15 11:35:16 +0000
committergreen <green@FreeBSD.org>2000-09-15 11:35:16 +0000
commit85ac235bec8f9cd84116a15242c256e899f99936 (patch)
tree6243addfb364ea6b6e5e11498e9f3c16a8d85c8c /contrib/diff
parent10d32c8e9917e7b591e8aeb041a0a180e35f77ee (diff)
downloadFreeBSD-src-85ac235bec8f9cd84116a15242c256e899f99936.zip
FreeBSD-src-85ac235bec8f9cd84116a15242c256e899f99936.tar.gz
Also coerce diff(1) into working the other way (from no-\n to \n).
Taking out the evil warning fixed it one way, but didn't make the other way any better, so replace it with printing a single \n.
Diffstat (limited to 'contrib/diff')
-rw-r--r--contrib/diff/util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/diff/util.c b/contrib/diff/util.c
index 3cd3f91..a1e46dc 100644
--- a/contrib/diff/util.c
+++ b/contrib/diff/util.c
@@ -483,6 +483,9 @@ print_1_line (line_flag, line)
}
output_1_line (text, limit, flag_format, line_flag);
+
+ if ((!line_flag || line_flag[0]) && limit[-1] != '\n')
+ fputc ('\n', out);
}
/* Output a line from TEXT up to LIMIT. Without -t, output verbatim.
OpenPOWER on IntegriCloud