ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/encoding.h
(Generate patch)

Comparing rxvt-unicode/src/encoding.h (file contents):
Revision 1.3 by pcg, Wed Mar 3 00:20:33 2004 UTC vs.
Revision 1.6 by pcg, Thu Mar 4 20:09:01 2004 UTC

4#include <stdint.h> 4#include <stdint.h>
5 5
6// order must match the table in encoding.C(!) 6// order must match the table in encoding.C(!)
7enum codeset { 7enum codeset {
8 CS_UNKNOWN = 0, 8 CS_UNKNOWN = 0,
9 CS_SPECIAL,
10 CS_US_ASCII, 9 CS_US_ASCII,
11 10
12 CS_ISO8859_1, 11 CS_ISO8859_1,
13 CS_ISO8859_2, 12 CS_ISO8859_2,
14 CS_ISO8859_3, 13 CS_ISO8859_3,
61 60
62codeset codeset_from_name (const char *name); 61codeset codeset_from_name (const char *name);
63 62
64enum { 63enum {
65 ZERO_WIDTH_CHAR = 0x200b, 64 ZERO_WIDTH_CHAR = 0x200b,
65 REPLACEMENT_CHAR = 0xfffd,
66 NOCHAR = 65535, // must be invalid in ANY codeset (!) 66 NOCHAR = 65535, // must be invalid in ANY codeset (!)
67}; 67};
68 68
69struct rxvt_codeset_conv { 69struct rxvt_codeset_conv {
70 virtual uint32_t from_unicode (uint32_t unicode) const { return unicode; } 70 virtual uint32_t from_unicode (uint32_t unicode) const { return unicode; }
71 virtual uint32_t to_unicode (uint32_t enc) const { return enc; } 71 virtual uint32_t to_unicode (uint32_t enc) const { return enc; }
72}; 72};
73 73
74extern const rxvt_codeset_conv *rxvt_codeset[NUM_CODESETS]; 74extern const rxvt_codeset_conv *rxvt_codeset[NUM_CODESETS];
75 75
76extern uint32_t rxvt_compose (uint32_t c1, uint32_t c2);
77
76#define FROM_UNICODE(cs,code) rxvt_codeset[cs]->from_unicode (code) 78#define FROM_UNICODE(cs,code) rxvt_codeset[cs]->from_unicode (code)
77#define TO_UNICODE(cs,code) rxvt_codeset[cs]->to_unicode (code) 79#define TO_UNICODE(cs,code) rxvt_codeset[cs]->to_unicode (code)
78 80
79#endif 81#endif
80 82

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines