diff options
Diffstat (limited to 'src/codepage.c')
-rw-r--r-- | src/codepage.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/src/codepage.c b/src/codepage.c index 0083947..4cbc1bc 100644 --- a/src/codepage.c +++ b/src/codepage.c @@ -33,15 +33,6 @@ /* ---------------------------------------- TYPES */ -typedef enum -{ - CP_ASCII, - CP_ZX81, - CP_SPECTRUM, - CP_CBM -} Codepage; - - typedef struct { int code; @@ -254,6 +245,22 @@ int CodepageConvert(int code) } +int CodeFromNative(Codepage page, int code) +{ + int f; + + for(f = 0; cp_table[page][f].code; f++) + { + if (cp_table[page][f].code == code) + { + return cp_table[page][f].result; + } + } + + return 0; +} + + /* vim: ai sw=4 ts=8 expandtab */ |