Web Hosting Talk







View Full Version : An algorithm to find diff's?


Ahmad
02-19-2002, 01:42 PM
Hi,

I've been looking for a C implementation of a difference algorithm (like the one used in the diff command). I've used Python's difflib, but its written in Python. I want it in C to add it to the PHP source code.

Also, if anybody have an algorithm described, It'll try to implement it, but thats gonna cost me more time.

Thanks in advance :)

sigma
02-19-2002, 02:49 PM
Originally posted by Ahmad

I've been looking for a C implementation of a difference algorithm (like the one used in the diff command). I've used Python's difflib, but its written in Python. I want it in C to add it to the PHP source code.



Why not pull the source to 'diff' itself? It should be in the source distribution of Linux, FreeBSD, etc. There might be a GNU version as well.

Kevin

Ahmad
02-19-2002, 03:38 PM
Actually, I know of nothing but the GNU version.

I've been trying to understand it for a long time now without luck :(. It isn't documented, but there is a reference in the source to an article that was published in 1986. Our library only have issues of the journal starting from 1992 or something, I couldn't get that article.

The same thing goes for the python implementation.