diff options
author | ed <ed@FreeBSD.org> | 2009-09-03 16:31:11 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-09-03 16:31:11 +0000 |
commit | d8165e001962c64b9b665cb5bc9e20184cdb5fa0 (patch) | |
tree | a9087c764d89b371208982c932f94c66e4e73f2f /sys/teken/teken.c | |
parent | dab6d9f06b219684a564ae73f7601422d5135ebd (diff) | |
download | FreeBSD-src-d8165e001962c64b9b665cb5bc9e20184cdb5fa0.zip FreeBSD-src-d8165e001962c64b9b665cb5bc9e20184cdb5fa0.tar.gz |
Expose the TF_REVERSE flag to the console driver.
Right now libteken processes TF_REVERSE internally and returns the
toggled colors to the console driver. This isn't entirely correct. This
means that the bold flag is always processed by the foreground color,
while reversing should be done after the foreground color has been set
to a brighter version by the bold flag.
This is no problem with the syscons driver, because with VGA it only
supports 16 foreground and 8 background colors. My WIP console driver
reconfigures the graphics hardware to disable the blink functionality
and uses 16 foreground and 16 background colors. This means that this
driver will handle the TF_REVERSE flag a little different from what
syscons does right now.
Diffstat (limited to 'sys/teken/teken.c')
-rw-r--r-- | sys/teken/teken.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/sys/teken/teken.c b/sys/teken/teken.c index 5a16f8d..58f4f37 100644 --- a/sys/teken/teken.c +++ b/sys/teken/teken.c @@ -70,9 +70,6 @@ static FILE *df; #define teken_scs_switch(t, g) #endif /* TEKEN_XTERM && TEKEN_UTF8 */ -/* Private flags for teken_format_t. */ -#define TF_REVERSE 0x08 - /* Private flags for t_stateflags. */ #define TS_FIRSTDIGIT 0x01 /* First numeric digit in escape sequence. */ #define TS_INSERT 0x02 /* Insert mode. */ @@ -114,19 +111,10 @@ static inline void teken_funcs_putchar(teken_t *t, const teken_pos_t *p, teken_char_t c, const teken_attr_t *a) { - teken_attr_t ta; teken_assert(p->tp_row < t->t_winsize.tp_row); teken_assert(p->tp_col < t->t_winsize.tp_col); - /* Apply inversion. */ - if (a->ta_format & TF_REVERSE) { - ta.ta_format = a->ta_format; - ta.ta_fgcolor = a->ta_bgcolor; - ta.ta_bgcolor = a->ta_fgcolor; - a = &ta; - } - t->t_funcs->tf_putchar(t->t_softc, p, c, a); } @@ -134,21 +122,12 @@ static inline void teken_funcs_fill(teken_t *t, const teken_rect_t *r, const teken_char_t c, const teken_attr_t *a) { - teken_attr_t ta; teken_assert(r->tr_end.tp_row > r->tr_begin.tp_row); teken_assert(r->tr_end.tp_row <= t->t_winsize.tp_row); teken_assert(r->tr_end.tp_col > r->tr_begin.tp_col); teken_assert(r->tr_end.tp_col <= t->t_winsize.tp_col); - /* Apply inversion. */ - if (a->ta_format & TF_REVERSE) { - ta.ta_format = a->ta_format; - ta.ta_fgcolor = a->ta_bgcolor; - ta.ta_bgcolor = a->ta_fgcolor; - a = &ta; - } - t->t_funcs->tf_fill(t->t_softc, r, c, a); } |