version 1.49, 2012/04/21 12:27:28 |
version 1.50, 2013/05/05 14:24:05 |
Line 49 __RCSID("$NetBSD$"); |
|
Line 49 __RCSID("$NetBSD$"); |
|
#include "curses_private.h" |
#include "curses_private.h" |
|
|
static int does_esc_m(const char *cap); |
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; |
attr_t __mask_op, __mask_me, __mask_ue, __mask_se; |
|
|
Line 172 _cursesi_setterm(char *type, SCREEN *scr |
|
Line 172 _cursesi_setterm(char *type, SCREEN *scr |
|
* It might turn off ACS, so check for that. |
* It might turn off ACS, so check for that. |
*/ |
*/ |
if (t_exit_attribute_mode(screen->term) != NULL && |
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; |
screen->mask_me = 0; |
else |
else |
screen->mask_me = __ALTCHARSET; |
screen->mask_me = __ALTCHARSET; |
Line 330 does_esc_m(const char *cap) |
|
Line 331 does_esc_m(const char *cap) |
|
/* |
/* |
* does_ctrl_o -- |
* does_ctrl_o -- |
* A hack for vt100/xterm-like terminals where the "me" capability also |
* 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 |
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 |
#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 |
#endif |
while (*capptr != 0) { |
l = strlen(acs_cap); |
if (*capptr == '\x0f') |
while (*eptr != 0) { |
|
if (!strncmp(eptr, aptr, l)) |
return 1; |
return 1; |
capptr++; |
eptr++; |
} |
} |
return 0; |
return 0; |
} |
} |