diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2003-07-16 21:39:07 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2003-07-16 21:39:07 +0000 |
commit | 767598f49c321541e915c20f74ec31d288986a39 (patch) | |
tree | b78bcf2c864f79850078bcc18c0445bd19b55f7e /usr.sbin/tcpdump/print-ipsec.c | |
parent | 4db30cb4642a4ccd91755e50166b9a2a9771af45 (diff) |
Deal with files that lack a final newline before EOF (you naughty
emacs users!). In most cases this just means checking for EOF in
addition to '\n'. However, we need to tread carefully in readhash().
There we return 0 on EOF iff it is the first char in a "line".
Additionally, if the -b or -w flags were specified and the last
character in one file was '\n' but the other file is missing '\n',
pretend that we didn't see the newline in the one file. This is
consistent with GNU diff. For the non-{b,w} case, print
"\ No newline at end of file" when we see EOF before a newline in
one file where the other file has one. Again, this is for consistency
with GNU diff and patch(1) in -current knows how to interpret this
message.
OK tedu@ and otto@
Diffstat (limited to 'usr.sbin/tcpdump/print-ipsec.c')
0 files changed, 0 insertions, 0 deletions