2772 |
extern const pcre_uint16 PRIV(ucd_stage2)[]; |
extern const pcre_uint16 PRIV(ucd_stage2)[]; |
2773 |
extern const pcre_uint32 PRIV(ucp_gentype)[]; |
extern const pcre_uint32 PRIV(ucp_gentype)[]; |
2774 |
extern const pcre_uint32 PRIV(ucp_gbtable)[]; |
extern const pcre_uint32 PRIV(ucp_gbtable)[]; |
2775 |
|
#ifdef COMPILE_PCRE32 |
2776 |
|
extern const ucd_record PRIV(dummy_ucd_record)[]; |
2777 |
|
#endif |
2778 |
#ifdef SUPPORT_JIT |
#ifdef SUPPORT_JIT |
2779 |
extern const int PRIV(ucp_typerange)[]; |
extern const int PRIV(ucp_typerange)[]; |
2780 |
#endif |
#endif |
2783 |
/* UCD access macros */ |
/* UCD access macros */ |
2784 |
|
|
2785 |
#define UCD_BLOCK_SIZE 128 |
#define UCD_BLOCK_SIZE 128 |
2786 |
#define GET_UCD(ch) (PRIV(ucd_records) + \ |
#define REAL_GET_UCD(ch) (PRIV(ucd_records) + \ |
2787 |
PRIV(ucd_stage2)[PRIV(ucd_stage1)[(int)(ch) / UCD_BLOCK_SIZE] * \ |
PRIV(ucd_stage2)[PRIV(ucd_stage1)[(int)(ch) / UCD_BLOCK_SIZE] * \ |
2788 |
UCD_BLOCK_SIZE + (int)(ch) % UCD_BLOCK_SIZE]) |
UCD_BLOCK_SIZE + (int)(ch) % UCD_BLOCK_SIZE]) |
2789 |
|
|
2790 |
|
#ifdef COMPILE_PCRE32 |
2791 |
|
#define GET_UCD(ch) ((ch > 0x10ffff)? PRIV(dummy_ucd_record) : REAL_GET_UCD(ch)) |
2792 |
|
#else |
2793 |
|
#define GET_UCD(ch) REAL_GET_UCD(ch) |
2794 |
|
#endif |
2795 |
|
|
2796 |
#define UCD_CHARTYPE(ch) GET_UCD(ch)->chartype |
#define UCD_CHARTYPE(ch) GET_UCD(ch)->chartype |
2797 |
#define UCD_SCRIPT(ch) GET_UCD(ch)->script |
#define UCD_SCRIPT(ch) GET_UCD(ch)->script |