Recent

Author Topic: Any library for producing unified diff?  (Read 2387 times)

Chronos

  • Full Member
  • ***
  • Posts: 240
    • PascalClassLibrary
Any library for producing unified diff?
« on: June 23, 2017, 01:06:46 pm »
For one Windows application I want to implement text files comparison which can produce unified diff. Such diff can be further used in other utilities like Apply patch in TortoiseSVN. Is there any good FPC or Delphi implementation of that. I didn't found simple answer after short googling. Algorithm for GNU diff utility is somehow described so implementation from scratch can be possible. But if somebody already has such unit/library/component/package then it would make more sense to use existing solution.

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: Any library for producing unified diff?
« Reply #1 on: June 23, 2017, 01:29:07 pm »
Angus Johnson has a diff utility incl Delphi sources on his home page: http://angusj.com/delphi/textdiff.html. I don't know about the effort to port it to Lazarus (I don't think that it's too difficult), and I don't know if it fits your needs - just have a look.

 

TinyPortal © 2005-2018