enc/unicode.c File Reference

#include "regint.h"
#include "enc/unicode/name2ctype.h"
#include "ruby/st.h"

Go to the source code of this file.

Data Structures

struct  CodePointList3
struct  CaseFold_11_Type
struct  CaseUnfold_11_Type
struct  CodePointList2
struct  CaseUnfold_12_Type
struct  CaseUnfold_13_Type

Defines

#define ONIGENC_IS_UNICODE_ISO_8859_1_CTYPE(code, ctype)   ((EncUNICODE_ISO_8859_1_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)
#define numberof(array)   (int)(sizeof(array) / sizeof((array)[0]))
#define CODE_RANGES_NUM   numberof(CodeRanges)
#define PROPERTY_NAME_MAX_SIZE   MAX_WORD_LENGTH

Functions

int onigenc_unicode_is_code_ctype (OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
int onigenc_unicode_ctype_code_range (int ctype, const OnigCodePoint *ranges[])
int onigenc_utf16_32_get_ctype_code_range (OnigCtype ctype, OnigCodePoint *sb_out, const OnigCodePoint *ranges[], struct OnigEncodingTypeST *enc ARG_UNUSED)
int onigenc_unicode_property_name_to_ctype (OnigEncoding enc, UChar *name, UChar *end)
static int code2_cmp (OnigCodePoint *x, OnigCodePoint *y)
static st_index_t code2_hash (OnigCodePoint *x)
static int code3_cmp (OnigCodePoint *x, OnigCodePoint *y)
static st_index_t code3_hash (OnigCodePoint *x)
static int init_case_fold_table (void)
int onigenc_unicode_mbc_case_fold (OnigEncoding enc, OnigCaseFoldType flag ARG_UNUSED, const UChar **pp, const UChar *end, UChar *fold)
int onigenc_unicode_apply_all_case_fold (OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void *arg, OnigEncoding enc ARG_UNUSED)
int onigenc_unicode_get_case_fold_codes_by_str (OnigEncoding enc, OnigCaseFoldType flag, const OnigUChar *p, const OnigUChar *end, OnigCaseFoldCodeItem items[])

Variables

static const unsigned short EncUNICODE_ISO_8859_1_CtypeTable [256]
static const CaseFold_11_Type CaseFold []
static const CaseFold_11_Type CaseFold_Locale []
static const CaseUnfold_11_Type CaseUnfold_11 []
static const CaseUnfold_11_Type CaseUnfold_11_Locale []
static const CaseUnfold_12_Type CaseUnfold_12 []
static const CaseUnfold_12_Type CaseUnfold_12_Locale []
static const CaseUnfold_13_Type CaseUnfold_13 []
static struct st_hash_type type_code2_hash
static struct st_hash_type type_code3_hash
static st_tableFoldTable
static st_tableUnfold1Table
static st_tableUnfold2Table
static st_tableUnfold3Table
static int CaseFoldInited = 0

Define Documentation

#define CODE_RANGES_NUM   numberof(CodeRanges)

Definition at line 2039 of file unicode.c.

Referenced by onigenc_unicode_ctype_code_range(), and onigenc_unicode_is_code_ctype().

#define numberof ( array   )     (int)(sizeof(array) / sizeof((array)[0]))

Definition at line 2038 of file unicode.c.

#define ONIGENC_IS_UNICODE_ISO_8859_1_CTYPE ( code,
ctype   )     ((EncUNICODE_ISO_8859_1_CtypeTable[code] & CTYPE_TO_BIT(ctype)) != 0)

Definition at line 32 of file unicode.c.

Referenced by onigenc_unicode_is_code_ctype().

#define PROPERTY_NAME_MAX_SIZE   MAX_WORD_LENGTH

Definition at line 2083 of file unicode.c.

Referenced by onigenc_unicode_property_name_to_ctype().


Function Documentation

static int code2_cmp ( OnigCodePoint x,
OnigCodePoint y 
) [static]

Definition at line 2118 of file unicode.c.

static st_index_t code2_hash ( OnigCodePoint x  )  [static]

Definition at line 2125 of file unicode.c.

static int code3_cmp ( OnigCodePoint x,
OnigCodePoint y 
) [static]

Definition at line 2136 of file unicode.c.

static st_index_t code3_hash ( OnigCodePoint x  )  [static]

Definition at line 2143 of file unicode.c.

static int init_case_fold_table ( void   )  [static]
int onigenc_unicode_apply_all_case_fold ( OnigCaseFoldType  flag,
OnigApplyAllCaseFoldFunc  f,
void *  arg,
OnigEncoding enc  ARG_UNUSED 
)
int onigenc_unicode_ctype_code_range ( int  ctype,
const OnigCodePoint ranges[] 
)
int onigenc_unicode_get_case_fold_codes_by_str ( OnigEncoding  enc,
OnigCaseFoldType  flag,
const OnigUChar p,
const OnigUChar end,
OnigCaseFoldCodeItem  items[] 
)
int onigenc_unicode_is_code_ctype ( OnigCodePoint  code,
unsigned int  ctype,
OnigEncoding enc  ARG_UNUSED 
)
int onigenc_unicode_mbc_case_fold ( OnigEncoding  enc,
OnigCaseFoldType flag  ARG_UNUSED,
const UChar **  pp,
const UChar *  end,
UChar *  fold 
)
int onigenc_unicode_property_name_to_ctype ( OnigEncoding  enc,
UChar *  name,
UChar *  end 
)
int onigenc_utf16_32_get_ctype_code_range ( OnigCtype  ctype,
OnigCodePoint sb_out,
const OnigCodePoint ranges[],
struct OnigEncodingTypeST *enc  ARG_UNUSED 
)

Definition at line 2073 of file unicode.c.

References onigenc_unicode_ctype_code_range().


Variable Documentation

const CaseFold_11_Type CaseFold[] [static]

Definition at line 106 of file unicode.c.

Initial value:
 {
 { 0x0049, {1, {0x0069}}},
 { 0x0130, {2, {0x0069, 0x0307}}}
}

Definition at line 1088 of file unicode.c.

int CaseFoldInited = 0 [static]

Definition at line 1093 of file unicode.c.

Initial value:
 {
 { 0x0069, {1, {0x0049 }}}
}

Definition at line 1952 of file unicode.c.

Definition at line 1956 of file unicode.c.

Initial value:
 {
 { {0x0069, 0x0307}, {1, {0x0130 }}}
}

Definition at line 2017 of file unicode.c.

Initial value:
 {
 { {0x0066, 0x0066, 0x0069}, {1, {0xfb03 }}},
 { {0x0066, 0x0066, 0x006c}, {1, {0xfb04 }}},
 { {0x03b1, 0x0342, 0x03b9}, {1, {0x1fb7 }}},
 { {0x03b7, 0x0342, 0x03b9}, {1, {0x1fc7 }}},
 { {0x03b9, 0x0308, 0x0300}, {1, {0x1fd2 }}},
 { {0x03b9, 0x0308, 0x0301}, {2, {0x0390, 0x1fd3 }}},
 { {0x03b9, 0x0308, 0x0342}, {1, {0x1fd7 }}},
 { {0x03c5, 0x0308, 0x0300}, {1, {0x1fe2 }}},
 { {0x03c5, 0x0308, 0x0301}, {2, {0x03b0, 0x1fe3 }}},
 { {0x03c5, 0x0308, 0x0342}, {1, {0x1fe7 }}},
 { {0x03c5, 0x0313, 0x0300}, {1, {0x1f52 }}},
 { {0x03c5, 0x0313, 0x0301}, {1, {0x1f54 }}},
 { {0x03c5, 0x0313, 0x0342}, {1, {0x1f56 }}},
 { {0x03c9, 0x0342, 0x03b9}, {1, {0x1ff7 }}}
}

Definition at line 2021 of file unicode.c.

const unsigned short EncUNICODE_ISO_8859_1_CtypeTable[256] [static]

Definition at line 39 of file unicode.c.

st_table* FoldTable [static]

Definition at line 2154 of file unicode.c.

struct st_hash_type type_code2_hash [static]
Initial value:

Definition at line 2130 of file unicode.c.

struct st_hash_type type_code3_hash [static]
Initial value:

Definition at line 2148 of file unicode.c.

Definition at line 2155 of file unicode.c.

Definition at line 2156 of file unicode.c.

Definition at line 2157 of file unicode.c.


Generated on 27 Nov 2014 for Ruby by  doxygen 1.6.1