From b1810d2fc0312c36b65bf26cc411473ef3e91db9 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Thu, 12 Oct 2006 09:08:39 +0000 Subject: remove nasty hack for backwards colors in default pc/linux palette (actually it's just moved to dblbuf.c for now, but this makes it easier to remove in the future when proper color palette config is implemented.) --- term.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'term.c') diff --git a/term.c b/term.c index 4f6dda6..d5acd12 100644 --- a/term.c +++ b/term.c @@ -190,9 +190,6 @@ static void csi(struct uuterm *t, unsigned c) break; case 'm': for (i=0; inparam; i++) { - static const unsigned char cmap[] = { - 0, 4, 2, 6, 1, 5, 3, 7 - }; static const unsigned short attr[] = { UU_ATTR_BOLD, UU_ATTR_DIM, 0, UU_ATTR_UL, UU_ATTR_BLINK, 0, @@ -208,10 +205,10 @@ static void csi(struct uuterm *t, unsigned c) t->attr &= ~attr[t->param[i]-21]; } else if (t->param[i]-30 < 8) { t->attr &= ~UU_ATTR_FG; - t->attr |= cmap[(t->param[i] - 30)]; + t->attr |= t->param[i] - 30; } else if (t->param[i]-40 < 8) { t->attr &= ~UU_ATTR_BG; - t->attr |= cmap[(t->param[i] - 40)] << 4; + t->attr |= t->param[i] - 40 << 4; } } break; -- cgit v1.2.3