summaryrefslogtreecommitdiffstats
path: root/tty.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2007-11-27 23:01:27 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2007-11-27 23:01:27 +0000
commitf47ab8f13fd76cb1761c74d1384ce7695ebbea44 (patch)
tree4cff9ae5eba759659fe501468f62355e59e84b8d /tty.c
parent43c99c2fab409e41f4c970f4f9eb0079df88a78e (diff)
Don't nuke charset flag on [0m. Also rename DRAWING -> CHARSET flag.
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tty.c b/tty.c
index 71a8c616..c3e8850e 100644
--- a/tty.c
+++ b/tty.c
@@ -1,4 +1,4 @@
-/* $Id: tty.c,v 1.5 2007-11-27 21:07:38 nicm Exp $ */
+/* $Id: tty.c,v 1.6 2007-11-27 23:01:27 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -201,7 +201,7 @@ tty_puts(struct tty *tty, const char *s)
void
tty_putc(struct tty *tty, char ch)
{
- if (tty->attr & ATTR_DRAWING)
+ if (tty->attr & ATTR_CHARSET)
ch = tty_get_acs(tty, ch);
buffer_write8(tty->out, ch);
}
@@ -346,7 +346,7 @@ tty_attributes(struct tty *tty, u_char attr, u_char colr)
/* If any bits are being cleared, reset everything. */
if (tty->attr & ~attr) {
- if ((tty->attr & ATTR_DRAWING) &&
+ if ((tty->attr & ATTR_CHARSET) &&
exit_alt_charset_mode != NULL)
tty_puts(tty, exit_alt_charset_mode);
tty_puts(tty, exit_attribute_mode);
@@ -372,7 +372,7 @@ tty_attributes(struct tty *tty, u_char attr, u_char colr)
tty_puts(tty, enter_reverse_mode);
if ((attr & ATTR_HIDDEN) && enter_secure_mode != NULL)
tty_puts(tty, enter_secure_mode);
- if ((attr & ATTR_DRAWING) && enter_alt_charset_mode != NULL)
+ if ((attr & ATTR_CHARSET) && enter_alt_charset_mode != NULL)
tty_puts(tty, enter_alt_charset_mode);
fg = (colr >> 4) & 0xf;