On Wed, 31 Aug 2011 14:01:34 +0100, Steve Simon wrote:
Anyone have any pointers to a diff for C code.

I have two libraries, A and B.

B is and expanded and modified version of A and I have been
asked to extract A from B to build two libraries one
built on top of the other.

What I think I need is a program which parses C and will
do diffs at the level of functions, globals , #defines and enums.

it would ideally have two input files and generate two outputs
one output being the common code, one with the extensions on the common.

I don't expect this to be fully automated, there is going to be a load
of hand edition before I am done, but is there somthing which can do
the easy stuff for me?

-Steve

Why don't use a C preprocessor to do that?
You can have one file with ifdefs, and print the two files using an argument

Example:

#ifdef LIBA
#include <windows.h>
#else
#include <unistd.h>
#endif

and run

"cpp -DLIBA ..." and
"cpp -ULIBA ..." or "cpp ..."


--
||// //\\// Rodolfo "kix" Garcia
||\\// //\\ http://www.kix.es/

Reply via email to