HomeFreeBSD

diff3: Clean up printing of ranges for edscript output

Description

diff3: Clean up printing of ranges for edscript output

Replace the edscript code that tracked and printed lines using byte
offsets with code that can work from line offsets.

This tidies up the reduces duplication in the edscript output code. It
also fixes the usage of the de struct so that it only tracks diffs as
line offsets rather than the usage changing from line offsets to byte
offsets during the lifetime of diff3.

Large files with large numbers of ranges will probably suffer in
performance here, but as we don't use diff3 yet this isn't a regression.
Include a warning for future hackers so they have a place to start
hacking from.

Reviewed by: pstef
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D34941

Details

Provenance
thjAuthored on Apr 19 2022, 1:47 PM
Reviewer
pstef
Differential Revision
D34941: diff3: Clean up printing of ranges for edscript output
Parents
rG8c47d8f53854: prometheus_sysctl_exporter: fix metric aliasing
Branches
Unknown
Tags
Unknown