diff options
author | Ed Schouten <ed@FreeBSD.org> | 2009-09-12 12:44:21 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2009-09-12 12:44:21 +0000 |
commit | eba77f5c40ab87e61064f134f5ecae155b6674b9 (patch) | |
tree | 10b40ef171c3256b962afcb40e7cfb809b0a0e3f /sys/teken/teken_subr_compat.h | |
parent | 5e666eb3956297c89f638b0cc0aa15e68d94da3b (diff) | |
download | src-eba77f5c40ab87e61064f134f5ecae155b6674b9.tar.gz src-eba77f5c40ab87e61064f134f5ecae155b6674b9.zip |
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.
Notes
Notes:
svn path=/head/; revision=197117
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 4e03c6676da5..c642af71770b 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) { |