annotate pwplib/attrconv.c @ 63:b87192212b9a

Delete dead function convcalc_monotab_attr(int parms)
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 09 Jul 2011 11:58:24 +0300
parents 0e2d7767c00d
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 #include <stdio.h>
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 #include <stdlib.h>
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
4 #include "convert.h"
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6 /*
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7 * Doubleheight IBM
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8 *
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9 */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10
55
77f40a3c0095 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
11 void convcalc_1to12(void) /* &1 == ibm2ibm, */
0
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
12 {
55
77f40a3c0095 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
13 static const u8 tabsrc[] = {
0
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
14 '\"', '\"',' ',
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15 '/', '|','/',
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16 '\'', '\'',' ',
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
17 '/', '|', '/',
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
18
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
19 '\\', '\\','|',
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
20 '^', '^', ' ',
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
21
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
22 '`', '`', ' ',
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
23
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
24 '|', '|', '|',
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25 '~', '~', ' ',
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
26
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27 176, 176, 176,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28 177, 177, 177,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29 178, 178, 178,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
30
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31 179, 179, 179,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32 180, 179, 180,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33 181, 179, 181,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
34 182, 186, 182,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
35 185, 186, 185,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
36 186, 186, 186,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
37 188, 186, 188,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
38 189, 186, 189,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
39 190, 179, 190,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
40 192, 179, 192,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
41 193, 179, 193,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
42 195, 179, 195,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
43 197, 179, 197,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
44 198, 179, 198,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
45 199, 186, 199,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
46 200, 186, 200,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
47 202, 186, 202,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
48 204, 186, 204,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
49 206, 186, 206,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
50 207, 179, 207,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
51 208, 186, 208,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
52 211, 186, 211,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
53 212, 179, 212,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
54 215, 186, 215,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
55 216, 179, 216,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
56 217, 179, 217,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
57
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
58 219, 219, 219,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
59 220, 32, 219,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
60 221, 221, 221,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
61 222, 222, 222,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
62 223, 219, 32,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
63 0
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
64 };
55
77f40a3c0095 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
65 const u8 *t = tabsrc;
77f40a3c0095 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
66 int i;
0
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
67
55
77f40a3c0095 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
68 for(i = 0;i<256;i++)
0
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
69 pwpconv.tab1to12[i]=BYTES2(pwpconv.font[i],32);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
70
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
71 while(*t)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
72 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
73 pwpconv.tab1to12[*t]=BYTES2(pwpconv.font[t[2]],pwpconv.font[t[1]]);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
74 t+=3;
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
55
77f40a3c0095 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
78 static void conv_1to12(u8*d,u8*s,int w,int h)
0
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
79 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
80 w<<=1;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
81 for(;h;h--)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
82 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
83 int x=w>>1;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
84 for(;x;x--)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
85 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
86 int a=pwpconv.tab1to12[*s];
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
87
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
88 d[0]=SECONDBYTE(a);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
89 d[w]=FIRSTBYTE(a);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
90 d[1]=d[w+1]=s[1];
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
91
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
92 d+=2;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
93 s+=2;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
94 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
95 d+=w;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
96 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
97 }
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 * Megatab (ibm color16x16 => any) initialization
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
101 *
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
102 *
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
103 */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
104
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
105 /*
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
106 * purely font/charset related
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
107 */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
108
62
0e2d7767c00d convcalc_ascii()'s one argument is unused, remove it.
Matti Hamalainen <ccr@tnsp.org>
parents: 56
diff changeset
109 void convcalc_ascii(void)
0
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
110 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
111 memcpy(pwpconv.font,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
112 /*00*/ " OOwoxAoooo6qrn*"
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
113 /*10*/ "><8!PS_8^v><L-^v"
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
114 /*20*/ " !\"#$%&'()*+,-./"
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
115 /*30*/ "0123456789:;<=>?"
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
116 /*40*/ "@ABCDEFGHIJKLMNO"
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
117 /*50*/ "PQRSTUVWXYZ[\\]^_"
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
118 /*60*/ "`abcdefghijklmno"
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
119 /*70*/ "pqrstuvwxyz{|}~A"
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
120 /*80*/ "CueaaaaceeeiiiAA"
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
121 /*90*/ "E&&ooouuyOUcEVPf"
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
122 /*A0*/ "aiounNao?--%%!<>"
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
123 /*B0*/ "%#M||||..||.'''."
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
124 /*C0*/ "`--|-+||`.--|-+-"
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
125 /*D0*/ "---``-.++'.8opd^"
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
126 /*E0*/ "aBrhEouiO0Od-%EA"
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
127 /*F0*/ "=+><|J%~o-.Vn2o ",256*sizeof(char));
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
128 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
129
55
77f40a3c0095 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
130 void convcalc_termsafe(void)
0
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
131 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
132 int i=256;u8*s=pwpconv.font;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
133 for(;i;i--)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
134 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
135 if(*s<32 || *s==127)*s=32;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
136 s++;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
137 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
138 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
139
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
140 /*
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
141 * purely colortab related
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
142 */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
143
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
144 void convcalc_monotab(int parms)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
145 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
146 memset(pwpconv.col,(parms&1)?0x00:0x07,256*sizeof(u8));
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
147 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
148
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
149 void convcalc_colortab(int parms)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
150 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
151 int i;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
152 char tabs[32];
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
153
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
154 for(i=0;i<32;i++)tabs[i]=i&15;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
155
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
156 if(parms&1){ /* 8 colors in foreground, else 16 */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
157 memcpy(tabs+8, "\003\003\002\003\004\005\006\007",8);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
158 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
159
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
160 if(parms&2) /* 8 colors in background, else 16 */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
161 memcpy(tabs+24, "\003\003\002\003\004\005\006\007",8);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
162
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
163 if(parms&4) /* ansi color order (bgr) instead of cga (rgb) */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
164 for(i=0;i<32;i++)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
165 tabs[i]=(tabs[i]&~7)|
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
166 "\000\004\002\006\001\005\003\007"[tabs[i]&7];
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
167
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
168 for(i=0;i<256;i++)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
169 pwpconv.col[i]=tabs[i&15]|(tabs[16+((i>>4)&15)]<<4);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
170 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
171
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
172 /*
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
173 * finishing the megatab
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
174 */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
175
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
176 /*
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
177 1: eliminate 178/219 (if inverse supported & 178/219 doesnt exist)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
178 2: eliminate halfblocks (if chars, preferably if we have rasterchar && fullres)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
179 4: replace rasters (if no bgcolors or no colors at all? smwhr else?)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
180 8: sometimes repl 176 with 177 (if only 8 colors at bg - dont use with &4)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
181
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
182 normal ascii rasterchars: 176='%', 177='@'
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
183 in vt100, both 176&177 are replaced with halfraster
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
184 */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
185 void convcalc_megatab_finish(int flags)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
186 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
187 const char intens[16]=
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
188 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
189 0,1,6,7, 3,4,9,10,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
190 1,2,9,10,5,6,13,15
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
191 };
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
192
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
193 int ch,at;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
194 u8*s=(u8*)pwpconv.megatab;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
195
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
196 # ifndef BIG_ENDIAN
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
197 for(at=0;at<256;at++)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
198 for(ch=0;ch<256;ch++)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
199 # else
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
200 for(ch=0;ch<256;ch++)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
201 for(at=0;at<256;at++)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
202 # endif
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
203 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
204 int fg=at&15,bg=(at>>4)&15,at1=at,ch1=ch;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
205
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
206 if(ch==32 || ch==0 || ch==255)fg=bg;else
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
207 if(ch==219)bg=fg;
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(fg==bg)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
210 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
211 if(fg&8)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
212 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
213 ch1=219;at1=fg;
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 ch1=32;at1=fg<<4;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
218 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
219 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
220 else
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
221 if(ch>=220 && ch<=223)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
222 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
223 if((at1&128) && intens[bg]>intens[fg])
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
224 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
225 ch1=223-(ch1-220);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
226 at1=((at1>>4)&15)|((at1<<4)&0xf0);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
227 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
228 if(flags&2)ch1=177;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
229 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
230 else
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
231 if(ch>=176 && ch<=178)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
232 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
233 if((at1&128) || intens[bg]>intens[fg])
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
234 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
235 if(ch1==176)ch1=178; else
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
236 if(ch1==178)ch1=176;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
237
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
238 at1=((at1>>4)&15)|((at1<<4)&0xf0);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
239
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
240 /* flags&8: use 177 when 176 with doublebright */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
241 if((at1&128) && (flags&8) && (ch1==176))
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
242 ch1=177;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
243 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
244 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
245
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
246 /* flags&1: eliminate 178/219 */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
247 if((ch1==178 || (ch1==219)) && (flags&1))
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
248 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
249 ch1=(ch1==178)?176:32;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
250 at1=((at1>>4)&15)|((at1<<4)&0xf0);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
251 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
252
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
253 /* flags&4: replace rasters (32/176/177) with something else
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
254 (replace color info with char stuff
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
255 */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
256
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
257 s[0]=pwpconv.font[ch1];
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
258 s[1]=pwpconv.col[at1];
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
259
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
260 s+=2;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
261 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
262 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
263
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
264 /*******************************/
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
265
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
266
55
77f40a3c0095 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
267 void conv_dump_ibm_megatab(void)
0
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
268 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
269 TEMPMALL(u16,tmp,pwplib.videobuf.height*pwplib.videobuf.width*2),
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
270 *s=(u16*)pwplib.videobuf.d,*d=tmp;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
271
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
272 int i=pwplib.videobuf.height*pwplib.videobuf.width;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
273 for(;i;i--)*d++=pwpconv.megatab[*s++];
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
274
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
275 {u8*pushed=pwplib.videobuf.d;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
276 pwplib.videobuf.d=(u8*)tmp;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
277 pwpconv.orig_dump_attr();
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
278 pwplib.videobuf.d=pushed;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
279 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
280
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
281 TEMPFREE(tmp);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
282 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
283
55
77f40a3c0095 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
284 static void conv_fromibm_double(void)
0
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
285 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
286 int lgt=pwplib.videobuf.width*pwplib.videobuf.height;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
287
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
288 TEMPMALL(u8,tmp,lgt*2*2);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
289
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
290 conv_1to12(tmp,pwplib.videobuf.d,pwplib.videobuf.width,pwplib.videobuf.height);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
291
55
77f40a3c0095 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
292 {u8 *save=pwplib.videobuf.d;
0
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
293 pwplib.videobuf.d=tmp;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
294 pwplib.videobuf.height<<=1;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
295 conv_dump_ibm_megatab();
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
296 pwplib.videobuf.height>>=1;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
297 pwplib.videobuf.d=save;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
298 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
299
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
300 TEMPFREE(tmp);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
301 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
302
55
77f40a3c0095 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
303 static void conv_fromibm_half(void)
0
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
304 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
305 TEMPMALL(u8,tmp,pwplib.videobuf.width*pwplib.videobuf.height),
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
306 *d=tmp,*s=pwplib.videobuf.d;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
307
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
308 int y;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
309 y=pwplib.videobuf.height>>1;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
310
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
311 for(;y;y--)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
312 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
313 int x=pwplib.videobuf.width,
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
314 w=x<<1;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
315 for(;x;x--)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
316 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
317 d[0]=pwpconv.font[s[0]];
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
318 d[1]=s[1]|s[1+w];
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
319 s+=2;d+=2;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
320 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
321 s+=w;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
322 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
323
55
77f40a3c0095 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
324 {u8 *save=pwplib.videobuf.d;
0
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
325 pwplib.videobuf.d=tmp;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
326 pwplib.videobuf.height>>=1;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
327 conv_dump_ibm_megatab();
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
328 pwpconv.orig_dump_attr();
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
329 pwplib.videobuf.d=save;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
330 pwplib.videobuf.height<<=1;
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
331 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
332
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
333 TEMPFREE(tmp);
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
334 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
335
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
336 /* dump_ibm_halved, dump_ibm_realsize */
55
77f40a3c0095 Cleanups.
Matti Hamalainen <ccr@tnsp.org>
parents: 0
diff changeset
337 void conv_dump_ibm(void)
0
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
338 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
339 if(pwplib.setup[SETUP_HALVE])
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
340 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
341 if(pwplib.videobuf.height==50) /* kludge */
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
342 conv_fromibm_half();
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
343 else conv_dump_ibm_megatab();
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
344 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
345 else
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
346 {
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
347 if(pwplib.videobuf.height==50)
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
348 conv_dump_ibm_megatab();
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
349 else conv_fromibm_double();
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
350 }
acb5694e93d9 Initial import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
351 }