diff options
Diffstat (limited to 'PE/table.h')
-rw-r--r-- | PE/table.h | 134 |
1 files changed, 67 insertions, 67 deletions
@@ -1,67 +1,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
+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 |