summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/cvs/diff/analyze.c
diff options
context:
space:
mode:
authortholo <tholo@openbsd.org>2001-09-28 22:45:35 +0000
committertholo <tholo@openbsd.org>2001-09-28 22:45:35 +0000
commit43c1707e6f6829177cb1974ee6615ce6c1307689 (patch)
tree233c059b44960ac679320e3e905b66e024ba011f /gnu/usr.bin/cvs/diff/analyze.c
parentHack to work around bootpaths like: (diff)
downloadwireguard-openbsd-43c1707e6f6829177cb1974ee6615ce6c1307689.tar.xz
wireguard-openbsd-43c1707e6f6829177cb1974ee6615ce6c1307689.zip
Latest from Cyclic Software
Diffstat (limited to 'gnu/usr.bin/cvs/diff/analyze.c')
-rw-r--r--gnu/usr.bin/cvs/diff/analyze.c39
1 files changed, 18 insertions, 21 deletions
diff --git a/gnu/usr.bin/cvs/diff/analyze.c b/gnu/usr.bin/cvs/diff/analyze.c
index f2925946e38..3262444e6b1 100644
--- a/gnu/usr.bin/cvs/diff/analyze.c
+++ b/gnu/usr.bin/cvs/diff/analyze.c
@@ -621,7 +621,9 @@ shift_boundaries (filevec)
struct file_data filevec[];
{
int f;
- int inhibit_hunk_merge = horizon_lines != context;
+
+ if (inhibit)
+ return;
for (f = 0; f < 2; f++)
{
@@ -664,21 +666,18 @@ shift_boundaries (filevec)
we can later determine whether the run has grown. */
runlength = i - start;
- if (! inhibit_hunk_merge)
- {
- /* Move the changed region back, so long as the
- previous unchanged line matches the last changed one.
- This merges with previous changed regions. */
+ /* Move the changed region back, so long as the
+ previous unchanged line matches the last changed one.
+ This merges with previous changed regions. */
- while (start && equivs[start - 1] == equivs[i - 1])
- {
- changed[--start] = 1;
- changed[--i] = 0;
- while (changed[start - 1])
- start--;
- while (other_changed[--j])
- continue;
- }
+ while (start && equivs[start - 1] == equivs[i - 1])
+ {
+ changed[--start] = 1;
+ changed[--i] = 0;
+ while (changed[start - 1])
+ start--;
+ while (other_changed[--j])
+ continue;
}
/* Set CORRESPONDING to the end of the changed run, at the last
@@ -686,15 +685,13 @@ shift_boundaries (filevec)
CORRESPONDING == I_END means no such point has been found. */
corresponding = other_changed[j - 1] ? i : i_end;
- /* Shift the changed region forward, so long as the
- first changed line matches the following unchanged one,
- but if INHIBIT_HUNK_MERGE is 1 do not shift if
- this would merge with another changed region.
+ /* Move the changed region forward, so long as the
+ first changed line matches the following unchanged one.
+ This merges with following changed regions.
Do this second, so that if there are no merges,
the changed region is moved forward as far as possible. */
- while (i != i_end && equivs[start] == equivs[i]
- && ! (inhibit_hunk_merge & other_changed[j + 1]))
+ while (i != i_end && equivs[start] == equivs[i])
{
changed[start++] = 0;
changed[i++] = 1;