aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coreutils/diff.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/coreutils/diff.c b/coreutils/diff.c
index b39a301b9..830c15ea6 100644
--- a/coreutils/diff.c
+++ b/coreutils/diff.c
@@ -748,6 +748,23 @@ static void dump_unified_vec(FILE * f1, FILE * f2)
748 ch = 'c'; 748 ch = 'c';
749 else 749 else
750 ch = (a <= b) ? 'd' : 'a'; 750 ch = (a <= b) ? 'd' : 'a';
751#if 0
752 switch (ch) {
753 case 'c':
754 fetch(ixold, lowa, a - 1, f1, ' ');
755 fetch(ixold, a, b, f1, '-');
756 fetch(ixnew, c, d, f2, '+');
757 break;
758 case 'd':
759 fetch(ixold, lowa, a - 1, f1, ' ');
760 fetch(ixold, a, b, f1, '-');
761 break;
762 case 'a':
763 fetch(ixnew, lowc, c - 1, f2, ' ');
764 fetch(ixnew, c, d, f2, '+');
765 break;
766 }
767#else
751 if (ch == 'c' || ch == 'd') { 768 if (ch == 'c' || ch == 'd') {
752 fetch(ixold, lowa, a - 1, f1, ' '); 769 fetch(ixold, lowa, a - 1, f1, ' ');
753 fetch(ixold, a, b, f1, '-'); 770 fetch(ixold, a, b, f1, '-');
@@ -756,6 +773,7 @@ static void dump_unified_vec(FILE * f1, FILE * f2)
756 fetch(ixnew, lowc, c - 1, f2, ' '); 773 fetch(ixnew, lowc, c - 1, f2, ' ');
757 if (ch == 'c' || ch == 'a') 774 if (ch == 'c' || ch == 'a')
758 fetch(ixnew, c, d, f2, '+'); 775 fetch(ixnew, c, d, f2, '+');
776#endif
759 lowa = b + 1; 777 lowa = b + 1;
760 lowc = d + 1; 778 lowc = d + 1;
761 } 779 }