|
-
February 20th, 2003, 04:56 PM
#1
Looking for a specialized Diff tool
Does anyone know if a diff tool exists that will display the class/struct definition or function prototype if something changes:
For Example --
File Version1:
Code:
#ifndef CLASS_A_H
#define CLASS_A_H
Class A
{
int dummy1;
};
#endif
File Version2:
Code:
#ifndef CLASS_A_H
#define CLASS_A_H
Class A
{
int dummy1;
int dummy2;
};
#endif
Most diff tools will report that a line was inserted in version 2 of the file and report where and what that line was.
What I'm looking for is something like the following so it will be more readable:
Code:
***OldFile.h***
Class A
{
int dummy1;
};
***NewFile.h***
Class A
{
int dummy1;
int dummy2;
};
Thanks,
- Kevin
-
February 20th, 2003, 05:34 PM
#2
Well...'TotalCommander' has a diff tool included which basically displays it the following way...
Code:
Class A | Class A
{ | {
int dummy1; | int dummy1;
| int dummy2;
}; | };
It also displays the line numbers etc. It is of course not a separate diff tool but rather a complete file manager (which actually is pretty nice and powerful). It is shareware however you can fully use it except that you have to press a button at startup...
-
February 20th, 2003, 05:41 PM
#3
Thanks. Actually though, I'm looking for a diff tool that will produce a text file (preferably from the command line). My company is trying to automate the creation of a master diff file for 100+ sources that will be in a readable format for internal developers as well as our customers.
Thanks again!
- Kevin
-
February 20th, 2003, 07:05 PM
#4
If you're asking for what I'm thinking, wouldn't it be a trivial thing to code up? Is it just a line-by-line comparison, or something more sophisticated? If it's the former, that shouldn't take but 10 minutes.
-
February 20th, 2003, 07:18 PM
#5
It's a little more sophisticated... especially when you consider the possibility of embedded classes. Anyway, I am thinking about doing something minimal that will suit our immediate needs using Python (it has excellent and easy to use regular expression support) -- perhaps I'll try C+; the STL should be able to easily do what I want... hmmmm.....
Anyway, I was just hoping someone else might have already developed something like this so I wouldn't have to spend the time to do it myself. And I have a feeling this will still take a decent chunk of time (mostly b/c of the logic design).
Thanks anyway guys!
- Kevin
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|