diff options
Diffstat (limited to 'misc/dt/patches/patch-ad')
-rw-r--r-- | misc/dt/patches/patch-ad | 130 |
1 files changed, 112 insertions, 18 deletions
diff --git a/misc/dt/patches/patch-ad b/misc/dt/patches/patch-ad index 1291486cf5a..41f564b5bd6 100644 --- a/misc/dt/patches/patch-ad +++ b/misc/dt/patches/patch-ad @@ -1,37 +1,131 @@ -$NetBSD: patch-ad,v 1.1 2002/02/10 22:49:55 fredb Exp $ +$NetBSD: patch-ad,v 1.2 2002/02/11 18:30:23 fredb Exp $ --- vt.c.orig Fri May 24 10:13:52 1996 -+++ vt.c Thu Feb 7 09:12:59 2002 ++++ vt.c @@ -748,6 +748,9 @@ register int line, i; if (v->state == ESnormal && ch >= ' ' && ch < 256) { -+ if ( (v->attr & T_G0) && ch >= 'a' && ch <= 'z') ++ if ( (v->attr & T_LINEDRAW) && ch >= 'a' && ch <= 'z') + ch -= 95; + if (v->hanging_cursor) { v->x = 0; movecursordown(v); -@@ -800,8 +803,10 @@ +@@ -796,13 +799,38 @@ + v->hanging_cursor = 0; /* XXX Is this right? */ + return; + case 13: ++ /* ++ * This is a hack! Do what I mean: after setting GS0, ++ * activate GS0 for next line, but don't just activate ++ * GS0 for every new line. ++ */ ++ if (v->gset0changed) { ++ if (v->gset0 == S_ASCII) ++ v->attr &= ~T_LINEDRAW; ++ else ++ v->attr |= T_LINEDRAW; ++ v->gset0changed = 0; ++ v->gset0mapped = 0; ++ } + v->x = 0; /* Carriage return (^M) */ v->hanging_cursor = 0; return; case 14: -+ v->attr |= T_G0; - return; /* Alternate font (^N) */ +- return; /* Alternate font (^N) */ ++ if (v->gset1 == S_ASCII) ++ v->attr &= ~T_LINEDRAW; ++ else ++ v->attr |= T_LINEDRAW; ++ return; /* Lock Shift 1 (^N) */ ++ v->gset0changed = 0; ++ v->gset0mapped = 0; case 15: -+ v->attr &= ~T_G0; - return; /* Normal font (^O) */ +- return; /* Normal font (^O) */ ++ if (v->gset0 == S_ASCII) ++ v->attr &= ~T_LINEDRAW; ++ else ++ v->attr |= T_LINEDRAW; ++ v->gset0changed = 1; /* to clear map bit at EOL */ ++ v->gset0mapped = 1; ++ return; /* Lock Shift 0 (^O) */ case 24: /* (^X) */ case 26: -@@ -1071,9 +1076,11 @@ + v->state = ESnormal; /* (^Z) */ +@@ -1070,36 +1098,38 @@ + break; case ESsetG0: if (ch == '0') { - /* Set graphics character set */ -+ v->attr |= T_G0; - } else - if (ch == 'B') { - /* Set normal character set */ -+ v->attr &= ~T_G0; - } else - if (ch == 'U') { - /* Set null character set */ +- /* Set graphics character set */ +- } else +- if (ch == 'B') { +- /* Set normal character set */ +- } else +- if (ch == 'U') { +- /* Set null character set */ +- } else +- if (ch == 'K') { +- /* Set user-defined character +- * set */ +- } +- /* If currently G0, then make active set */ ++ v->gset0 = S_LINEDRAW; ++ if (v->gset0mapped) ++ /* ++ * Activate immediately. We'll still mark it ++ * changed, so the mapped bit will get cleared ++ * for the next line. ++ */ ++ v->attr |= T_LINEDRAW; ++ v->gset0changed = 1; ++ } else if (ch == 'B') { ++ v->gset0 = S_ASCII; ++ if (v->gset0mapped) ++ /* ++ * Activate immediately. We'll still mark it ++ * changed, so the mapped bit will get cleared ++ * for the next line. ++ */ ++ v->attr &= ~T_LINEDRAW; ++ v->gset0changed = 1; ++ } + v->state = ESnormal; + break; ++ /* ++ * Not very useful. Typically, G1 would be changed to one ++ * of the other character sets, which we don't support. ++ */ + case ESsetG1: + if (ch == '0') { +- /* Set graphics character set */ +- } else +- if (ch == 'B') { +- /* Set normal character set */ +- } else +- if (ch == 'U') { +- /* Set null character set */ +- } else +- if (ch == 'K') { +- /* Set user-defined character +- * set */ +- } +- /* If currently G1, then make active set */ ++ v->gset1 = S_LINEDRAW; ++ } else if (ch == 'B') { ++ v->gset1 = S_ASCII; ++ } + v->state = ESnormal; + break; + default: +@@ -1187,6 +1217,10 @@ + v->tab_stop[3] = 0x01010101; + v->tab_stop[4] = 0x01010101; + v->copying = 0; ++ v->gset0 = S_ASCII; ++ v->gset0changed = 0; ++ v->gset0mapped = 0; ++ v->gset1 = S_LINEDRAW; + } + } + |