-/* $Cambridge: exim/test/src/cf.c,v 1.1 2006/02/06 16:24:05 ph10 Exp $ */
-
/************************************************
* PH-Compare *
************************************************/
#ifdef __STDC__
#include <string.h>
#include <stdlib.h>
+#include <stdint.h>
+#endif
+
+#ifndef intptr_t
+# define intptr_t long long int
#endif
/* ----- parameters ----- */
#define version 8
#define defaultstore 100000 /* default recovery buffer size */
#define minstore 500 /* minimum recovery buffer size */
+#define SHOWMAX 20 /* maximum number of diff lines to display */
/* ----- misc defines ----- */
if (echo)
{
rule('-', 10);
- if (-t1-s1 < 21) write_lines(rootline_one, tline_one);
- else fprintf(f_out, "... <more than 20 lines> ...\n");
+ if (-t1-s1 < SHOWMAX+1) write_lines(rootline_one, tline_one);
+ else fprintf(f_out, "... <more than %d lines> ...\n", SHOWMAX);
rule('-', 10);
- if (-t2-s2 < 21) write_lines(rootline_two, tline_two);
- else fprintf(f_out, "... <more than 20 lines> ...\n");
+ if (-t2-s2 < SHOWMAX+1) write_lines(rootline_two, tline_two);
+ else fprintf(f_out, "... <more than %d lines> ...\n", SHOWMAX);
}
}
lastline_one = nextline;
pline_one = nextline;
-bufnext_one = (char *) (((int)bufnext_one+3) & (-4));
+bufnext_one = (char *) (((intptr_t)bufnext_one+ sizeof (intptr_t) - 1) & (-(sizeof (intptr_t))));
}
lastline_two = nextline;
pline_two = nextline;
-bufnext_two = (char *) (((int)bufnext_two+3) & (-4));
+bufnext_two = (char *) (((intptr_t)bufnext_two+ sizeof (intptr_t) - 1) & (-(sizeof (intptr_t))));
}