annotate pwplib/decterm.c @ 61:0f616ade936a

Change char -> unsigned char pointer to fix a warning.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 09 Jul 2011 11:51:19 +0300
parents 5d819ba6891c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 /*
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 * PWPlib: VTxxx support, including VT220/320 charset customization
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3 *
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6 #include <stdio.h>
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7 #include <stdlib.h>
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9 #include "pwplib.h"
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11 #ifdef DRIVE_UNIX
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12 #ifdef DRIVE_TTY_DEC
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
13
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14 #include "tty.h"
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15 #include "convert.h"
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17 #define DECIMAL(x) \
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18 {int n=(x); if(n>=100){*d++='0'+(n/100);n%=100; \
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
19 *d++='0'+(n/10);} \
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
20 else \
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21 if(n>=10)*d++='0'+(n/10); \
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
22 *d++='0'+(n%10);}
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
23
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24 /******************** vt2xx raster glyphs *************************/
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26 /* move somewhere else */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27 void tty_putch(int ch)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29 char c=ch;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
30 write(pwp_tty.fd,&c,sizeof(char));
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33 #ifdef DRIVE_TTY_VT2XX
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
34 void vt2xx_loadglyphs(char*src,int width,int height,int howmany)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
35 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
36 if(pwp_tty.minor<300)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
37 tty_write("\33P0;1;2{P",-1);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
38 else
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
39 tty_write("\33P0;1;2;0;0;2{P",-1);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
40
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
41 for(;howmany;howmany--)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
42 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
43 int x,y,i;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
44 for(y=0;y<height;y+=6)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
45 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
46 if(y)tty_putch('/');
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
47 for(x=0;x<width;x++)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
48 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
49 int sixel=0;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
50 for(i=0;i<6;i++)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
51 if(src[(i+y)*width+x])sixel|=(1<<i);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
52 tty_putch('?'+sixel);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
53 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
54 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
55 tty_putch(';');
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
56 src+=width*height;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
57 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
58 tty_write("\33\\",-1);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
59 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
60
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
61 /*
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
62 int vt2xx_genchars(char*o,int width,int height)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
63 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
64 int u,d,x,y;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
65
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
66 for(u=0;u<8;u++)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
67 for(d=0;d<8;d++)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
68 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
69 if(u|d)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
70 for(y=0;y<height;y++)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
71 for(x=0;x<width;x++)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
72 *o++=
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
73 rastmatrix[16*(y<=(height>>1)?u:d)+4*(y&3)+(x&3)];
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
74 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
75 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
76 */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
77 #endif
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
78
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
79 void tty_vt_prep_attr_40()
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
80 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
81 int y=0;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
82 tty_write("\33[2J\33[H",-1);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
83 for(;y<24;y++)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
84 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
85 if(y)tty_putch('\n');
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
86 tty_write("\33#6",3);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
87 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
88 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
89
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
90 #ifdef DRIVE_TTY_VT2XX
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
91 /*
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
92 int vt2xx_convcalc()
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
93 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
94 const char intens[16]=
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
95 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
96 0,1,6,7, 3,4,9,10,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
97 1,2,9,10,5,6,13,15
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
98 };
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
99
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
100 int up,dn;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
101 for(dn=0;dn<256;dn++)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
102 for(up=0;up<256;up++)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
103 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
104 int dins=(intens[dn&15]+intens[(dn>>4)&15]*3);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
105 int uins=(intens[up&15]+intens[(up>>4)&15]*3);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
106
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
107 if(dins<7 && uins<7 && (dins|uins))
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
108 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
109 if(uins>dins)uins=7;else dins=7;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
110 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
111
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
112 dins/=7;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
113 uins/=7;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
114
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
115 if(dins>7)dins=7;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
116 if(uins>7)uins=7;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
117
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
118 pwpconv.rasthalve[BYTES2(up,dn)]=
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
119 BYTES2(32+(dins|(uins<<3)),0x10);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
120 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
121 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
122 */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
123 #endif
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
124
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
125 /**********************************************/
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
126
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
127 /*
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
128 &1: inverse
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
129 &8: bright
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
130 &16: charset: P vs B
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
131 */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
132
61
0f616ade936a Change char -> unsigned char pointer to fix a warning.
Matti Hamalainen <ccr@tnsp.org>
parents: 56
diff changeset
133 int tty_vt_dump(u8 *s,unsigned char*p,int x,int y)
0
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
134 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
135 TEMPMALL(u8,tmp,pwplib.videobuf.width*pwplib.videobuf.height*16),
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
136 *d=tmp,skip=0,skipy=0;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
137
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
138 skipy=1;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
139
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
140 if(pwplib.frame&1)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
141 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
142 p+=pwplib.videobuf.width*2;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
143 s+=pwplib.videobuf.width*2;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
144 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
145
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
146 {int i=pwplib.frame&1;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
147 for(;i<y;i+=2)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
148 {int j=0;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
149
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
150 for(;j<x;j++)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
151 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
152 if( (s[0]!=p[0]) || (s[1]!=p[1]) )
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
153 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
154 int attch=s[1]^pwp_tty.att;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
155 if(attch)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
156 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
157 int a=s[1];
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
158 d[0]=27;d[1]='[';d+=2;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
159 if(attch&0x0f)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
160 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
161 d[0]=27;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
162 d[1]='[';
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
163 d+=2;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
164
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
165 if(!(a&0xf))*d++='0';
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
166 else
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
167 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
168 int semic=0;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
169 d+=2;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
170 if(attch&8)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
171 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
172 if(a&8)*d++='2';
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
173 *d++='1';
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
174 semic++;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
175 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
176 if(attch&1)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
177 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
178 if(semic)*d++=';';
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
179 if(a&1)*d++='2';
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
180 *d++='7';
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
181 semic++;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
182 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
183 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
184 *d++='m';
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
185 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
186 if(attch&0xf0)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
187 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
188 d[0]=27;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
189 d[1]='(';
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
190 d[2]=(a&0x10)?'P':'B';
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
191 d+=3;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
192 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
193 pwp_tty.att=a;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
194 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
195
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
196 if(skip||skipy)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
197 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
198 if(!skipy)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
199 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
200 int realskip=1;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
201 if(skip<4)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
202 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
203 int i=0;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
204 realskip=0;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
205 for(;i<skip;i++)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
206 if(s[-2*skip+2*i+1]!=pwp_tty.att)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
207 {realskip++;break;}
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
208 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
209 if(realskip)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
210 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
211 d[0]=27;d[1]='[';d+=2;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
212 if(skip>1)DECIMAL(skip);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
213 *d++='C';
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
214 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
215 else
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
216 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
217 int i=0;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
218 for(;i<skip;i++)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
219 *d++=s[-2*skip+2*i];
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
220 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
221 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
222
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
223 else
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
224 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
225 d[0]=27;d[1]='[';d+=2;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
226 DECIMAL(i+1);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
227 *d++=';';
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
228 DECIMAL(j+1);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
229 *d++='H';
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
230 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
231 skip=skipy=0;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
232 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
233
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
234 *d++=s[0];
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
235 }else skip++;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
236 s+=2;p+=2;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
237 }skipy++;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
238
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
239 memcpy(p-pwplib.videobuf.width*2,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
240 s-pwplib.videobuf.width*2,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
241 pwplib.videobuf.width*2*sizeof(u8));
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
242
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
243 p+=pwplib.videobuf.width*2;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
244 s+=pwplib.videobuf.width*2;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
245 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
246 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
247
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
248 /* ^^^ joo: pistä tuo luuppi omaan mökeltimeensä. yhdistä vt- ja
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
249 ansi-kamikset. */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
250
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
251 memcpy(d,"\33[0m",4*sizeof(char)); /* nuo framen alkuun */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
252 pwp_tty.att=0;d+=4;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
253
56
5d819ba6891c More cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 55
diff changeset
254 tty_write((char *)tmp, d - tmp);
0
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
255 TEMPFREE(tmp);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
256 return d-tmp;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
257 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
258
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
259 /* combine this with corresponding ansicon stuff */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
260 void tty_vt_dump_attr()
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
261 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
262 int lgt=
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
263 tty_vt_dump
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
264 (pwplib.videobuf.d,pwp_tty.prevbuf,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
265 pwplib.videobuf.width,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
266 pwplib.videobuf.height);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
267
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
268 pwplib.frame++;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
269
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
270 if(lgt<pwplib.set.framebytes)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
271 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
272 lgt+=tty_vt_dump
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
273 (pwplib.videobuf.d,pwp_tty.prevbuf,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
274 pwplib.videobuf.width,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
275 pwplib.videobuf.height);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
276 pwplib.frame++;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
277 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
278
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
279 if(lgt<pwplib.set.framebytes)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
280 if(pwplib.setup[SETUP_BPS])
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
281 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
282 int howmany=pwplib.setup[SETUP_BPS]/(72*2*3);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
283 for(;howmany;howmany--)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
284 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
285 tty_write("\33[H",3);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
286 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
287 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
288
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
289 if(pwplib.set.framedelay)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
290 usleep(pwplib.set.framedelay*1000);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
291 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
292
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
293 /*** generic initstrings for vt100+/compatibles ****/
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
294
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
295 void tty_vt_restore()
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
296 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
297 if(pwp_tty.type==TTY_VT2XX)tty_write("\33(B",3); /* restore charset */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
298 tty_write(
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
299 "\33[0m" /* attributes off */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
300 "\33[?25h", /* cursor on */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
301 -1);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
302 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
303
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
304 void tty_vt_initstring()
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
305 {
17
c60e531d19cd Some misc. cleanups and minor warning removals.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
306 pwplib_regdestr(tty_vt_restore);
0
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
307
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
308 tty_write(
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
309 "\33[0;37;40m" /* attributes off, assert colors */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
310 "\33[?3l" /* 80-column mode */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
311 "\33[?5l" /* bright on dark */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
312 "\33[?25l" /* cursor off */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
313 "\33[2J" /* clear screen */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
314 "\33[H", /* home cursor */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
315 -1);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
316 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
317
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
318 /***************************************************/
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
319
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
320 void tty_vt1xx_init()
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
321 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
322 pwplib.dump_attr=tty_vt_dump_attr;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
323 /* pwplib.prep_attr=tty_vt_prep_attr;*/
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
324
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
325 conv_init(9,3,2);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
326
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
327 tty_vt_initstring();
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
328 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
329
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
330 #ifdef DRIVE_TTY_VT2XX
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
331 void tty_vt2xx_init()
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
332 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
333 pwplib.dump_attr=tty_vt_dump_attr;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
334 pwplib.prep_attr=tty_vt_prep_attr_40;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
335 pwplib.videobuf.width>>=1;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
336
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
337 {int fw=8,fh=10;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
338 switch((int)pwp_tty.minor)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
339 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
340 case(420):fw=10;fh=16;break; /* 36 lines: fh=10, 48 lines: fh=8 */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
341 case(330):fw=10;fh=20;break;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
342 case(320):fw=15;fh=12;break;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
343 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
344
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
345 conv_init(9,3,2);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
346
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
347 pwpwrite("* loading custom font\n");
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
348
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
349 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
350 TEMPMALL(char,tmp,fw*fh*64);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
351 glyphgen_64rast(tmp,fw,fh);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
352 vt2xx_loadglyphs(tmp,fw,fh,64);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
353 TEMPFREE(tmp);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
354 }}
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
355
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
356 pwp_tty.maxframedata=500;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
357
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
358 tty_vt_initstring();
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
359 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
360 #endif
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
361
55
77f40a3c0095 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 17
diff changeset
362 #endif /* DRIVE_TTY_DEC */
77f40a3c0095 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 17
diff changeset
363 #endif /* DRIVE_UNIX */