[Toybox] diff.c

Ray Gardner raygard at gmail.com
Fri Aug 19 19:08:32 PDT 2022


Finally got subscribed here, thanks.

As I mentioned somewhere, I've been working on a diff.c that uses a
longest common subsequence (LCS) algorithm. I've attached a version
here. It handles only -u for now, only two files, and I think it does
it correctly. But it's at least a proof of concept.

This uses my modification of Kuo and Cross's modification of Hunt and
Szymanski's LCS algorithm. I have read your (Rob's) posts regarding
grokking how LCS algos work and the opacity of the technical papers. I
am working on a blog post or two where I will try to explain the algos
in a somewhat informal but convincing manner (I hope).

But pending that, I thought I'd get this out to y'all to take a look
at. It's standalone, not integrated into toybox. Just gcc diff.c may
work.

Ray Gardner
raygard.net
github.com/raygard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff.c
Type: application/octet-stream
Size: 9540 bytes
Desc: not available
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20220819/d256e3b6/attachment.obj>


More information about the Toybox mailing list