Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/lib/libc/gen Pull up revision 1.14 (requested by wennma...
details: https://anonhg.NetBSD.org/src/rev/33db09d4fc6b
branches: netbsd-1-4
changeset: 469720:33db09d4fc6b
user: he <he%NetBSD.org@localhost>
date: Sat Nov 20 17:35:33 1999 +0000
description:
Pull up revision 1.14 (requested by wennmach):
Add some casts to u_char to get vis working again for characters
> 0177 in VIS_OCTAL mode. Also, change the mask for the most
significant tribble to 03. Fixes PR#8802.
diffstat:
lib/libc/gen/vis.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (29 lines):
diff -r ad76d81c704c -r 33db09d4fc6b lib/libc/gen/vis.c
--- a/lib/libc/gen/vis.c Sat Nov 20 17:32:38 1999 +0000
+++ b/lib/libc/gen/vis.c Sat Nov 20 17:35:33 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vis.c,v 1.11 1998/11/13 15:49:29 christos Exp $ */
+/* $NetBSD: vis.c,v 1.11.2.1 1999/11/20 17:35:33 he Exp $ */
/*-
* Copyright (c) 1989, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)vis.c 8.1 (Berkeley) 7/19/93";
#else
-__RCSID("$NetBSD: vis.c,v 1.11 1998/11/13 15:49:29 christos Exp $");
+__RCSID("$NetBSD: vis.c,v 1.11.2.1 1999/11/20 17:35:33 he Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -127,8 +127,8 @@
}
if (((c & 0177) == ' ') || (flag & VIS_OCTAL)) {
*dst++ = '\\';
- *dst++ = ((((u_int32_t)c) >> 6) & 07) + '0';
- *dst++ = ((((u_int32_t)c) >> 3) & 07) + '0';
+ *dst++ = (u_char)((((u_int32_t)(u_char)c) >> 6) & 03) + '0';
+ *dst++ = (u_char)((((u_int32_t)(u_char)c) >> 3) & 07) + '0';
*dst++ = (((u_char)c) & 07) + '0';
goto done;
}
Home |
Main Index |
Thread Index |
Old Index