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
This commit is contained in:
gad 2002-11-25 22:59:52 +00:00
parent 0f26855ec6
commit f5ea035aa9

View File

@ -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.