=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/cvs/diff.c,v retrieving revision 1.82 retrieving revision 1.83 diff -c -r1.82 -r1.83 *** src/usr.bin/cvs/diff.c 2006/03/24 13:34:27 1.82 --- src/usr.bin/cvs/diff.c 2006/03/25 21:29:59 1.83 *************** *** 1,4 **** ! /* $OpenBSD: diff.c,v 1.82 2006/03/24 13:34:27 ray Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. * All rights reserved. --- 1,4 ---- ! /* $OpenBSD: diff.c,v 1.83 2006/03/25 21:29:59 ray Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. * All rights reserved. *************** *** 172,178 **** static int cvs_diff_cleanup(void); #endif ! static void output(const char *, FILE *, const char *, FILE *); static void check(FILE *, FILE *); static void range(int, int, char *); static void uni_range(int, int); --- 172,178 ---- static int cvs_diff_cleanup(void); #endif ! static void output(FILE *, FILE *); static void check(FILE *, FILE *); static void range(int, int, char *); static void uni_range(int, int); *************** *** 183,190 **** static void equiv(struct line *, int, struct line *, int, int *); static void unravel(int); static void unsort(struct line *, int, int *); ! static void change(const char *, FILE *, const char *, FILE *, int, ! int, int, int); static void sort(struct line *, int); static int ignoreline(char *); static int asciifile(FILE *); --- 183,189 ---- static void equiv(struct line *, int, struct line *, int, int *); static void unravel(int); static void unsort(struct line *, int, int *); ! static void change(FILE *, FILE *, int, int, int, int); static void sort(struct line *, int); static int ignoreline(char *); static int asciifile(FILE *); *************** *** 745,751 **** tmp = xrealloc(ixnew, (diff_len[1] + 2) * sizeof(long)); ixnew = (long *)tmp; check(f1, f2); ! output(file1, f1, file2, f2); closem: if (anychange == 1) { --- 744,750 ---- tmp = xrealloc(ixnew, (diff_len[1] + 2) * sizeof(long)); ixnew = (long *)tmp; check(f1, f2); ! output(f1, f2); closem: if (anychange == 1) { *************** *** 966,974 **** return (k + 1); i = 0; j = k + 1; ! while (1) { ! l = i + j; ! if ((l >>= 1) <= i) break; t = clist[c[l]].y; if (t > y) --- 965,973 ---- return (k + 1); i = 0; j = k + 1; ! for (;;) { ! l = (i + j) / 2; ! if (l <= i) break; t = clist[c[l]].y; if (t > y) *************** *** 1155,1161 **** } static void ! output(const char *file1, FILE *f1, const char *file2, FILE *f2) { int m, i0, i1, j0, j1; --- 1154,1160 ---- } static void ! output(FILE *f1, FILE *f2) { int m, i0, i1, j0, j1; *************** *** 1173,1182 **** i1++; j1 = J[i1 + 1] - 1; J[i1] = j1; ! change(file1, f1, file2, f2, i0, i1, j0, j1); } if (m == 0) ! change(file1, f1, file2, f2, 1, 0, 1, diff_len[1]); if (diff_format == D_IFDEF) { for (;;) { #define c i0 --- 1172,1181 ---- i1++; j1 = J[i1 + 1] - 1; J[i1] = j1; ! change(f1, f2, i0, i1, j0, j1); } if (m == 0) ! change(f1, f2, 1, 0, 1, diff_len[1]); if (diff_format == D_IFDEF) { for (;;) { #define c i0 *************** *** 1246,1253 **** * lines missing from the to file. */ static void ! change(const char *file1, FILE *f1, const char *file2, FILE *f2, ! int a, int b, int c, int d) { static size_t max_context = 64; int i; --- 1245,1251 ---- * lines missing from the to file. */ static void ! change(FILE *f1, FILE *f2, int a, int b, int c, int d) { static size_t max_context = 64; int i;