summaryrefslogtreecommitdiff
path: root/src/regenc.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-14 14:22:27 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-12-14 14:22:27 +0100
commitfa131e9ad996d099bb48a3b1302e4a3b3c0f03bd (patch)
tree7b4963ddd27303d1a8e856acdd3a55ce9ed179f7 /src/regenc.h
parenta89a4ac904bc93b1d93b410394fa05c23260351b (diff)
parentb7ad39361a923207113da1145f8655a1bc50c3aa (diff)
Merge branch 'release/6.6.1-1'6.6.1-1
Diffstat (limited to 'src/regenc.h')
-rw-r--r--src/regenc.h11
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))