summaryrefslogtreecommitdiff
path: root/enc/utf_8.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-10 17:47:04 (GMT)
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-10 17:47:04 (GMT)
commit2873edeafb6f6df1fc99bb9b1167591b99dd378c (patch)
treedeb58ca3dc6d6cd71c1740e62aa7e47bea5ed37e /enc/utf_8.c
parent42a677c895f82bcd611db2773fbe68b0558b142d (diff)
Merge Onigmo 6.0.0
* https://github.com/k-takata/Onigmo/blob/Onigmo-6.0.0/HISTORY * fix for ruby 2.4: https://github.com/k-takata/Onigmo/pull/78 * suppress warning: https://github.com/k-takata/Onigmo/pull/79 * include/ruby/oniguruma.h: include onigmo.h. * template/encdb.h.tmpl: ignore duplicated definition of EUC-CN in enc/euc_kr.c. It is defined in enc/gb2313.c with CRuby macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enc/utf_8.c')
-rw-r--r--enc/utf_8.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/enc/utf_8.c b/enc/utf_8.c
index 862b13f..3dad2f7 100644
--- a/enc/utf_8.c
+++ b/enc/utf_8.c
@@ -28,17 +28,20 @@
*/
#include "regenc.h"
-#include "encindex.h"
+#ifdef RUBY
+# include "encindex.h"
+#endif
+
#ifndef ENCINDEX_UTF_8
-#define ENCINDEX_UTF_8 0
+# define ENCINDEX_UTF_8 0
#endif
#define USE_INVALID_CODE_SCHEME
#ifdef USE_INVALID_CODE_SCHEME
/* virtual codepoint values for invalid encoding byte 0xfe and 0xff */
-#define INVALID_CODE_FE 0xfffffffe
-#define INVALID_CODE_FF 0xffffffff
+# define INVALID_CODE_FE 0xfffffffe
+# define INVALID_CODE_FF 0xffffffff
#endif
#define VALID_CODE_LIMIT 0x0010ffff
@@ -428,9 +431,9 @@ OnigEncodingDefine(utf_8, UTF_8) = {
get_ctype_code_range,
left_adjust_char_head,
onigenc_always_true_is_allowed_reverse_match,
+ onigenc_unicode_case_map,
ENCINDEX_UTF_8,
ONIGENC_FLAG_UNICODE,
- onigenc_unicode_case_map,
};
ENC_ALIAS("CP65001", "UTF-8")
@@ -444,4 +447,3 @@ ENC_ALIAS("CP65001", "UTF-8")
ENC_REPLICATE("UTF8-MAC", "UTF-8")
ENC_ALIAS("UTF-8-MAC", "UTF8-MAC")
ENC_ALIAS("UTF-8-HFS", "UTF8-MAC") /* Emacs 23.2 */
-