Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libedit don't assume locales are not working - it may no...
details: https://anonhg.NetBSD.org/src/rev/47c4ad33ddb8
branches: trunk
changeset: 477211:47c4ad33ddb8
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Fri Oct 15 17:01:19 1999 +0000
description:
don't assume locales are not working - it may not be the case
re_refresh(): cast the character passed to re_addc() to unsigned char,
so we don't end up calling isprint() with negative value
when chars are signed and character value is >= 128
diffstat:
lib/libedit/map.c | 13 +++----------
lib/libedit/refresh.c | 6 +++---
2 files changed, 6 insertions(+), 13 deletions(-)
diffs (68 lines):
diff -r 9d1c74d92d56 -r 47c4ad33ddb8 lib/libedit/map.c
--- a/lib/libedit/map.c Fri Oct 15 14:42:17 1999 +0000
+++ b/lib/libedit/map.c Fri Oct 15 17:01:19 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: map.c,v 1.9 1999/07/02 15:21:26 simonb Exp $ */
+/* $NetBSD: map.c,v 1.10 1999/10/15 17:01:19 jdolecek Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)map.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: map.c,v 1.9 1999/07/02 15:21:26 simonb Exp $");
+__RCSID("$NetBSD: map.c,v 1.10 1999/10/15 17:01:19 jdolecek Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -1028,10 +1028,7 @@
}
map_init_meta(el);
-#ifdef notyet
- if (0 /* XXX: USER has set LC_CTYPE */)
- map_init_nls(el);
-#endif
+ map_init_nls(el);
tty_bind_char(el, 1);
term_bind_arrow(el);
@@ -1061,10 +1058,6 @@
}
map_init_meta(el);
-#ifdef notyet
- if (0 /* XXX: USER has set LC_CTYPE */)
- map_init_nls(el);
-#endif
map_init_nls(el);
buf[0] = CONTROL('X');
diff -r 9d1c74d92d56 -r 47c4ad33ddb8 lib/libedit/refresh.c
--- a/lib/libedit/refresh.c Fri Oct 15 14:42:17 1999 +0000
+++ b/lib/libedit/refresh.c Fri Oct 15 17:01:19 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: refresh.c,v 1.8 1999/07/02 15:21:26 simonb Exp $ */
+/* $NetBSD: refresh.c,v 1.9 1999/10/15 17:01:19 jdolecek Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)refresh.c 8.1 (Berkeley) 6/4/93";
#else
-__RCSID("$NetBSD: refresh.c,v 1.8 1999/07/02 15:21:26 simonb Exp $");
+__RCSID("$NetBSD: refresh.c,v 1.9 1999/10/15 17:01:19 jdolecek Exp $");
#endif
#endif /* not lint && not SCCSID */
@@ -193,7 +193,7 @@
cur.h = el->el_refresh.r_cursor.h; /* save for later */
cur.v = el->el_refresh.r_cursor.v;
}
- re_addc(el, *cp);
+ re_addc(el, (unsigned char) *cp);
}
if (cur.h == -1) { /* if I haven't been set yet, I'm at the end */
Home |
Main Index |
Thread Index |
Old Index