ReactOS Fundraising Campaign 2012
 
€ 3,873 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

tcharmap.h
Go to the documentation of this file.
00001 // This is a simple class to handle character maps
00002 // (Paul Brannan 6/25/98)
00003 
00004 #pragma once
00005 
00006 class TCharmap {
00007 private:
00008     char *map[256];
00009     char *current_map;
00010 public:
00011     TCharmap();
00012     ~TCharmap();
00013 
00014     void init() {}
00015 
00016     char translate(char c, char mapchar) {
00017         if(map[(unsigned char)mapchar]) return map[(unsigned char)mapchar][(unsigned char)c];
00018         return c;
00019     }
00020     char translate(char c) {
00021         return current_map[(unsigned char)c];
00022     }
00023 
00024     void setmap(char mapchar) {
00025         if(map[(unsigned char)mapchar]) current_map = map[(unsigned char)mapchar];
00026     }
00027 
00028     void translate_buffer(char *start, char *end) {
00029         while(start < end) {
00030             *start = translate(*start);
00031             start++;
00032         }
00033     }
00034 
00035     void modmap(char pos, char mapchar, char c);
00036 
00037     int enabled;
00038 };

Generated on Sat May 19 2012 04:15:22 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.