ReactOS 0.4.15-dev-8231-g29a56f3
tcharmap.h
Go to the documentation of this file.
1// This is a simple class to handle character maps
2// (Paul Brannan 6/25/98)
3
4#pragma once
5
6class TCharmap {
7private:
8 char *map[256];
10public:
11 TCharmap();
12 ~TCharmap();
13
14 void init() {}
15
16 char translate(char c, char mapchar) {
17 if(map[(unsigned char)mapchar]) return map[(unsigned char)mapchar][(unsigned char)c];
18 return c;
19 }
20 char translate(char c) {
21 return current_map[(unsigned char)c];
22 }
23
24 void setmap(char mapchar) {
25 if(map[(unsigned char)mapchar]) current_map = map[(unsigned char)mapchar];
26 }
27
28 void translate_buffer(char *start, char *end) {
29 while(start < end) {
31 start++;
32 }
33 }
34
35 void modmap(char pos, char mapchar, char c);
36
38};
int enabled
Definition: tcharmap.h:37
void modmap(char pos, char mapchar, char c)
Definition: tcharmap.cpp:212
void init()
Definition: tcharmap.h:14
void setmap(char mapchar)
Definition: tcharmap.h:24
char * current_map
Definition: tcharmap.h:9
void translate_buffer(char *start, char *end)
Definition: tcharmap.h:28
char translate(char c, char mapchar)
Definition: tcharmap.h:16
char translate(char c)
Definition: tcharmap.h:20
Definition: _map.h:48
unsigned char
Definition: typeof.h:29
GLuint start
Definition: gl.h:1545
GLuint GLuint end
Definition: gl.h:1545
const GLubyte * c
Definition: glext.h:8905
#define c
Definition: ke_i.h:80