davison@EDDIE.MIT.EDU (Wayne Davison) (11/17/89)
I've found what appears to be a bug in diff version 1.7. Please unshar these two short files and see if you get CORRECT results for: diff -c one two but INCORRECT results for: diff -c two one Also, if the -c flag is not used, a "diff two one" fails in a slightly different manner than the context diff. I'm using a VAX 11/780, running 4.3BSD. I tried both Berkley's cc & Gnu's gcc for compilation -- both fail in the same way. Thanx for your time. -- Wayne Davison \ /| / /| \/ /| /(_) davison@drivax.UUCP (_)/ |/ /\| / / |/ \ ...!amdahl!drivax!davison ----8<------8<------8<------8<-----cut here----->8------>8------>8------>8---- #! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create: # one # two # diff.one.two # diff.two.one # This archive created: Thu Nov 16 18:08:50 1989 # By: Wayne Davison (Digital Research, Monterey CA) export PATH; PATH=/bin:/usr/bin:$PATH echo shar: "extracting 'one'" '(41 characters)' if test -f 'one' then echo shar: "will not over-write existing file 'one'" else sed 's/^X//' << \SHAR_EOF > 'one' Xvoid nothing1() X{ X} X Xvoid nothing2() X{ X} SHAR_EOF fi echo shar: "extracting 'two'" '(71 characters)' if test -f 'two' then echo shar: "will not over-write existing file 'two'" else sed 's/^X//' << \SHAR_EOF > 'two' Xvoid nothing1() X{ X} X Xint zero() X{ X return 0; X} X Xvoid nothing2() X{ X} SHAR_EOF fi echo shar: "extracting 'diff.one.two'" '(186 characters)' if test -f 'diff.one.two' then echo shar: "will not over-write existing file 'diff.one.two'" else sed 's/^X//' << \SHAR_EOF > 'diff.one.two' X*** one Thu Nov 16 18:04:31 1989 X--- two Thu Nov 16 18:04:31 1989 X*************** X*** 2,7 **** X--- 2,12 ---- X { X } X X+ int zero() X+ { X+ return 0; X+ } X+ X void nothing2() X { X } SHAR_EOF fi echo shar: "extracting 'diff.two.one'" '(178 characters)' if test -f 'diff.two.one' then echo shar: "will not over-write existing file 'diff.two.one'" else sed 's/^X//' << \SHAR_EOF > 'diff.two.one' X*** two Thu Nov 16 18:04:31 1989 X--- one Thu Nov 16 18:04:31 1989 X*************** X*** 2,10 **** X { X } X X- int zero() X- { X- return 0; X } X- X- void nothing2() X--- 2,5 ---- SHAR_EOF fi exit 0 # End of shell archive ----8<------8<------8<------8<-----the end------>8------>8------>8------>8----