summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-07-01 16:16:54 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-07-01 16:16:54 +0000
commitc99ad52fe56b363de0e32e7f46c4c91f1a4ddba0 (patch)
tree3abcfb8a851111040e823cf105caa49c860bf01d
parentf337beb4f9a6858b0ab8b7af0ef6c5efd4d22747 (diff)
Make sure the color selection escape sequences use black for 0 and white for 7,
as on vt220.
-rw-r--r--sys/dev/wscons/wsemul_sun.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/sys/dev/wscons/wsemul_sun.c b/sys/dev/wscons/wsemul_sun.c
index 213c8c8c40f..6e56fbf7087 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.15 2006/06/30 21:38:19 miod Exp $ */
+/* $OpenBSD: wsemul_sun.c,v 1.16 2006/07/01 16:16:53 miod Exp $ */
/* $NetBSD: wsemul_sun.c,v 1.11 2000/01/05 11:19:36 drochner Exp $ */
/*
@@ -469,15 +469,27 @@ wsemul_sun_control(edp, c)
flags |= WSATTR_REVERSE;
break;
/* ANSI foreground color */
- case 30: case 31: case 32: case 33:
- case 34: case 35: case 36: case 37:
+ case 30:
+ fgcol = WSCOL_BLACK;
+ break;
+ case 31: case 32: case 33:
+ case 34: case 35: case 36:
fgcol = ARG(n,edp->nargs) - 30;
break;
+ case 37:
+ fgcol = WSCOL_WHITE;
+ break;
/* ANSI background color */
- case 40: case 41: case 42: case 43:
- case 44: case 45: case 46: case 47:
+ case 40:
+ bgcol = WSCOL_BLACK;
+ break;
+ case 41: case 42: case 43:
+ case 44: case 45: case 46:
bgcol = ARG(n,edp->nargs) - 40;
break;
+ case 47:
+ bgcol = WSCOL_WHITE;
+ break;
}
}
setattr: