From 7a97c3ad508bc85c1c8ce83da5f4e5db649fc5ed Mon Sep 17 00:00:00 2001 From: gad Date: Mon, 25 Nov 2002 22:59:52 +0000 Subject: 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 --- contrib/diff/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib/diff/util.c') 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. -- cgit v1.1