Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mira.net.au!news.netspace.net.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!feed1.news.erols.com!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!europa.clark.net!news.maxwell.syr.edu!news.mathworks.com!fu-berlin.de!irz401!orion.sax.de!uriah.heep!news
From: j@uriah.heep.sax.de (J Wunsch)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: VT220 console
Date: 23 Feb 1997 00:06:09 GMT
Organization: Private BSD site, Dresden
Lines: 190
Message-ID: <5eo1lh$9p@uriah.heep.sax.de>
References: <3302AA50.2781E494@sh.cvut.cz> <5eo0i2$tp@uriah.heep.sax.de>
Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
NNTP-Posting-Host: localhost.heep.sax.de
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Newsreader: knews 0.9.6
X-Phone: +49-351-2012 669
X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E
Xref: euryale.cc.adfa.oz.au comp.unix.bsd.freebsd.misc:36035
I wrote:
> Ah, no, i see pcvt's fault now. G0 is mapped into GL by default.
> Thus, calling \E(0 should be sufficient to designate the DEC special
> graphics character set as G0, which is already mapped. (\E(8
> designates the ASCII set again.)
>
> Alas, the problem doesn't seem to be very trivial.
Try the following patch. I'll also submit it to the author of pcvt
for approval.
Index: i386/isa/pcvt/pcvt_hdr.h
===================================================================
RCS file: /home/cvs/src/sys/i386/isa/pcvt/pcvt_hdr.h,v
retrieving revision 1.21
diff -u -u -r1.21 pcvt_hdr.h
--- pcvt_hdr.h 1996/09/10 08:27:09 1.21
+++ pcvt_hdr.h 1997/02/22 23:55:29
@@ -821,8 +821,8 @@
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 */
@@ -862,8 +862,8 @@
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*/
@@ -873,7 +873,7 @@
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*/
Index: i386/isa/pcvt/pcvt_out.c
===================================================================
RCS file: /home/cvs/src/sys/i386/isa/pcvt/pcvt_out.c,v
retrieving revision 1.14
diff -u -u -r1.14 pcvt_out.c
--- pcvt_out.c 1996/11/02 23:28:06 1.14
+++ pcvt_out.c 1997/02/22 23:56:43
@@ -94,11 +94,11 @@
{
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 @@
{
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 @@
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 @@
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 @@
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 @@
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*/
Index: i386/isa/pcvt/pcvt_vtf.c
===================================================================
RCS file: /home/cvs/src/sys/i386/isa/pcvt/pcvt_vtf.c,v
retrieving revision 1.6
diff -u -u -r1.6 pcvt_vtf.c
--- pcvt_vtf.c 1996/09/10 08:27:19 1.6
+++ pcvt_vtf.c 1997/02/22 23:55:13
@@ -491,8 +491,8 @@
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 @@
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 */
--
cheers, J"org
joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)