michael@428: Index: lib/c-stack.c michael@428: --- lib/c-stack.c.orig 2011-08-28 13:55:52.000000000 +0200 michael@428: +++ lib/c-stack.c 2012-05-12 10:06:32.000000000 +0200 michael@428: @@ -35,6 +35,10 @@ michael@428: michael@428: #include michael@428: michael@428: +#if defined(__FreeBSD__) michael@428: +#include michael@428: +#endif michael@428: + michael@428: #ifndef __attribute__ michael@428: # if __GNUC__ < 3 michael@428: # define __attribute__(x) michael@428: Index: man/diff3.1 michael@428: --- man/diff3.1.orig 2011-09-02 17:19:12.000000000 +0200 michael@428: +++ man/diff3.1 2012-05-12 10:06:32.000000000 +0200 michael@428: @@ -39,6 +39,9 @@ michael@428: \fB\-a\fR, \fB\-\-text\fR michael@428: treat all files as text michael@428: .TP michael@428: +\fB\-O\fR michael@428: +Always show content of OLDFILE in bracketing output of unmerged changes. (OpenPKG only) michael@428: +.TP michael@428: \fB\-\-strip\-trailing\-cr\fR michael@428: strip trailing carriage return on input michael@428: .TP michael@428: Index: src/diff3.c michael@428: --- src/diff3.c.orig 2011-07-03 22:42:54.000000000 +0200 michael@428: +++ src/diff3.c 2012-05-12 10:06:32.000000000 +0200 michael@428: @@ -158,6 +158,9 @@ michael@428: /* If nonzero, show information for DIFF_2ND diffs. */ michael@428: static bool show_2nd; michael@428: michael@428: +/* If nonzero, show information for DIFF_2ND on overlaps, too. */ michael@428: +static bool show_2nd_on_overlap; michael@428: + michael@428: /* If nonzero, include `:wq' at the end of the script michael@428: to write out the file being edited. */ michael@428: static bool finalwrite; michael@428: @@ -237,7 +240,7 @@ michael@428: textdomain (PACKAGE); michael@428: c_stack_action (0); michael@428: michael@428: - while ((c = getopt_long (argc, argv, "aeimvx3AEL:TX", longopts, 0)) != -1) michael@428: + while ((c = getopt_long (argc, argv, "aeimvx3AEL:TXO", longopts, 0)) != -1) michael@428: { michael@428: switch (c) michael@428: { michael@428: @@ -272,6 +275,9 @@ michael@428: case 'e': michael@428: incompat++; michael@428: break; michael@428: + case 'O': michael@428: + show_2nd_on_overlap = true; michael@428: + break; michael@428: case 'T': michael@428: initial_tab = true; michael@428: break; michael@428: @@ -1547,7 +1553,7 @@ michael@428: leading_dot = false; michael@428: if (type == DIFF_ALL) michael@428: { michael@428: - if (show_2nd) michael@428: + if (show_2nd || show_2nd_on_overlap) michael@428: { michael@428: /* Append lines from FILE1. */ michael@428: fprintf (outputfile, "||||||| %s\n", file1); michael@428: @@ -1686,7 +1692,7 @@ michael@428: D_RELLEN (b, mapping[FILE0], i), outputfile); michael@428: } michael@428: michael@428: - if (show_2nd) michael@428: + if (show_2nd || show_2nd_on_overlap) michael@428: { michael@428: /* Put in lines from FILE1 with bracket. */ michael@428: fprintf (outputfile, format_2nd, file1);