Module Name: src
Committed By: dholland
Date: Sun Aug 11 00:11:46 UTC 2013
Modified Files:
src/usr.bin/tr: tr.c
Log Message:
Restore preexisting wrong behavior of tr -c (translates all characters
to the last letter in string2) instead of a different wrong behavior
(translates all characters to 0xff) accidentally just introduced.
To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/usr.bin/tr/tr.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/tr/tr.c
diff -u src/usr.bin/tr/tr.c:1.12 src/usr.bin/tr/tr.c:1.13
--- src/usr.bin/tr/tr.c:1.12 Sun Aug 11 00:05:49 2013
+++ src/usr.bin/tr/tr.c Sun Aug 11 00:11:46 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: tr.c,v 1.12 2013/08/11 00:05:49 dholland Exp $ */
+/* $NetBSD: tr.c,v 1.13 2013/08/11 00:11:46 dholland Exp $ */
/*
* Copyright (c) 1988, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19
#if 0
static char sccsid[] = "@(#)tr.c 8.2 (Berkeley) 5/4/95";
#endif
-__RCSID("$NetBSD: tr.c,v 1.12 2013/08/11 00:05:49 dholland Exp $");
+__RCSID("$NetBSD: tr.c,v 1.13 2013/08/11 00:11:46 dholland Exp $");
#endif /* not lint */
#include <sys/types.h>
@@ -223,7 +223,7 @@ main(int argc, char **argv)
if (cflag)
for (cnt = 0, p = string1; cnt < NCHARS; ++p, ++cnt)
- *p = *p == OOBCH ? ch : cnt;
+ *p = *p == OOBCH ? ch2 : cnt;
if (sflag)
for (lastch = OOBCH; (ch = getchar()) != EOF;) {