diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-09-01 19:54:36 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2017-09-01 19:54:36 +0200 |
commit | a3ec3a8d99a951fc599818b1ea9a2aa218b10fa5 (patch) | |
tree | 3ee714ca52a54635d91c7e3c10b968e0048022be /src/regenc.h | |
parent | 6b31069db6198cd50cc17f2c63917dd2df5775fb (diff) | |
parent | de5adb21f7224352652be174c66fb88e596bb49c (diff) |
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'src/regenc.h')
-rw-r--r-- | src/regenc.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/regenc.h b/src/regenc.h index abc26be..cda3bcd 100644 --- a/src/regenc.h +++ b/src/regenc.h @@ -71,6 +71,8 @@ typedef struct { #define ONIG_CHECK_NULL_RETURN(p) if (ONIG_IS_NULL(p)) return NULL #define ONIG_CHECK_NULL_RETURN_VAL(p,val) if (ONIG_IS_NULL(p)) return (val) +#define MAX_CODE_POINT (~((OnigCodePoint )0)) + #define enclen(enc,p) ONIGENC_MBC_ENC_LEN(enc,p) /* character types bit flag */ @@ -109,6 +111,7 @@ struct PropertyNameCtype { /* #define USE_CRNL_AS_LINE_TERMINATOR */ #define USE_UNICODE_PROPERTIES +#define USE_UNICODE_EXTENDED_GRAPHEME_CLUSTER /* #define USE_UNICODE_CASE_FOLD_TURKISH_AZERI */ /* #define USE_UNICODE_ALL_LINE_TERMINATORS */ /* see Unicode.org UTS #18 */ @@ -143,6 +146,7 @@ ONIG_EXTERN int onigenc_mb2_code_to_mbclen P_((OnigCodePoint code)); ONIG_EXTERN int onigenc_mb2_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UChar *buf)); ONIG_EXTERN int onigenc_minimum_property_name_to_ctype P_((OnigEncoding enc, UChar* p, UChar* end)); ONIG_EXTERN int onigenc_unicode_property_name_to_ctype P_((OnigEncoding enc, UChar* p, UChar* end)); +ONIG_EXTERN int onigenc_is_mbc_word_ascii P_((OnigEncoding enc, UChar* s, const UChar* end)); ONIG_EXTERN int onigenc_mb2_is_code_ctype P_((OnigEncoding enc, OnigCodePoint code, unsigned int ctype)); ONIG_EXTERN int onigenc_mb4_code_to_mbclen P_((OnigCodePoint code)); ONIG_EXTERN int onigenc_mb4_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UChar *buf)); @@ -158,6 +162,7 @@ ONIG_EXTERN int onigenc_unicode_ctype_code_range P_((OnigCtype ctype, const Onig ONIG_EXTERN int onigenc_unicode_get_case_fold_codes_by_str P_((OnigEncoding enc, OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[])); ONIG_EXTERN int onigenc_unicode_mbc_case_fold P_((OnigEncoding enc, OnigCaseFoldType flag, const UChar** pp, const UChar* end, UChar* fold)); ONIG_EXTERN int onigenc_unicode_apply_all_case_fold P_((OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void* arg)); +ONIG_EXTERN int onigenc_egcb_is_break_position P_((OnigEncoding enc, UChar* p, UChar* prev, const UChar* start, const UChar* end)); #define UTF16_IS_SURROGATE_FIRST(c) (((c) & 0xfc) == 0xd8) @@ -194,8 +199,8 @@ extern OnigCodePoint OnigUnicodeFolds3[]; struct ByUnfoldKey { OnigCodePoint code; - int index; - int fold_len; + short int index; + short int fold_len; }; extern const struct ByUnfoldKey* unicode_unfold_key(OnigCodePoint code); @@ -235,6 +240,8 @@ ONIG_EXTERN const unsigned short OnigEncAsciiCtypeTable[]; #define ONIGENC_ASCII_CODE_TO_UPPER_CASE(c) OnigEncAsciiToUpperCaseTable[c] #define ONIGENC_IS_ASCII_CODE_CTYPE(code,ctype) \ ((OnigEncAsciiCtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0) +#define ONIGENC_IS_ASCII_CODE_WORD(code) \ + ((OnigEncAsciiCtypeTable[code] & CTYPE_TO_BIT(ONIGENC_CTYPE_WORD)) != 0) #define ONIGENC_IS_ASCII_CODE_CASE_AMBIG(code) \ (ONIGENC_IS_ASCII_CODE_CTYPE(code, ONIGENC_CTYPE_UPPER) ||\ ONIGENC_IS_ASCII_CODE_CTYPE(code, ONIGENC_CTYPE_LOWER)) |