arrbee / diff-match-patch-c Goto Github PK
View Code? Open in Web Editor NEWC language port of google-diff-match-patch library
License: MIT License
C language port of google-diff-match-patch library
License: MIT License
Currently, the library can only be built on Windows if one uses Mingw (and presumably Cygwin). It would be nice to have other build options utilizing Visual Studio (if possible).
This may not be possible, as Visual Studio still lacks full support for C99, not to mention C11 .
I'd be willing to take this on, since I use windows as my primary operating system.
While I am still actively debugging this, it would be nice to get a second set of eyes on this:
Take file a
a
bcde
Then file b
A
bcdefghijklmnopqrs
The process works as expected:
> "a\x0abcde\x0a"
-"a", +"A", ="\x0abcde", +"fghijklmno", ="\x0a"
< "A\x0abcdefghijklmnopqrs\x0a"
But if you add one more character to the second line of file b
(note the trailing t
)
A
bcdefghijklmnopqrst
The third iteration of diff_cleanup_merge()
will never hit i != -1
As I've stated, I'm actively debugging this, but just thought you might want to know.
Is this project still active?
To the best of my knowledge, all string types used throughout the library are standard ASCII character types. Since this is a library based on string manipulation, we should probably figure out a way to use UTF-8 (Unicode) or UCS (Wide character) strings instead.
According to this site, using UTF-8 for unicode strings would probably be the best solution, as it is already compatible with ASCII encodings, and is more memory efficient than wide characters.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.