diff options
author | ed <ed@FreeBSD.org> | 2009-09-12 12:44:21 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-09-12 12:44:21 +0000 |
commit | 6047d14a18b1b4e8084fe0b353740ae91abd3fe7 (patch) | |
tree | 10b40ef171c3256b962afcb40e7cfb809b0a0e3f /sys/teken/teken_subr_compat.h | |
parent | e0831cf5d0a0f960d8518c8d799dada4d6c332ae (diff) | |
download | FreeBSD-src-6047d14a18b1b4e8084fe0b353740ae91abd3fe7.zip FreeBSD-src-6047d14a18b1b4e8084fe0b353740ae91abd3fe7.tar.gz |
Commit all local modifications I have to libteken:
- Make xterm/cons25 support runtime configurable. This allows me to
share libteken between syscons and my new vt driver.
- Add a fix to print blanks after printing a double width character to
prevent rendering artifacts.
- Add some more utility functions that I use in the vt driver.
Diffstat (limited to 'sys/teken/teken_subr_compat.h')
-rw-r--r-- | sys/teken/teken_subr_compat.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/teken/teken_subr_compat.h b/sys/teken/teken_subr_compat.h index 4e03c66..c642af7 100644 --- a/sys/teken/teken_subr_compat.h +++ b/sys/teken/teken_subr_compat.h @@ -59,6 +59,18 @@ teken_subr_cons25_set_adapter_foreground(teken_t *t, unsigned int c) } } +static const teken_color_t cons25_revcolors[8] = { 0, 4, 2, 6, 1, 5, 3, 7 }; + +void +teken_get_defattr_cons25(teken_t *t, int *fg, int *bg) +{ + + *fg = cons25_revcolors[t->t_defattr.ta_fgcolor]; + if (t->t_defattr.ta_format & TF_BOLD) + *fg += 8; + *bg = cons25_revcolors[t->t_defattr.ta_bgcolor]; +} + static void teken_subr_cons25_switch_virtual_terminal(teken_t *t, unsigned int vt) { |