diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2000-04-28 15:27:08 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2000-04-28 15:27:08 +0000 |
commit | 4cb454c8fb13944fc9c15af5f11d9a4e255eaeee (patch) | |
tree | 7f7431ef7cdba1a915e9dede272dda9d77cfbea3 /sys/arch/amiga/dev/ite_cl.c | |
parent | 5f3d5a3078a64652a05dcddded4d77cd7728c8bd (diff) |
Nicer ite3 console.
- sanitize the RGB swapping code,
- add limited color support, ala old vt220,
- nicer color scheme (whitish text, white bold, blue italic, red cursor...)
Diffstat (limited to 'sys/arch/amiga/dev/ite_cl.c')
-rw-r--r-- | sys/arch/amiga/dev/ite_cl.c | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/sys/arch/amiga/dev/ite_cl.c b/sys/arch/amiga/dev/ite_cl.c index bb77741be02..67588ee2135 100644 --- a/sys/arch/amiga/dev/ite_cl.c +++ b/sys/arch/amiga/dev/ite_cl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ite_cl.c,v 1.2 1996/05/02 06:44:11 niklas Exp $ */ +/* $OpenBSD: ite_cl.c,v 1.3 2000/04/28 15:27:07 espie Exp $ */ /* $NetBSD: ite_cl.c,v 1.2 1996/04/21 21:11:57 veego Exp $ */ /* @@ -161,16 +161,37 @@ cl_putc(ip, c, dy, dx, mode) unsigned char attr; unsigned char *cp; +#if 0 attr =(unsigned char) ((mode & ATTR_INV) ? (0x70) : (0x07)); if (mode & ATTR_UL) attr = 0x01; /* ???????? */ if (mode & ATTR_BOLD) attr |= 0x08; if (mode & ATTR_BLINK) attr |= 0x80; +#endif + attr = 2; + switch (mode & (ATTR_UL | ATTR_BLINK)) { + case 0: + break; + case ATTR_UL: + attr += 2; + break; + case ATTR_BLINK: + attr += 4; + break; + case ATTR_BLINK | ATTR_UL: + attr += 7; + break; + } + if (mode & ATTR_BOLD) + attr++; + + if (mode & ATTR_INV) + attr <<= 4; cp = fb + ((dy * ip->cols) + dx); SetTextPlane(ba,0x00); *cp = (unsigned char) c; SetTextPlane(ba,0x01); - *cp = (unsigned char) attr; + *cp = attr; } void |