version 1.179, 2015/04/25 15:57:48 |
version 1.180, 2015/04/29 15:59:08 |
|
|
void tty_read_callback(struct bufferevent *, void *); |
void tty_read_callback(struct bufferevent *, void *); |
void tty_error_callback(struct bufferevent *, short, void *); |
void tty_error_callback(struct bufferevent *, short, void *); |
|
|
|
void tty_set_italics(struct tty *); |
int tty_try_256(struct tty *, u_char, const char *); |
int tty_try_256(struct tty *, u_char, const char *); |
|
|
void tty_colours(struct tty *, const struct grid_cell *); |
void tty_colours(struct tty *, const struct grid_cell *); |
|
|
} |
} |
|
|
void |
void |
|
tty_set_italics(struct tty *tty) |
|
{ |
|
const char *s; |
|
|
|
if (tty_term_has(tty->term, TTYC_SITM)) { |
|
s = options_get_string(&global_options, "default-terminal"); |
|
if (strcmp(s, "screen") != 0 && strncmp(s, "screen-", 7) != 0) { |
|
tty_putcode(tty, TTYC_SITM); |
|
return; |
|
} |
|
} |
|
tty_putcode(tty, TTYC_SMSO); |
|
} |
|
|
|
void |
tty_set_title(struct tty *tty, const char *title) |
tty_set_title(struct tty *tty, const char *title) |
{ |
{ |
if (!tty_term_has(tty->term, TTYC_TSL) || |
if (!tty_term_has(tty->term, TTYC_TSL) || |
|
|
tty_putcode(tty, TTYC_BOLD); |
tty_putcode(tty, TTYC_BOLD); |
if (changed & GRID_ATTR_DIM) |
if (changed & GRID_ATTR_DIM) |
tty_putcode(tty, TTYC_DIM); |
tty_putcode(tty, TTYC_DIM); |
if (changed & GRID_ATTR_ITALICS) { |
if (changed & GRID_ATTR_ITALICS) |
if (tty_term_has(tty->term, TTYC_SITM)) |
tty_set_italics(tty); |
tty_putcode(tty, TTYC_SITM); |
|
else |
|
tty_putcode(tty, TTYC_SMSO); |
|
} |
|
if (changed & GRID_ATTR_UNDERSCORE) |
if (changed & GRID_ATTR_UNDERSCORE) |
tty_putcode(tty, TTYC_SMUL); |
tty_putcode(tty, TTYC_SMUL); |
if (changed & GRID_ATTR_BLINK) |
if (changed & GRID_ATTR_BLINK) |