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