Page MenuHomeFreeBSD

cmp: add -n, --bytes to limit number of bytes to compare
ClosedPublic

Authored by kevans on Sep 23 2021, 5:56 AM.
Tags
None
Referenced Files
F172656510: D32072.id95544.diff
Sun, Sep 20, 12:24 AM
F172656359: D32072.id95961.diff
Sun, Sep 20, 12:23 AM
F172656340: D32072.id95575.diff
Sun, Sep 20, 12:22 AM
F172656019: D32072.diff
Sun, Sep 20, 12:19 AM
Unknown Object (File)
Wed, Sep 9, 2:17 PM
Unknown Object (File)
Wed, Sep 9, 1:35 AM
Unknown Object (File)
Tue, Sep 8, 6:13 PM
Unknown Object (File)
Mon, Sep 7, 3:44 PM
Subscribers

Details

Summary

This is compatible with GNU cmp.

Sponsored by: Klara, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj added inline comments.
usr.bin/cmp/cmp.c
93

for consistency with handling of expand_number() errors elsewhere.

97

Cases are typically sorted, i.e., case 'n' should come after case 'l'.

usr.bin/cmp/link.c
77

We pass skip1 and skip2 as parameters to each comparison function, but limit a global var. Is there any reason it can't also be a function parameter?

This revision is now accepted and ready to land.Sep 23 2021, 6:33 PM
kevans added inline comments.
usr.bin/cmp/cmp.c
97

I fixed the sorting in the other two, as well...

kevans marked an inline comment as done.

Address commentary

This revision now requires review to proceed.Sep 23 2021, 7:15 PM
This revision is now accepted and ready to land.Sep 29 2021, 1:58 PM