diff options
author | delphij <delphij@FreeBSD.org> | 2007-06-15 07:49:35 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2007-06-15 07:49:35 +0000 |
commit | f165f20f9e48ef04ac24357977823712bda4e03e (patch) | |
tree | 070957e3f5f9a9201e92e4fef1d36289ca071fc2 /contrib/diff | |
parent | 126c063fa1315229c0d82116433a4fd4c9b399c2 (diff) | |
download | FreeBSD-src-f165f20f9e48ef04ac24357977823712bda4e03e.zip FreeBSD-src-f165f20f9e48ef04ac24357977823712bda4e03e.tar.gz |
Apply vendor patch that implements 1/2 as aliases of l/r.
Requested by: dmalone, Chuck Swiger
Diffstat (limited to 'contrib/diff')
-rw-r--r-- | contrib/diff/doc/diff.texi | 4 | ||||
-rw-r--r-- | contrib/diff/src/sdiff.c | 23 |
2 files changed, 16 insertions, 11 deletions
diff --git a/contrib/diff/doc/diff.texi b/contrib/diff/doc/diff.texi index a8724f4..607e862 100644 --- a/contrib/diff/doc/diff.texi +++ b/contrib/diff/doc/diff.texi @@ -2465,18 +2465,22 @@ Like @samp{eb}, except precede each version with a header that shows what file and lines the version came from. @item el +@itemx e1 Edit a copy of the left version, then copy the result to the output. @item er +@itemx e2 Edit a copy of the right version, then copy the result to the output. @item l +@itemx 1 Copy the left version to the output. @item q Quit. @item r +@itemx 2 Copy the right version to the output. @item s diff --git a/contrib/diff/src/sdiff.c b/contrib/diff/src/sdiff.c index 2b0a2ae..a1461f4 100644 --- a/contrib/diff/src/sdiff.c +++ b/contrib/diff/src/sdiff.c @@ -857,11 +857,11 @@ give_help (void) fprintf (stderr, "%s", _("\ ed:\tEdit then use both versions, each decorated with a header.\n\ eb:\tEdit then use both versions.\n\ -el:\tEdit then use the left version.\n\ -er:\tEdit then use the right version.\n\ -e:\tEdit a new version.\n\ -l:\tUse the left version.\n\ -r:\tUse the right version.\n\ +el or e1:\tEdit then use the left version.\n\ +er or e2:\tEdit then use the right version.\n\ +e:\tDiscard both versions then edit a new one.\n\ +l or 1:\tUse the left version.\n\ +r or 2:\tUse the right version.\n\ s:\tSilently include common lines.\n\ v:\tVerbosely include common lines.\n\ q:\tQuit.\n\ @@ -917,7 +917,8 @@ edit (struct line_filter *left, char const *lname, lin lline, lin llen, cmd0 = skip_white (); switch (cmd0) { - case 'l': case 'r': case 's': case 'v': case 'q': + case '1': case '2': case 'l': case 'r': + case 's': case 'v': case 'q': if (skip_white () != '\n') { give_help (); @@ -931,7 +932,7 @@ edit (struct line_filter *left, char const *lname, lin lline, lin llen, cmd1 = skip_white (); switch (cmd1) { - case 'b': case 'd': case 'l': case 'r': + case '1': case '2': case 'b': case 'd': case 'l': case 'r': if (skip_white () != '\n') { give_help (); @@ -969,11 +970,11 @@ edit (struct line_filter *left, char const *lname, lin lline, lin llen, switch (cmd0) { - case 'l': + case '1': case 'l': lf_copy (left, llen, outfile); lf_skip (right, rlen); return true; - case 'r': + case '2': case 'r': lf_copy (right, rlen, outfile); lf_skip (left, llen); return true; @@ -1014,7 +1015,7 @@ edit (struct line_filter *left, char const *lname, lin lline, lin llen, (long int) (lline + llen - 1)); } /* Fall through. */ - case 'b': case 'l': + case '1': case 'b': case 'l': lf_copy (left, llen, tmp); break; @@ -1036,7 +1037,7 @@ edit (struct line_filter *left, char const *lname, lin lline, lin llen, (long int) (rline + rlen - 1)); } /* Fall through. */ - case 'b': case 'r': + case '2': case 'b': case 'r': lf_copy (right, rlen, tmp); break; |