typedef __SIZE_TYPE__ size_t; typedef struct { int first; int second; } OneOrTwoCodepoints; typedef struct { const char* name; size_t length; OneOrTwoCodepoints codepoints; } NamedCharRef; #define CHAR_REF(name, codepoint) { name, sizeof(name) - 1, { codepoint, -1 } } #define MULTI_CHAR_REF(name, code_point, code_point2) \ { name, sizeof(name) - 1, { code_point, code_point2 } } static const NamedCharRef kNamedEntities[] = { CHAR_REF("AElig", 0xc6), CHAR_REF("AMP;", 0x26), CHAR_REF("AMP", 0x26), CHAR_REF("Aacute;", 0xc1), CHAR_REF("Aacute", 0xc1), CHAR_REF("Abreve;", 0x0102), MULTI_CHAR_REF("bne;", 0x3d, 0x20e5), MULTI_CHAR_REF("bnequiv;", 0x2261, 0x20e5), /* 2000 others ... */ // Terminator. CHAR_REF("", -1) };