diff options
author | Ray Lai <ray@cvs.openbsd.org> | 2009-02-25 23:16:21 +0000 |
---|---|---|
committer | Ray Lai <ray@cvs.openbsd.org> | 2009-02-25 23:16:21 +0000 |
commit | 184bf0c4485793e104c9bf4074197d14c4589a6d (patch) | |
tree | 462f08c7cc5babc436484fe630c80054d6708ba6 /usr.bin/rcs/diff3.c | |
parent | 66c5025e30b2accbce550b2b478ce012e9da04a1 (diff) |
Checking if a file is ASCII should only be done when diffing, because
the non-ASCII characters could be printed to the screen. For
checking in files, checking out files, merging files, and removing
revisions of files, we do so regardless of whether the files are
ASCII or binary.
Fixes PR6031.
OK joris and deraadt.
Diffstat (limited to 'usr.bin/rcs/diff3.c')
-rw-r--r-- | usr.bin/rcs/diff3.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/rcs/diff3.c b/usr.bin/rcs/diff3.c index a9b5300d083..ffbc73c3dc4 100644 --- a/usr.bin/rcs/diff3.c +++ b/usr.bin/rcs/diff3.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diff3.c,v 1.26 2008/03/02 19:40:58 tobias Exp $ */ +/* $OpenBSD: diff3.c,v 1.27 2009/02/25 23:16:20 ray Exp $ */ /* * Copyright (C) Caldera International Inc. 2001-2002. @@ -72,7 +72,7 @@ static const char copyright[] = #ifndef lint static const char rcsid[] = - "$OpenBSD: diff3.c,v 1.26 2008/03/02 19:40:58 tobias Exp $"; + "$OpenBSD: diff3.c,v 1.27 2009/02/25 23:16:20 ray Exp $"; #endif /* not lint */ #include <ctype.h> @@ -199,8 +199,8 @@ merge_diff3(char **av, int flags) rcs_buf_free(b2); b2 = NULL; - if ((diffreg(path1, path3, d1, 0) == D_ERROR) || - (diffreg(path2, path3, d2, 0) == D_ERROR)) { + if ((diffreg(path1, path3, d1, D_FORCEASCII) == D_ERROR) || + (diffreg(path2, path3, d2, D_FORCEASCII) == D_ERROR)) { rcs_buf_free(diffb); diffb = NULL; goto out; @@ -326,8 +326,8 @@ rcs_diff3(RCSFILE *rf, char *workfile, RCSNUM *rev1, RCSNUM *rev2, int flags) rcs_buf_free(b2); b2 = NULL; - if ((diffreg(path1, path3, d1, 0) == D_ERROR) || - (diffreg(path2, path3, d2, 0) == D_ERROR)) { + if ((diffreg(path1, path3, d1, D_FORCEASCII) == D_ERROR) || + (diffreg(path2, path3, d2, D_FORCEASCII) == D_ERROR)) { rcs_buf_free(diffb); diffb = NULL; goto out; |