blob: a2551fade22cb35de65d211958a032067e6af985 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
char table[256] = "0123456789+-=*% ABCDEFGHIJKLMNOPQRSTUVWXYZ&!?\"'.abcdefghijklmnopqrstuvwxyz:,/éèêëàâäîïôöùûüç..()#";
#define MAXCHAR 0x60
#ifdef __HANDLE_H__
void extracttext(Handle * f, Handle * t, int size) {
int j;
Uint8 b, a1, a2;
for (j = 0; j < size; j++) {
b = f->readU8();
if (b <= MAXCHAR) {
t->writeU8(table[b]);
} else {
switch(b) {
case 0xf7:
t->writeU8('\n');
break;
case 0xf8:
(*t) << "<PAUSE>\n";
break;
case 0xf9:
(*t) << "\n<TCLOSE>\n";
break;
case 0xfa:
(*t) << "<AYA>";
break;
case 0xfb:
j++;
j++;
a1 = f->readU8();
switch(a1) {
case 0:
(*t) << "<TAG0>";
break;
case 1:
(*t) << "<TAG1>";
break;
case 9:
a2 = f->readU8();
(*t) << "<CHOICES " << a2 << ">\n";
break;
case 7:
a2 = f->readU8();
(*t) << "<TIMER " << a2 << ">";
break;
default:
(*t) << "<UNKCMD " << a1 << ">";
break;
}
break;
case 0xfe:
j++;
b = f->readU8();
(*t) << "<PT" << b << ">\n";
break;
case 0xff:
(*t) << "\n<CLOSE>\n";
break;
default:
(*t) << String().set("<UNK %02X>", b);
}
}
}
}
#endif
|