1141 |
typedef struct { |
typedef struct { |
1142 |
uschar script; |
uschar script; |
1143 |
uschar chartype; |
uschar chartype; |
1144 |
pcre_int16 other_case; |
pcre_int32 other_case; |
1145 |
} ucd_record; |
} ucd_record; |
1146 |
|
|
1147 |
extern const ucd_record ucd_records[]; |
extern const ucd_record _pcre_ucd_records[]; |
1148 |
extern const uschar ucd_stage1[]; |
extern const uschar _pcre_ucd_stage1[]; |
1149 |
extern const pcre_uint16 ucd_stage2[]; |
extern const pcre_uint16 _pcre_ucd_stage2[]; |
1150 |
extern const int ucp_gentype[]; |
extern const int _pcre_ucp_gentype[]; |
1151 |
|
|
1152 |
|
|
1153 |
/* UCD access macros */ |
/* UCD access macros */ |
1154 |
|
|
1155 |
#define UCD_BLOCK_SIZE 128 |
#define UCD_BLOCK_SIZE 128 |
1156 |
#define GET_UCD(ch) (ucd_records + ucd_stage2[ucd_stage1[(ch) / UCD_BLOCK_SIZE] * \ |
#define GET_UCD(ch) (_pcre_ucd_records + \ |
1157 |
|
_pcre_ucd_stage2[_pcre_ucd_stage1[(ch) / UCD_BLOCK_SIZE] * \ |
1158 |
UCD_BLOCK_SIZE + ch % UCD_BLOCK_SIZE]) |
UCD_BLOCK_SIZE + ch % UCD_BLOCK_SIZE]) |
1159 |
|
|
1160 |
#define UCD_CHARTYPE(ch) GET_UCD(ch)->chartype |
#define UCD_CHARTYPE(ch) GET_UCD(ch)->chartype |
1161 |
#define UCD_SCRIPT(ch) GET_UCD(ch)->script |
#define UCD_SCRIPT(ch) GET_UCD(ch)->script |
1162 |
#define UCD_CATEGORY(ch) ucp_gentype[UCD_CHARTYPE(ch)] |
#define UCD_CATEGORY(ch) _pcre_ucp_gentype[UCD_CHARTYPE(ch)] |
1163 |
#define UCD_OTHERCASE(ch) (ch + GET_UCD(ch)->other_case) |
#define UCD_OTHERCASE(ch) (ch + GET_UCD(ch)->other_case) |
1164 |
|
|
1165 |
#endif |
#endif |
1166 |
|
|