ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/table/viscii.h
Revision: 1.1
Committed: Mon Nov 24 17:28:08 2003 UTC (20 years, 7 months ago) by pcg
Content type: text/plain
Branch: MAIN
CVS Tags: rel-2_1_0, rel-2_2, rel-2_3, rel-2_0, rel-1_9, rel-1-3, rel-1-2, before_astyle, after_astyle
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 pcg 1.1 //
2     // AUTOMATICALLLY GENERATED by gentables
3     //
4     #ifdef ENCODING_VN
5    
6     static const uint8_t viscii_f_0[] = {
7     0x00, 0x01, 0x00, 0x03, 0x04, 0x00, 0x00, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
8     0x10, 0x11, 0x12, 0x13, 0x00, 0x15, 0x16, 0x17, 0x18, 0x00, 0x1a, 0x1b, 0x1c, 0x1d, 0x00, 0x1f,
9     0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f,
10     0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
11     0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f,
12     0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
13     0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f,
14     0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x00, 0x00,
15     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
16     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
17     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
18     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
19     0xc0, 0xc1, 0xc2, 0xc3, 0x00, 0x00, 0x00, 0x00, 0xc8, 0xc9, 0xca, 0x00, 0xcc, 0xcd, 0x00, 0x00,
20     0x00, 0x00, 0xd2, 0xd3, 0xd4, 0xa0, 0x00, 0x00, 0x00, 0xd9, 0xda, 0x00, 0x00, 0xdd, 0x00, 0x00,
21     0xe0, 0xe1, 0xe2, 0xe3, 0x00, 0x00, 0x00, 0x00, 0xe8, 0xe9, 0xea, 0x00, 0xec, 0xed, 0x00, 0x00,
22     0x00, 0x00, 0xf2, 0xf3, 0xf4, 0xf5, 0x00, 0x00, 0x00, 0xf9, 0xfa, 0x00, 0x00, 0xfd
23     };
24     static const uint8_t viscii_f_256[] = {
25     0xc5, 0xe5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0xf0,
26     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
27     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xce, 0xee, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
28     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
29     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
30     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
31     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9d, 0xfb, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
32     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
33     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
34     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb4, 0xbd,
35     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbf, 0xdf
36     };
37     static const uint8_t viscii_f_7680[] = {
38     0x80, 0xd5, 0xc4, 0xe4, 0x84, 0xa4, 0x85, 0xa5, 0x86, 0xa6, 0x06, 0xe7, 0x87, 0xa7, 0x81, 0xa1,
39     0x82, 0xa2, 0x02, 0xc6, 0x05, 0xc7, 0x83, 0xa3, 0x89, 0xa9, 0xcb, 0xeb, 0x88, 0xa8, 0x8a, 0xaa,
40     0x8b, 0xab, 0x8c, 0xac, 0x8d, 0xad, 0x8e, 0xae, 0x9b, 0xef, 0x98, 0xb8, 0x9a, 0xf7, 0x99, 0xf6,
41     0x8f, 0xaf, 0x90, 0xb0, 0x91, 0xb1, 0x92, 0xb2, 0x93, 0xb5, 0x95, 0xbe, 0x96, 0xb6, 0x97, 0xb7,
42     0xb3, 0xde, 0x94, 0xfe, 0x9e, 0xf8, 0x9c, 0xfc, 0xba, 0xd1, 0xbb, 0xd7, 0xbc, 0xd8, 0xff, 0xe6,
43     0xb9, 0xf1, 0x9f, 0xcf, 0x1e, 0xdc, 0x14, 0xd6, 0x19, 0xdb
44     };
45     static const uint16_t viscii_t_0[] = {
46     0x0000, 0x0001, 0x1eb2, 0x0003, 0x0004, 0x1eb4, 0x1eaa, 0x0007, 0x0008, 0x0009, 0x000a, 0x000b,
47     0x000c, 0x000d, 0x000e, 0x000f, 0x0010, 0x0011, 0x0012, 0x0013, 0x1ef6, 0x0015, 0x0016, 0x0017,
48     0x0018, 0x1ef8, 0x001a, 0x001b, 0x001c, 0x001d, 0x1ef4, 0x001f, 0x0020, 0x0021, 0x0022, 0x0023,
49     0x0024, 0x0025, 0x0026, 0x0027, 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f,
50     0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037, 0x0038, 0x0039, 0x003a, 0x003b,
51     0x003c, 0x003d, 0x003e, 0x003f, 0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
52     0x0048, 0x0049, 0x004a, 0x004b, 0x004c, 0x004d, 0x004e, 0x004f, 0x0050, 0x0051, 0x0052, 0x0053,
53     0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005a, 0x005b, 0x005c, 0x005d, 0x005e, 0x005f,
54     0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067, 0x0068, 0x0069, 0x006a, 0x006b,
55     0x006c, 0x006d, 0x006e, 0x006f, 0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
56     0x0078, 0x0079, 0x007a, 0x007b, 0x007c, 0x007d, 0x0000, 0x0000, 0x1ea0, 0x1eae, 0x1eb0, 0x1eb6,
57     0x1ea4, 0x1ea6, 0x1ea8, 0x1eac, 0x1ebc, 0x1eb8, 0x1ebe, 0x1ec0, 0x1ec2, 0x1ec4, 0x1ec6, 0x1ed0,
58     0x1ed2, 0x1ed4, 0x1ed6, 0x1ed8, 0x1ee2, 0x1eda, 0x1edc, 0x1ede, 0x1eca, 0x1ece, 0x1ecc, 0x1ec8,
59     0x1ee6, 0x0168, 0x1ee4, 0x1ef2, 0x00d5, 0x1eaf, 0x1eb1, 0x1eb7, 0x1ea5, 0x1ea7, 0x1ea9, 0x1ead,
60     0x1ebd, 0x1eb9, 0x1ebf, 0x1ec1, 0x1ec3, 0x1ec5, 0x1ec7, 0x1ed1, 0x1ed3, 0x1ed5, 0x1ed7, 0x1ee0,
61     0x01a0, 0x1ed9, 0x1edd, 0x1edf, 0x1ecb, 0x1ef0, 0x1ee8, 0x1eea, 0x1eec, 0x01a1, 0x1edb, 0x01af,
62     0x00c0, 0x00c1, 0x00c2, 0x00c3, 0x1ea2, 0x0102, 0x1eb3, 0x1eb5, 0x00c8, 0x00c9, 0x00ca, 0x1eba,
63     0x00cc, 0x00cd, 0x0128, 0x1ef3, 0x0110, 0x1ee9, 0x00d2, 0x00d3, 0x00d4, 0x1ea1, 0x1ef7, 0x1eeb,
64     0x1eed, 0x00d9, 0x00da, 0x1ef9, 0x1ef5, 0x00dd, 0x1ee1, 0x01b0, 0x00e0, 0x00e1, 0x00e2, 0x00e3,
65     0x1ea3, 0x0103, 0x1eef, 0x1eab, 0x00e8, 0x00e9, 0x00ea, 0x1ebb, 0x00ec, 0x00ed, 0x0129, 0x1ec9,
66     0x0111, 0x1ef1, 0x00f2, 0x00f3, 0x00f4, 0x00f5, 0x1ecf, 0x1ecd, 0x1ee5, 0x00f9, 0x00fa, 0x0169,
67     0x1ee7, 0x00fd, 0x1ee3, 0x1eee
68     };
69    
70     struct rxvt_codeset_conv_viscii : rxvt_codeset_conv {
71     uint32_t from_unicode (uint32_t unicode) const {
72     if (unicode == 0x007e) return 0x007e;
73     if (unicode == 0x007f) return 0x007f;
74     if (0x0000 <= unicode && unicode <= 0x00fd)
75     return viscii_f_0[unicode - 0x0000] == 128 ? NOCHAR : viscii_f_0[unicode - 0x0000];
76     if (0x0102 <= unicode && unicode <= 0x01b0)
77     return viscii_f_256[unicode - 0x0102] == 0 ? NOCHAR : viscii_f_256[unicode - 0x0102];
78     if (0x1ea0 <= unicode && unicode <= 0x1ef9)
79     return viscii_f_7680[unicode - 0x1ea0];
80     return NOCHAR;
81     }
82     uint32_t to_unicode (uint32_t enc) const {
83     if (enc == 0x007e) return 0x007e;
84     if (enc == 0x007f) return 0x007f;
85     if (0x0000 <= enc && enc <= 0x00ff)
86     return viscii_t_0[enc - 0x0000] == 128 ? NOCHAR : viscii_t_0[enc - 0x0000];
87     return NOCHAR;
88     }
89     } rxvt_codeset_conv_viscii;
90    
91     #else
92    
93     #define rxvt_codeset_conv_viscii rxvt_codeset_conv_unknown
94    
95     #endif