summaryrefslogtreecommitdiff
path: root/src/regenc.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2018-05-02 17:29:00 +0200
committerJörg Frings-Fürst <debian@jff.email>2018-05-02 17:29:00 +0200
commit7f5dccbe5fee224ecfeceec6e206cca67ad58452 (patch)
tree2891c20f6f89a6a9ca7a967ca2245c0f8370d5b4 /src/regenc.h
parentfd4ff4e58174679784d7698880717eefc9399ba7 (diff)
parent83ea1be016fd5fc27ee721cf62a18716675815dc (diff)
Update upstream source from tag 'upstream/6.8.2'
Update to upstream version '6.8.2' with Debian dir 36d9b721af0175dd84faa77cc24739097d03e9bb
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 */