summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Weingartner <weingart@cvs.openbsd.org>1998-11-16 23:47:58 +0000
committerTobias Weingartner <weingart@cvs.openbsd.org>1998-11-16 23:47:58 +0000
commita30badf55fb6881746d73b6a9753007de1b15a18 (patch)
tree97d3caa9cac598d78dc45994f59daea0734656c0
parent5a8bc4e9a01109d2fa395409781023683c23adc8 (diff)
Fix attribute handling. From
John Wright <juggler@oaktree.co.uk>
-rw-r--r--sys/arch/i386/isa/pcvt/pcvt_vtf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/i386/isa/pcvt/pcvt_vtf.c b/sys/arch/i386/isa/pcvt/pcvt_vtf.c
index bf2b37d2c49..b47e9c97a20 100644
--- a/sys/arch/i386/isa/pcvt/pcvt_vtf.c
+++ b/sys/arch/i386/isa/pcvt/pcvt_vtf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcvt_vtf.c,v 1.5 1997/05/30 01:43:07 mickey Exp $ */
+/* $OpenBSD: pcvt_vtf.c,v 1.6 1998/11/16 23:47:57 weingart Exp $ */
/*
* Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch.
@@ -141,6 +141,8 @@ vt_sgr(struct video_state *svsp)
u_short setcolor = 0;
char colortouched = 0;
+ setcolor = svsp->c_attr;
+
do
{
switch(svsp->parms[i++])
@@ -192,6 +194,7 @@ vt_sgr(struct video_state *svsp)
if(color)
{
colortouched = 1;
+ setcolor &= ~(FG_MASK<<8);
setcolor |= ((fgansitopc[(svsp->parms[i-1]-30) & 7]) << 8);
}
break;
@@ -207,6 +210,7 @@ vt_sgr(struct video_state *svsp)
if(color)
{
colortouched = 1;
+ setcolor &= ~(BG_MASK<<8);
setcolor |= ((bgansitopc[(svsp->parms[i-1]-40) & 7]) << 8);
}
break;