diff options
Diffstat (limited to 'usr.bin/cvs/diff3.c')
-rw-r--r-- | usr.bin/cvs/diff3.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/cvs/diff3.c b/usr.bin/cvs/diff3.c index 742cd2ccc3e..3f05e815907 100644 --- a/usr.bin/cvs/diff3.c +++ b/usr.bin/cvs/diff3.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diff3.c,v 1.37 2007/06/28 21:38:09 xsa Exp $ */ +/* $OpenBSD: diff3.c,v 1.38 2007/09/10 14:29:53 tobias Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. @@ -72,12 +72,13 @@ static const char copyright[] = #ifndef lint static const char rcsid[] = - "$OpenBSD: diff3.c,v 1.37 2007/06/28 21:38:09 xsa Exp $"; + "$OpenBSD: diff3.c,v 1.38 2007/09/10 14:29:53 tobias Exp $"; #endif /* not lint */ #include <ctype.h> #include <errno.h> #include <fcntl.h> +#include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> @@ -729,7 +730,7 @@ repos(int nchar) int i; for (i = 0; i < 2; i++) - (void)fseek(fp[i], (long)-nchar, 1); + (void)fseek(fp[i], (long)-nchar, SEEK_CUR); } /* @@ -763,7 +764,7 @@ edscript(int n) prange(&de[n].old); else diff_output("%da\n=======\n", de[n].old.to -1); - (void)fseek(fp[2], (long)de[n].new.from, 0); + (void)fseek(fp[2], (long)de[n].new.from, SEEK_SET); for (k = de[n].new.to-de[n].new.from; k > 0; k-= j) { j = k > BUFSIZ ? BUFSIZ : k; if (fread(block, (size_t)1, (size_t)j, |