diff

Andrew Koenig ark at alice.UUCP
Sun Jan 8 03:13:42 AEST 1989


In article <5174 at lynx.UUCP>, m5 at lynx.uucp (Mike McNally) writes:
> While hacking on GNU diff to add the -D option, I noticed a seemingly
> unavoidable problem with the whole concept.  The -D option generates

There's another problem:

	File 1:

	stuff 1
	#ifdef X
	stuff 2
	#endif
	stuff 3


	File 2:

	stuff 1
	#ifdef Y
	stuff 2
	#endif
	stuff 3

The obvious way to merge this is:

	stuff 1
	#ifdef FOO
	#ifdef X
	#else
	#ifdef Y
	#endif
	stuff 2
	#endif
	stuff 3

but this is obviously wrong.

The correct solution is left as an exercise for the reader.
-- 
				--Andrew Koenig
				  ark at europa.att.com



More information about the Comp.unix.wizards mailing list