1 /* 2 * Codepage data structure as generated by cptable.pl 3 */ 4 #ifndef CODEPAGE_H 5 #define CODEPAGE_H 6 7 #include <stdint.h> 8 9 #define CODEPAGE_MAGIC UINT64_C(0x51d21eb158a8b3d4) 10 11 struct codepage { 12 uint64_t magic; 13 uint32_t reserved[6]; 14 15 uint8_t upper[256]; /* Codepage upper case table */ 16 uint8_t lower[256]; /* Codepage lower case table */ 17 18 /* 19 * The primary Unicode match is the same case, i.e. A -> A, 20 * the secondary Unicode match is the opposite case, i.e. A -> a. 21 */ 22 uint16_t uni[2][256]; /* Primary and alternate Unicode matches */ 23 }; 24 25 extern const struct codepage codepage; 26 27 #endif /* CODEPAGE_H */ 28