Need a tool to compare two C-source files

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
Jaap Weidemann
Posts: 62
Joined: Mon Aug 14, 2006 3:47 am
Location: Stellenbosch, South Africa

Re: Need a tool to compare two C-source files

Post by Jaap Weidemann »

If you're willing to throw some money at it, I'd recommend Beyond Compare or UltraCompare.
User avatar
Kempelen
Posts: 620
Joined: Fri Feb 08, 2008 10:44 am
Location: Madrid - Spain

Re: Need a tool to compare two C-source files

Post by Kempelen »

JensBNielsen wrote:The two files are an old and a new version of my chessprogram Dabbaba.
Each file consists of about 10.000 text-lines.

I want to see which lines are added, deleted og changed - and don't want to bother about all the many lines that are unchanged.
I use KDiff3: http://kdiff3.sourceforge.net/
It is easy and very good.
Fermin Serrano
Author of 'Rodin' engine
http://sites.google.com/site/clonfsp/
JensBNielsen

Re: Need a tool to compare two C-source files

Post by JensBNielsen »

Thanks for all your replies.

I tried WinMerge and it is awesome for my needs :D
diep
Posts: 1822
Joined: Thu Mar 09, 2006 11:54 pm
Location: The Netherlands

Re: Need a tool to compare two C-source files

Post by diep »

steffan wrote:Eclipse has a 2-way (and 3-way) graphical diff and merge capability for text files. It can also perform recursive directory compares.

Comparisons can be performed between any files or directories in the workspace, or any historical versions stored either by Eclipse ("local history") or your choice of version control system (CVS, Subversion, Git, etc).

http://help.eclipse.org/ganymede/index. ... sks-68.htm

Cheers,
Steffan
Show me a picture.

Thanks,
Vincent
steffan
Posts: 28
Joined: Sun Mar 12, 2006 12:08 am
Location: Midlands, England

Re: Need a tool to compare two C-source files

Post by steffan »

diep wrote:
steffan wrote:Eclipse has a 2-way (and 3-way) graphical diff and merge capability for text files. It can also perform recursive directory compares.

Comparisons can be performed between any files or directories in the workspace, or any historical versions stored either by Eclipse ("local history") or your choice of version control system (CVS, Subversion, Git, etc).

http://help.eclipse.org/ganymede/index. ... sks-68.htm

Cheers,
Steffan
Show me a picture.

Thanks,
Vincent
The documentation for these features include pictures :

http://help.eclipse.org/ganymede/index. ... s-68dg.htm
http://help.eclipse.org/ganymede/index. ... pts-29.htm

Cheers,
Steffan
Christopher Conkie
Posts: 6073
Joined: Sat Apr 01, 2006 9:34 pm
Location: Scotland

Re: Need a tool to compare two C-source files

Post by Christopher Conkie »

JensBNielsen wrote:Thanks for all your replies.

I tried WinMerge and it is awesome for my needs :D
There is one other that is even better than WinMerge (which is very good).

ExamDiff Pro

http://www.prestosoft.com/edp_examdiff.asp

You can examine binaries with the pro version which has a free trial.

I have used this before for php coding (and also "other" chess related purposes)

:-)

Christopher
wgarvin
Posts: 838
Joined: Thu Jul 05, 2007 5:03 pm
Location: British Columbia, Canada

Re: Need a tool to compare two C-source files

Post by wgarvin »

Jaap Weidemann wrote:If you're willing to throw some money at it, I'd recommend Beyond Compare or UltraCompare.
In the pay-for category, I rather like Araxis Merge.
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: Need a tool to compare two C-source files

Post by Don »

I use tkdiff to compare source files.
User avatar
jshriver
Posts: 1342
Joined: Wed Mar 08, 2006 9:41 pm
Location: Morgantown, WV, USA

Re: Need a tool to compare two C-source files

Post by jshriver »

kdiff3, it's a wonderful program. Has two columns for each document and highlights which lines are different and adds space when there are lines in one file but another.

Use it all the time, and not only for C it's applicable for any text file (even binary if you don't mind reading hex).

-Josh
Dirt
Posts: 2851
Joined: Wed Mar 08, 2006 10:01 pm
Location: Irvine, CA, USA

Re: Need a tool to compare two C-source files

Post by Dirt »

jshriver wrote:kdiff3, it's a wonderful program. Has two columns for each document and highlights which lines are different and adds space when there are lines in one file but another.

Use it all the time, and not only for C it's applicable for any text file (even binary if you don't mind reading hex).

-Josh
If there are many trivial changes it might be worthwhile to compare the output of indent on each file instead of the files themselves. Indent will format C source to a particular style.