From 0584dbaad9f65edfb0e6fa8b49914c03143846f2 Mon Sep 17 00:00:00 2001 From: pixel Date: Thu, 2 Oct 2003 19:14:13 +0000 Subject: Jour1... --- PE/table.h | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) (limited to 'PE/table.h') diff --git a/PE/table.h b/PE/table.h index 1eb7cb9..c5a13d2 100644 --- a/PE/table.h +++ b/PE/table.h @@ -1,3 +1,65 @@ char table[256] = "0123456789+-=*% ABCDEFGHIJKLMNOPQRSTUVWXYZ&!?\"'.abcdefghijklmnopqrstuvwxyz:,/йиклавдопфцщыьз"; #define MAXCHAR 0x5b + +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) << "\n"; + break; + case 0xf9: + (*t) << "\n\n"; + break; + case 0xfa: + (*t) << ""; + break; + case 0xfb: + j++; + j++; + a1 = f->readU8(); + switch(a1) { + case 0: + (*t) << ""; + break; + case 1: + (*t) << ""; + break; + case 9: + a2 = f->readU8(); + (*t) << "\n"; + break; + case 7: + a2 = f->readU8(); + (*t) << ""; + break; + default: + (*t) << ""; + break; + } + break; + case 0xfe: + j++; + b = f->readU8(); + (*t) << "\n"; + break; + case 0xff: + (*t) << "\n\n"; + break; + default: + (*t) << String().set("", b); + } + } + } +} -- cgit v1.2.3