summaryrefslogtreecommitdiff
path: root/src/regenc.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2018-12-21 20:06:28 +0100
committerJörg Frings-Fürst <debian@jff.email>2018-12-21 20:06:28 +0100
commitf883fa5bd37b6420f5dc25027a68289c64028063 (patch)
tree80452d3b1840e553402538830e903ed9fecdb3a8 /src/regenc.h
parent66dfd6613394a8903701840bbc9d67de537e597e (diff)
parentf1aff0cc17934fa45d9520dae6986562e033cb8f (diff)
Merge branch 'release/debian/6.9.1-1'debian/6.9.1-1
Diffstat (limited to 'src/regenc.h')
-rw-r--r--src/regenc.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/regenc.h b/src/regenc.h
index ae8d65e..8a3397d 100644
--- a/src/regenc.h
+++ b/src/regenc.h
@@ -121,8 +121,20 @@ struct PropertyNameCtype {
#define ONIG_ENCODING_INIT_DEFAULT ONIG_ENCODING_ASCII
+#define ENC_SKIP_OFFSET_1_OR_0 7
+
#define ENC_FLAG_ASCII_COMPATIBLE (1<<0)
#define ENC_FLAG_UNICODE (1<<1)
+#define ENC_FLAG_SKIP_OFFSET_MASK (7<<2)
+#define ENC_FLAG_SKIP_OFFSET_0 0
+#define ENC_FLAG_SKIP_OFFSET_1 (1<<2)
+#define ENC_FLAG_SKIP_OFFSET_2 (2<<2)
+#define ENC_FLAG_SKIP_OFFSET_3 (3<<2)
+#define ENC_FLAG_SKIP_OFFSET_4 (4<<2)
+#define ENC_FLAG_SKIP_OFFSET_1_OR_0 (ENC_SKIP_OFFSET_1_OR_0<<2)
+
+#define ENC_GET_SKIP_OFFSET(enc) \
+ (((enc)->flag & ENC_FLAG_SKIP_OFFSET_MASK)>>2)
/* for encoding system implementation (internal) */
@@ -197,7 +209,7 @@ extern int onigenc_egcb_is_break_position P_((OnigEncoding enc, UChar* p, UChar*
else if ((buk)->fold_len == 3)\
addr = OnigUnicodeFolds3 + (buk)->index;\
else\
- addr = 0;\
+ return ONIGERR_INVALID_CODE_POINT_VALUE;\
} while (0)
extern OnigCodePoint OnigUnicodeFolds1[];
@@ -252,7 +264,7 @@ extern const unsigned short OnigEncAsciiCtypeTable[];
#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))
-
+
#define ONIGENC_IS_UNICODE_ENCODING(enc) \
(((enc)->flag & ENC_FLAG_UNICODE) != 0)