diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 2000-05-15 08:30:43 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2000-05-15 08:30:43 +0000 |
| commit | e03983a32c622bf10e90ba1708ffd10cbaed8980 (patch) | |
| tree | 775e166682f3dc341e80ee52ac88b204a305bcad /usr.bin/cmp/regular.c | |
| parent | 0669702c014873e2018539a5089f06a768b51f56 (diff) | |
Notes
Diffstat (limited to 'usr.bin/cmp/regular.c')
| -rw-r--r-- | usr.bin/cmp/regular.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.bin/cmp/regular.c b/usr.bin/cmp/regular.c index 6f4e482954f94..feb5ba2d80b7c 100644 --- a/usr.bin/cmp/regular.c +++ b/usr.bin/cmp/regular.c @@ -29,6 +29,9 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ + * */ #ifndef lint @@ -96,7 +99,10 @@ c_regular(fd1, file1, skip1, len1, fd2, file2, skip2, len2) p2 += skip2 - off2; for (byte = line = 1; length--; ++p1, ++p2, ++byte) { if ((ch = *p1) != *p2) { - if (lflag) { + if (xflag) { + dfound = 1; + (void)printf("%08x %02x %02x\n", byte - 1, ch, *p2); + } else if (lflag) { dfound = 1; (void)printf("%6qd %3o %3o\n", byte, ch, *p2); } else |
