diff options
author | duerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-16 10:46:32 +0000 |
---|---|---|
committer | duerst <duerst@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-05-16 10:46:32 +0000 |
commit | 65db16de9f7f9fb806dea4bf072e5585cdd42ee2 (patch) | |
tree | 28ed0cb539d443ca68c0bc9318473644ff2ed8b7 /include | |
parent | 2f190353061b79e732bf46043a2edbe5ebc3bef0 (diff) |
* include/ruby/oniguruma.h: Introducing ONIG_CASE_MAPPING compilation
switch
* include/ruby/oniguruma.h, enc/unicode.h: Using ONIG_CASE_MAPPING
compilation switch
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55018 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r-- | include/ruby/oniguruma.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/ruby/oniguruma.h b/include/ruby/oniguruma.h index b45072f48d..9318c0db24 100644 --- a/include/ruby/oniguruma.h +++ b/include/ruby/oniguruma.h @@ -128,14 +128,20 @@ typedef unsigned int OnigCaseFoldType; /* case fold flag */ ONIG_EXTERN OnigCaseFoldType OnigDefaultCaseFoldFlag; +#define ONIG_CASE_MAPPING + +#ifdef ONIG_CASE_MAPPING /* bits for actual code point count; 3 bits is more than enough, currently only 2 used */ #define OnigCodePointMaskWidth 3 #define OnigCodePointMask ((1<<OnigCodePointMaskWidth)-1) #define OnigCodePointCount(n) ((n)&OnigCodePointMask) #define OnigCaseFoldFlags(n) ((n)&~OnigCodePointMask) +#endif /* ONIG_CASE_MAPPING */ + /* #define ONIGENC_CASE_FOLD_HIRAGANA_KATAKANA (1<<1) */ /* no longer usable with these values! */ /* #define ONIGENC_CASE_FOLD_KATAKANA_WIDTH (1<<2) */ /* no longer usable with these values! */ +#ifdef ONIG_CASE_MAPPING /* bits for index into table with separate titlecase mappings */ /* 10 bits provide 1024 values */ #define OnigSpecialIndexShift 3 @@ -149,10 +155,16 @@ ONIG_EXTERN OnigCaseFoldType OnigDefaultCaseFoldFlag; #define ONIGENC_CASE_DOWN_SPECIAL (1<<17) /* has special downcase mapping */ #define ONIGENC_CASE_MODIFIED (1<<18) /* data has been modified */ #define ONIGENC_CASE_FOLD (1<<19) /* has/needs case folding */ +#endif /* ONIG_CASE_MAPPING */ + #define ONIGENC_CASE_FOLD_TURKISH_AZERI (1<<20) /* needs mapping specific to Turkic languages; better not change original value! */ + +#ifdef ONIG_CASE_MAPPING #define ONIGENC_CASE_FOLD_LITHUANIAN (1<<21) /* needs Lithuanian-specific mapping */ #define ONIGENC_CASE_ASCII_ONLY (1<<22) /* only modify ASCII range */ #define ONIGENC_CASE_IS_TITLECASE (1<<23) /* character itself is already titlecase */ +#endif /* ONIG_CASE_MAPPING */ + #define INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR (1<<30) /* better not change original value! */ #define ONIGENC_CASE_FOLD_MIN INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR |