Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src/lib/libcurses Pull up following revision(s) (requested by...
details: https://anonhg.NetBSD.org/src/rev/f161792e6f06
branches: netbsd-6
changeset: 775785:f161792e6f06
user: riz <riz%NetBSD.org@localhost>
date: Sat May 11 21:48:23 2013 +0000
description:
Pull up following revision(s) (requested by jdc in ticket #885):
lib/libcurses/setterm.c: revision 1.50
Extend does_ctrl_o() to compare exit attribute and ext ACS sequences.
diffstat:
lib/libcurses/setterm.c | 25 ++++++++++++++-----------
1 files changed, 14 insertions(+), 11 deletions(-)
diffs (67 lines):
diff -r 29610683d456 -r f161792e6f06 lib/libcurses/setterm.c
--- a/lib/libcurses/setterm.c Sat May 11 21:46:26 2013 +0000
+++ b/lib/libcurses/setterm.c Sat May 11 21:48:23 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: setterm.c,v 1.48 2011/10/04 11:01:14 roy Exp $ */
+/* $NetBSD: setterm.c,v 1.48.4.1 2013/05/11 21:48:23 riz Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)setterm.c 8.8 (Berkeley) 10/25/94";
#else
-__RCSID("$NetBSD: setterm.c,v 1.48 2011/10/04 11:01:14 roy Exp $");
+__RCSID("$NetBSD: setterm.c,v 1.48.4.1 2013/05/11 21:48:23 riz Exp $");
#endif
#endif /* not lint */
@@ -49,7 +49,7 @@
#include "curses_private.h"
static int does_esc_m(const char *cap);
-static int does_ctrl_o(const char *cap);
+static int does_ctrl_o(const char *exit_cap, const char *acs_cap);
attr_t __mask_op, __mask_me, __mask_ue, __mask_se;
@@ -172,7 +172,8 @@
* It might turn off ACS, so check for that.
*/
if (t_exit_attribute_mode(screen->term) != NULL &&
- does_ctrl_o(t_exit_attribute_mode(screen->term)))
+ does_ctrl_o(t_exit_attribute_mode(screen->term),
+ t_exit_alt_charset_mode(screen->term)))
screen->mask_me = 0;
else
screen->mask_me = __ALTCHARSET;
@@ -330,20 +331,22 @@
/*
* does_ctrl_o --
* A hack for vt100/xterm-like terminals where the "me" capability also
- * unsets acs (i.e. it contains the character '\017').
+ * unsets acs.
*/
static int
-does_ctrl_o(const char *cap)
+does_ctrl_o(const char *exit_cap, const char *acs_cap)
{
- const char *capptr = cap;
+ const char *eptr = exit_cap, *aptr = acs_cap;
+ int l;
#ifdef DEBUG
- __CTRACE(__CTRACE_INIT, "does_ctrl_o: Looping on %s\n", capptr);
+ __CTRACE(__CTRACE_INIT, "does_ctrl_o: Testing %s for %s\n", eptr, aptr);
#endif
- while (*capptr != 0) {
- if (*capptr == '\x0f')
+ l = strlen(acs_cap);
+ while (*eptr != 0) {
+ if (!strncmp(eptr, aptr, l))
return 1;
- capptr++;
+ eptr++;
}
return 0;
}
Home |
Main Index |
Thread Index |
Old Index