Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libedit Support other non-latin1 single byte character s...
details: https://anonhg.NetBSD.org/src/rev/81551e451c5b
branches: trunk
changeset: 767082:81551e451c5b
user: christos <christos%NetBSD.org@localhost>
date: Fri Jul 08 15:54:56 2011 +0000
description:
Support other non-latin1 single byte character sets.
From: Alexander Barkov and Nirbhay Choubey at oracle dot com
diffstat:
lib/libedit/read.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diffs (31 lines):
diff -r 0b2baab93c0b -r 81551e451c5b lib/libedit/read.c
--- a/lib/libedit/read.c Fri Jul 08 09:42:16 2011 +0000
+++ b/lib/libedit/read.c Fri Jul 08 15:54:56 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: read.c,v 1.58 2011/02/18 20:53:05 christos Exp $ */
+/* $NetBSD: read.c,v 1.59 2011/07/08 15:54:56 christos Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)read.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: read.c,v 1.58 2011/02/18 20:53:05 christos Exp $");
+__RCSID("$NetBSD: read.c,v 1.59 2011/07/08 15:54:56 christos Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -352,7 +352,11 @@
}
goto again;
}
- } else /* we don't support other multibyte charsets */
+ } else if (*cbuf >= 0 || /* ASCII */
+ /* we don't support other multibyte charsets */
+ ++cbp != 1 ||
+ /* Try non-ASCII characters in a 8-bit character set */
+ (bytes = ct_mbtowc(cp, cbuf, cbp)) != 1)
#endif
*cp = (unsigned char)cbuf[0];
Home |
Main Index |
Thread Index |
Old Index