Need a tool to compare two C-source files

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

JensBNielsen

Need a tool to compare two C-source files

Post by JensBNielsen »

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.
F. Bluemers
Posts: 868
Joined: Thu Mar 09, 2006 11:21 pm
Location: Nederland

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

Post by F. Bluemers »

WinMerge
Jan Brouwer
Posts: 201
Joined: Thu Mar 22, 2007 7:12 pm
Location: Netherlands

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

Post by Jan Brouwer »

F. Bluemers wrote:WinMerge
+1, also handy for comparing directories of files.
Vinvin
Posts: 5228
Joined: Thu Mar 09, 2006 9:40 am
Full name: Vincent Lejeune

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

Post by Vinvin »

"Total commander" have an option to do that : select the 2 files and do : menu file -> compare by content.
Download it here : www.ghisler.com/

Vincent
Dann Corbit
Posts: 12540
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

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

Post by Dann Corbit »

Jan Brouwer wrote:
F. Bluemers wrote:WinMerge
+1, also handy for comparing directories of files.
And here's an AMEN from the congregation
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

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

Post by Sven »

You should consider BeyondCompare. It is a professional tool which is used by companies but you can get a 30-days evaluation license for nothing and it counts only those days where you actually use the tool ;-)

BC is really one of the best tools I have ever seen. (I don't get paid for that ...)

Sven
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 »

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
Robert Pope
Posts: 558
Joined: Sat Mar 25, 2006 8:27 pm

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

Post by Robert Pope »

You can even do something with just MS Word, for a one-time solution. Open the first file, then do "Merge documents" and select the second file.
JVMerlino
Posts: 1357
Joined: Wed Mar 08, 2006 10:15 pm
Location: San Francisco, California

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

Post by JVMerlino »

Dann Corbit wrote:
Jan Brouwer wrote:
F. Bluemers wrote:WinMerge
+1, also handy for comparing directories of files.
And here's an AMEN from the congregation
HALLELUJAH! I used it just today.... :D

jm
CThinker
Posts: 388
Joined: Wed Mar 08, 2006 10:08 pm

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

Post by CThinker »

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.
windiff