summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorgad <gad@FreeBSD.org>2002-11-25 22:59:52 +0000
committergad <gad@FreeBSD.org>2002-11-25 22:59:52 +0000
commit7a97c3ad508bc85c1c8ce83da5f4e5db649fc5ed (patch)
treecdc3f4923a159e5de8869f75de1fbe04b9c8e334 /contrib
parent4021cd01fc331ad79922c3656b98af25412ff258 (diff)
downloadFreeBSD-src-7a97c3ad508bc85c1c8ce83da5f4e5db649fc5ed.zip
FreeBSD-src-7a97c3ad508bc85c1c8ce83da5f4e5db649fc5ed.tar.gz
Add back the "\ No newline at end of file" marker that is printed when
comparing two files, where only one file is missing the final newline character. This undoes revisions 1.3 and 1.4, returning 'diff' to how it behaved before July 2000. We can do this now because our version of 'patch' was modified (just before 4.6-release) to understand what to do with that line. This marker is the same one generated by 'diff' under netbsd, openbsd, darwin, and linux (and any OS with "gnu-diff" installed). Reviewed by: imp freebsd-standards (back in april) Approved by: re (bmah) MFC after: 1 week
Diffstat (limited to 'contrib')
-rw-r--r--contrib/diff/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/diff/util.c b/contrib/diff/util.c
index a1e46dc..67c4af9 100644
--- a/contrib/diff/util.c
+++ b/contrib/diff/util.c
@@ -485,7 +485,7 @@ 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);
+ fprintf (out, "\n\\ No newline at end of file\n");
}
/* Output a line from TEXT up to LIMIT. Without -t, output verbatim.
OpenPOWER on IntegriCloud