summaryrefslogtreecommitdiffstats
path: root/sys
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
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')
-rw-r--r--sys/i386/isa/pcvt/pcvt_hdr.h10
-rw-r--r--sys/i386/isa/pcvt/pcvt_out.c28
-rw-r--r--sys/i386/isa/pcvt/pcvt_vtf.c8
3 files changed, 23 insertions, 23 deletions
diff --git a/sys/i386/isa/pcvt/pcvt_hdr.h b/sys/i386/isa/pcvt/pcvt_hdr.h
index 75dd2c4..951c9fd 100644
--- a/sys/i386/isa/pcvt/pcvt_hdr.h
+++ b/sys/i386/isa/pcvt/pcvt_hdr.h
@@ -826,8 +826,8 @@ typedef struct video_state {
u_short *sc_G1; /* save G1 ptr */
u_short *sc_G2; /* save G2 ptr */
u_short *sc_G3; /* save G3 ptr */
- u_short *sc_GL; /* save GL ptr */
- u_short *sc_GR; /* save GR ptr */
+ u_short **sc_GL; /* save GL ptr */
+ u_short **sc_GR; /* save GR ptr */
u_char sc_sel; /* selective erase state */
u_char ufkl[8][17]; /* user fkey-labels */
u_char sfkl[8][17]; /* system fkey-labels */
@@ -867,8 +867,8 @@ typedef struct video_state {
struct sixels sixel; /* structure for storing char sixels */
u_char selchar; /* true = selective attribute on */
u_int decsca[MAXDECSCA]; /* Select Character Attrib bit array */
- u_short *GL; /* ptr to current GL conversion table*/
- u_short *GR; /* ptr to current GR conversion table*/
+ u_short **GL; /* ptr to current GL conversion table*/
+ u_short **GR; /* ptr to current GR conversion table*/
u_short *G0; /* ptr to current G0 conversion table*/
u_short *G1; /* ptr to current G1 conversion table*/
u_char force24; /* force 24 lines in DEC 25 and HP 28*/
@@ -878,7 +878,7 @@ typedef struct video_state {
u_char which[DSCS_LENGTH+1]; /* which set to designate */
u_char whichi; /* index into which .. */
u_char ss; /* flag, single shift G2 / G3 -> GL */
- u_short *Gs; /* ptr to cur. G2/G3 conversion table*/
+ u_short **Gs; /* ptr to cur. G2/G3 conversion table*/
u_char udkbuf[MAXUDKDEF]; /* buffer for user defined keys */
struct udkentry ukt; /* index & length for each udk */
u_char udkff; /* index into buffer first free entry*/
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*/
diff --git a/sys/i386/isa/pcvt/pcvt_vtf.c b/sys/i386/isa/pcvt/pcvt_vtf.c
index 1b51eb4..23ea49e 100644
--- a/sys/i386/isa/pcvt/pcvt_vtf.c
+++ b/sys/i386/isa/pcvt/pcvt_vtf.c
@@ -491,8 +491,8 @@ vt_str(struct video_state *svsp)
svsp->G1 = cse_ascii; /* G1 = ascii */
svsp->G2 = cse_supplemental; /* G2 = supplemental */
svsp->G3 = cse_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 */
}
else
{
@@ -500,8 +500,8 @@ vt_str(struct video_state *svsp)
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->vtsgr = VT_NORMAL; /* no attributes */
OpenPOWER on IntegriCloud