summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/pcvt/pcvt_out.c
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1997-03-07 08:56:00 +0000
committerjoerg <joerg@FreeBSD.org>1997-03-07 08:56:00 +0000
commitdafbb728f2f9df8e94dc6bdab0dd581257ee62dc (patch)
tree69355c853f7e70350db9e39e90c0737cbeae3056 /sys/i386/isa/pcvt/pcvt_out.c
parentc8c614fad580e894985072410cb8cc3ffbd67c5c (diff)
downloadFreeBSD-src-dafbb728f2f9df8e94dc6bdab0dd581257ee62dc.zip
FreeBSD-src-dafbb728f2f9df8e94dc6bdab0dd581257ee62dc.tar.gz
Fix a bogon in pcvt that caused a characterset designation to not take
effect immediately, but required a following (normally redundant) G0 into GL mapping. This adds one layer of indirection (thus might make it slower), but fixes the broken box character drawing in pcvt. Hellmuth and Bruce are unfortunately too busy too review this right now, but i wanna have it in 2.2 since it has often been asked in the past.
Diffstat (limited to 'sys/i386/isa/pcvt/pcvt_out.c')
-rw-r--r--sys/i386/isa/pcvt/pcvt_out.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/sys/i386/isa/pcvt/pcvt_out.c b/sys/i386/isa/pcvt/pcvt_out.c
index e3a62d0..85de05f 100644
--- a/sys/i386/isa/pcvt/pcvt_out.c
+++ b/sys/i386/isa/pcvt/pcvt_out.c
@@ -94,11 +94,11 @@ u_short attrib, ch; /* XXX inefficient interface */
{
if(!svsp->ss) /* single shift G2/G3 -> GL ? */
{
- *video = attrib | svsp->GL[ch-0x20];
+ *video = attrib | (*svsp->GL)[ch-0x20];
}
else
{
- *video = attrib | svsp->Gs[ch-0x20];
+ *video = attrib | (*svsp->Gs)[ch-0x20];
svsp->ss = 0;
}
}
@@ -110,7 +110,7 @@ u_short attrib, ch; /* XXX inefficient interface */
{
if(ch >= 0xA0) /* use GR if ch >= 0xA0 */
{
- *video = attrib | svsp->GR[ch-0xA0];
+ *video = attrib | (*svsp->GR)[ch-0xA0];
}
else
{
@@ -284,11 +284,11 @@ sput (u_char *s, U_char kernel, int len, int page)
break;
case 0x0e: /* SO */
- svsp->GL = svsp->G1;
+ svsp->GL = &svsp->G1;
break;
case 0x0f: /* SI */
- svsp->GL = svsp->G0;
+ svsp->GL = &svsp->G0;
break;
case 0x10: /* DLE */
@@ -469,13 +469,13 @@ sput (u_char *s, U_char kernel, int len, int page)
break;
case 'N': /* SINGLE SHIFT G2 */
- svsp->Gs = svsp->G2;
+ svsp->Gs = &svsp->G2;
svsp->ss = 1;
svsp->state = STATE_INIT;
break;
case 'O': /* SINGLE SHIFT G3 */
- svsp->Gs = svsp->G3;
+ svsp->Gs = &svsp->G3;
svsp->ss = 1;
svsp->state = STATE_INIT;
break;
@@ -524,27 +524,27 @@ sput (u_char *s, U_char kernel, int len, int page)
break;
#endif /* PCVT_SETCOLOR */
case 'n': /* Lock Shift G2 -> GL */
- svsp->GL = svsp->G2;
+ svsp->GL = &svsp->G2;
svsp->state = STATE_INIT;
break;
case 'o': /* Lock Shift G3 -> GL */
- svsp->GL = svsp->G3;
+ svsp->GL = &svsp->G3;
svsp->state = STATE_INIT;
break;
case '}': /* Lock Shift G2 -> GR */
- svsp->GR = svsp->G2;
+ svsp->GR = &svsp->G2;
svsp->state = STATE_INIT;
break;
case '|': /* Lock Shift G3 -> GR */
- svsp->GR = svsp->G3;
+ svsp->GR = &svsp->G3;
svsp->state = STATE_INIT;
break;
case '~': /* Lock Shift G1 -> GR */
- svsp->GR = svsp->G1;
+ svsp->GR = &svsp->G1;
svsp->state = STATE_INIT;
break;
@@ -1082,8 +1082,8 @@ vt_coldinit(void)
svsp->G1 = csd_ascii; /* G1 = ascii */
svsp->G2 = csd_supplemental; /* G2 = supplemental */
svsp->G3 = csd_supplemental; /* G3 = supplemental */
- svsp->GL = svsp->G0; /* GL = G0 */
- svsp->GR = svsp->G2; /* GR = G2 */
+ svsp->GL = &svsp->G0; /* GL = G0 */
+ svsp->GR = &svsp->G2; /* GR = G2 */
svsp->whichi = 0; /* char set designate init */
svsp->which[0] = '\0'; /* char set designate init */
svsp->hp_state = SHP_INIT; /* init HP mode state machine*/
OpenPOWER on IntegriCloud