diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-12-02 11:25:10 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-12-02 11:25:10 +0000 |
commit | 5f7a51d9481bd1d438c6cefef01cde898e1e9cae (patch) | |
tree | e991a9c9d8596d7eba86952555d11f6c03481632 /sys/dev/wscons | |
parent | c7a7963da6902fde50c09b326f851dca9b7b5bb9 (diff) |
Fix ri_devcmap[] to allow WSCOL_BLACK and WSCOL_WHITE to not have to be
different for sparc{,64} systems.
Diffstat (limited to 'sys/dev/wscons')
-rw-r--r-- | sys/dev/wscons/wsdisplayvar.h | 10 | ||||
-rw-r--r-- | sys/dev/wscons/wsemul_sun.c | 22 |
2 files changed, 7 insertions, 25 deletions
diff --git a/sys/dev/wscons/wsdisplayvar.h b/sys/dev/wscons/wsdisplayvar.h index 15138079c99..3ca65a69866 100644 --- a/sys/dev/wscons/wsdisplayvar.h +++ b/sys/dev/wscons/wsdisplayvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: wsdisplayvar.h,v 1.21 2006/11/29 19:11:17 miod Exp $ */ +/* $OpenBSD: wsdisplayvar.h,v 1.22 2006/12/02 11:25:09 miod Exp $ */ /* $NetBSD: wsdisplayvar.h,v 1.30 2005/02/04 02:10:49 perry Exp $ */ /* @@ -64,20 +64,14 @@ struct wsdisplay_emulops { int (*alloc_attr)(void *c, int fg, int bg, int flags, long *attrp); void (*unpack_attr)(void *c, long attr, int *fg, int *bg, int *ul); /* fg / bg values. Made identical to ANSI terminal color codes. */ -/* XXX should be #if NWSEMUL_SUN > 1 */ -#if defined(__sparc__) || defined(__sparc64__) -#define WSCOL_WHITE 0 -#define WSCOL_BLACK 15 -#else #define WSCOL_BLACK 0 -#define WSCOL_WHITE 7 -#endif #define WSCOL_RED 1 #define WSCOL_GREEN 2 #define WSCOL_BROWN 3 #define WSCOL_BLUE 4 #define WSCOL_MAGENTA 5 #define WSCOL_CYAN 6 +#define WSCOL_WHITE 7 /* flag values: */ #define WSATTR_REVERSE 1 #define WSATTR_HILIT 2 diff --git a/sys/dev/wscons/wsemul_sun.c b/sys/dev/wscons/wsemul_sun.c index 944e934dae6..633b67456c6 100644 --- a/sys/dev/wscons/wsemul_sun.c +++ b/sys/dev/wscons/wsemul_sun.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wsemul_sun.c,v 1.17 2006/08/17 06:27:04 miod Exp $ */ +/* $OpenBSD: wsemul_sun.c,v 1.18 2006/12/02 11:25:09 miod Exp $ */ /* $NetBSD: wsemul_sun.c,v 1.11 2000/01/05 11:19:36 drochner Exp $ */ /* @@ -471,27 +471,15 @@ wsemul_sun_control(edp, c) flags |= WSATTR_REVERSE; break; /* ANSI foreground color */ - case 30: - fgcol = WSCOL_BLACK; - break; - case 31: case 32: case 33: - case 34: case 35: case 36: + case 30: case 31: case 32: case 33: + case 34: case 35: case 36: case 37: fgcol = ARG(n,edp->nargs) - 30; break; - case 37: - fgcol = WSCOL_WHITE; - break; /* ANSI background color */ - case 40: - bgcol = WSCOL_BLACK; - break; - case 41: case 42: case 43: - case 44: case 45: case 46: + case 40: case 41: case 42: case 43: + case 44: case 45: case 46: case 47: bgcol = ARG(n,edp->nargs) - 40; break; - case 47: - bgcol = WSCOL_WHITE; - break; } } setattr: |