diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2018-09-05 21:54:15 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2018-09-05 21:54:15 +0200 |
commit | 6bf91b141b7b3e3524f422d4c18bccf7f87aecd1 (patch) | |
tree | 854398618f6cbc5187abe5651a2bb75a17ba9b7c /src/regenc.h | |
parent | 6dcf2054b927e3bd6889ae8eec0f9b5669fcb025 (diff) | |
parent | 777189a11acf313a6f2f2255a475b40d4330ff65 (diff) |
Merge branch 'release/debian/6.8.2-1'debian/6.8.2-1
Diffstat (limited to 'src/regenc.h')
-rw-r--r-- | src/regenc.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/regenc.h b/src/regenc.h index 4dd89ba..ae7a774 100644 --- a/src/regenc.h +++ b/src/regenc.h @@ -120,6 +120,10 @@ struct PropertyNameCtype { #define ONIG_ENCODING_INIT_DEFAULT ONIG_ENCODING_ASCII +#define ENC_FLAG_ASCII_COMPATIBLE (1<<0) +#define ENC_FLAG_UNICODE (1<<1) + + /* for encoding system implementation (internal) */ extern int onigenc_end(void); extern int onigenc_ascii_apply_all_case_fold P_((OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void* arg)); @@ -156,7 +160,7 @@ extern int onigenc_mb4_code_to_mbc P_((OnigEncoding enc, OnigCodePoint code, UCh extern int onigenc_mb4_is_code_ctype P_((OnigEncoding enc, OnigCodePoint code, unsigned int ctype)); extern struct PropertyNameCtype* euc_jp_lookup_property_name P_((register const char *str, register unsigned int len)); extern struct PropertyNameCtype* sjis_lookup_property_name P_((register const char *str, register unsigned int len)); -//extern const struct PropertyNameCtype* unicode_lookup_property_name P_((register const char *str, register unsigned int len)); +/* extern const struct PropertyNameCtype* unicode_lookup_property_name P_((register const char *str, register unsigned int len)); */ /* in enc/unicode.c */ extern int onigenc_unicode_is_code_ctype P_((OnigCodePoint code, unsigned int ctype)); @@ -250,8 +254,9 @@ extern const unsigned short OnigEncAsciiCtypeTable[]; ONIGENC_IS_ASCII_CODE_CTYPE(code, ONIGENC_CTYPE_LOWER)) #define ONIGENC_IS_UNICODE_ENCODING(enc) \ - ((enc)->is_code_ctype == onigenc_unicode_is_code_ctype) + (((enc)->flag & ENC_FLAG_UNICODE) != 0) -#define ONIGENC_IS_ASCII_COMPATIBLE_ENCODING(enc) ((enc)->min_enc_len == 1) +#define ONIGENC_IS_ASCII_COMPATIBLE_ENCODING(enc) \ + (((enc)->flag & ENC_FLAG_ASCII_COMPATIBLE) != 0) #endif /* REGENC_H */ |