mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
* include/ruby/oniguruma.h: Rearranging flag assignments and making
space for titlecase indices; adding additional macros to add or extract titlecase index; adding comments for better documentation. * enc/unicode.c: Moving some macros to include/ruby/oniguruma.h; activating use of titlecase indices. (with Kimihito Matsui) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
169b867fbf
commit
f1f48e6103
3 changed files with 46 additions and 18 deletions
|
@ -71,10 +71,6 @@ static const unsigned short EncUNICODE_ISO_8859_1_CtypeTable[256] = {
|
|||
0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2, 0x30e2
|
||||
};
|
||||
|
||||
/* use bottom bytes for actual code point count; 3 bits is more than enough */
|
||||
#define OnigCodePointCount(n) ((n)&0x7)
|
||||
#define OnigCaseFoldFlags(n) ((n)&~0x7)
|
||||
|
||||
typedef struct {
|
||||
int n;
|
||||
OnigCodePoint code[3];
|
||||
|
@ -144,7 +140,7 @@ code3_equal(const OnigCodePoint *x, const OnigCodePoint *y)
|
|||
#define U ONIGENC_CASE_UPCASE
|
||||
#define D ONIGENC_CASE_DOWNCASE
|
||||
#define F ONIGENC_CASE_FOLD
|
||||
#define T(n) ONIGENC_CASE_TITLECASE
|
||||
#define T(n) (ONIGENC_CASE_TITLECASE|OnigTitlecaseEncode(n))
|
||||
|
||||
#include "enc/unicode/casefold.h"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue