summaryrefslogtreecommitdiff
path: root/src/regenc.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2018-05-04 18:26:00 +0200
committerJörg Frings-Fürst <debian@jff.email>2018-05-04 18:26:00 +0200
commita7c6cf32519f775b01975b104a0c8da3c76beab5 (patch)
treece8bdf27499179198a1f264a29d34a93c3c92902 /src/regenc.h
parentfd4ff4e58174679784d7698880717eefc9399ba7 (diff)
parent0ad6ddc1cbc5b0f36547798994b352a09ae5cf1c (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'src/regenc.h')
-rw-r--r--src/regenc.h11
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 */