Ruby  2.5.0dev(2017-10-22revision60238)
Functions | Variables
regenc.c File Reference
#include "regint.h"

Go to the source code of this file.

Functions

int onigenc_init (void)
 
OnigEncoding onigenc_get_default_encoding (void)
 
int onigenc_set_default_encoding (OnigEncoding enc)
 
int onigenc_mbclen_approximate (const OnigUChar *p, const OnigUChar *e, OnigEncoding enc)
 
UCharonigenc_get_right_adjust_char_head (OnigEncoding enc, const UChar *start, const UChar *s, const UChar *end)
 
UCharonigenc_get_right_adjust_char_head_with_prev (OnigEncoding enc, const UChar *start, const UChar *s, const UChar *end, const UChar **prev)
 
UCharonigenc_get_prev_char_head (OnigEncoding enc, const UChar *start, const UChar *s, const UChar *end)
 
UCharonigenc_step_back (OnigEncoding enc, const UChar *start, const UChar *s, const UChar *end, int n)
 
UCharonigenc_step (OnigEncoding enc, const UChar *p, const UChar *end, int n)
 
int onigenc_strlen (OnigEncoding enc, const UChar *p, const UChar *end)
 
int onigenc_strlen_null (OnigEncoding enc, const UChar *s)
 
int onigenc_str_bytelen_null (OnigEncoding enc, const UChar *s)
 
UCharonigenc_get_left_adjust_char_head (OnigEncoding enc, const UChar *start, const UChar *s, const UChar *end)
 
int onigenc_ascii_apply_all_case_fold (OnigCaseFoldType flag ARG_UNUSED, OnigApplyAllCaseFoldFunc f, void *arg, OnigEncoding enc ARG_UNUSED)
 
int onigenc_ascii_get_case_fold_codes_by_str (OnigCaseFoldType flag ARG_UNUSED, const OnigUChar *p, const OnigUChar *end ARG_UNUSED, OnigCaseFoldCodeItem items[], OnigEncoding enc ARG_UNUSED)
 
int onigenc_apply_all_case_fold_with_map (int map_size, const OnigPairCaseFoldCodes map[], int ess_tsett_flag, OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void *arg)
 
int onigenc_get_case_fold_codes_by_str_with_map (int map_size, const OnigPairCaseFoldCodes map[], int ess_tsett_flag, OnigCaseFoldType flag ARG_UNUSED, const OnigUChar *p, const OnigUChar *end, OnigCaseFoldCodeItem items[])
 
int onigenc_not_support_get_ctype_code_range (OnigCtype ctype ARG_UNUSED, OnigCodePoint *sb_out ARG_UNUSED, const OnigCodePoint *ranges[] ARG_UNUSED, OnigEncoding enc)
 
int onigenc_is_mbc_newline_0x0a (const UChar *p, const UChar *end, OnigEncoding enc ARG_UNUSED)
 
int onigenc_ascii_mbc_case_fold (OnigCaseFoldType flag ARG_UNUSED, const UChar **p, const UChar *end, UChar *lower, OnigEncoding enc ARG_UNUSED)
 
int onigenc_single_byte_mbc_enc_len (const UChar *p ARG_UNUSED, const UChar *e ARG_UNUSED, OnigEncoding enc ARG_UNUSED)
 
OnigCodePoint onigenc_single_byte_mbc_to_code (const UChar *p, const UChar *end ARG_UNUSED, OnigEncoding enc ARG_UNUSED)
 
int onigenc_single_byte_code_to_mbclen (OnigCodePoint code ARG_UNUSED, OnigEncoding enc ARG_UNUSED)
 
int onigenc_single_byte_code_to_mbc (OnigCodePoint code, UChar *buf, OnigEncoding enc ARG_UNUSED)
 
UCharonigenc_single_byte_left_adjust_char_head (const UChar *start ARG_UNUSED, const UChar *s, const UChar *end ARG_UNUSED, OnigEncoding enc ARG_UNUSED)
 
int onigenc_always_true_is_allowed_reverse_match (const UChar *s ARG_UNUSED, const UChar *end ARG_UNUSED, OnigEncoding enc ARG_UNUSED)
 
int onigenc_always_false_is_allowed_reverse_match (const UChar *s ARG_UNUSED, const UChar *end ARG_UNUSED, OnigEncoding enc ARG_UNUSED)
 
int onigenc_ascii_is_code_ctype (OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
 
OnigCodePoint onigenc_mbn_mbc_to_code (OnigEncoding enc, const UChar *p, const UChar *end)
 
int onigenc_mbn_mbc_case_fold (OnigEncoding enc, OnigCaseFoldType flag ARG_UNUSED, const UChar **pp, const UChar *end ARG_UNUSED, UChar *lower)
 
int onigenc_mb2_code_to_mbclen (OnigCodePoint code, OnigEncoding enc ARG_UNUSED)
 
int onigenc_mb4_code_to_mbclen (OnigCodePoint code, OnigEncoding enc ARG_UNUSED)
 
int onigenc_mb2_code_to_mbc (OnigEncoding enc, OnigCodePoint code, UChar *buf)
 
int onigenc_mb4_code_to_mbc (OnigEncoding enc, OnigCodePoint code, UChar *buf)
 
int onigenc_minimum_property_name_to_ctype (OnigEncoding enc, const UChar *p, const UChar *end)
 
int onigenc_mb2_is_code_ctype (OnigEncoding enc, OnigCodePoint code, unsigned int ctype)
 
int onigenc_mb4_is_code_ctype (OnigEncoding enc, OnigCodePoint code, unsigned int ctype)
 
int onigenc_with_ascii_strncmp (OnigEncoding enc, const UChar *p, const UChar *end, const UChar *sascii, int n)
 
int onigenc_with_ascii_strnicmp (OnigEncoding enc, const UChar *p, const UChar *end, const UChar *sascii, int n)
 
int onigenc_ascii_only_case_map (OnigCaseFoldType *flagP, const OnigUChar **pp, const OnigUChar *end, OnigUChar *to, OnigUChar *to_end, const struct OnigEncodingTypeST *enc)
 
int onigenc_single_byte_ascii_only_case_map (OnigCaseFoldType *flagP, const OnigUChar **pp, const OnigUChar *end, OnigUChar *to, OnigUChar *to_end, const struct OnigEncodingTypeST *enc)
 

Variables

OnigEncoding OnigEncDefaultCharEncoding = ONIG_ENCODING_INIT_DEFAULT
 
const UChar OnigEncAsciiToLowerCaseTable []
 
const UChar OnigEncAsciiToUpperCaseTable [256]
 
const unsigned short OnigEncAsciiCtypeTable [256]
 
const UChar OnigEncISO_8859_1_ToLowerCaseTable [256]
 
const UChar OnigEncISO_8859_1_ToUpperCaseTable [256]
 
const OnigPairCaseFoldCodes OnigAsciiLowerMap []
 

Function Documentation

◆ onigenc_always_false_is_allowed_reverse_match()

int onigenc_always_false_is_allowed_reverse_match ( const UChar *s  ARG_UNUSED,
const UChar *end  ARG_UNUSED,
OnigEncoding enc  ARG_UNUSED 
)

Definition at line 662 of file regenc.c.

References FALSE.

◆ onigenc_always_true_is_allowed_reverse_match()

int onigenc_always_true_is_allowed_reverse_match ( const UChar *s  ARG_UNUSED,
const UChar *end  ARG_UNUSED,
OnigEncoding enc  ARG_UNUSED 
)

Definition at line 654 of file regenc.c.

References TRUE.

◆ onigenc_apply_all_case_fold_with_map()

int onigenc_apply_all_case_fold_with_map ( int  map_size,
const OnigPairCaseFoldCodes  map[],
int  ess_tsett_flag,
OnigCaseFoldType  flag,
OnigApplyAllCaseFoldFunc  f,
void *  arg 
)

◆ onigenc_ascii_apply_all_case_fold()

int onigenc_ascii_apply_all_case_fold ( OnigCaseFoldType flag  ARG_UNUSED,
OnigApplyAllCaseFoldFunc  f,
void *  arg,
OnigEncoding enc  ARG_UNUSED 
)

◆ onigenc_ascii_get_case_fold_codes_by_str()

int onigenc_ascii_get_case_fold_codes_by_str ( OnigCaseFoldType flag  ARG_UNUSED,
const OnigUChar p,
const OnigUChar *end  ARG_UNUSED,
OnigCaseFoldCodeItem  items[],
OnigEncoding enc  ARG_UNUSED 
)

◆ onigenc_ascii_is_code_ctype()

int onigenc_ascii_is_code_ctype ( OnigCodePoint  code,
unsigned int  ctype,
OnigEncoding enc  ARG_UNUSED 
)

Definition at line 670 of file regenc.c.

References FALSE, and ONIGENC_IS_ASCII_CODE_CTYPE.

◆ onigenc_ascii_mbc_case_fold()

int onigenc_ascii_mbc_case_fold ( OnigCaseFoldType flag  ARG_UNUSED,
const UChar **  p,
const UChar end,
UChar lower,
OnigEncoding enc  ARG_UNUSED 
)

◆ onigenc_ascii_only_case_map()

int onigenc_ascii_only_case_map ( OnigCaseFoldType flagP,
const OnigUChar **  pp,
const OnigUChar end,
OnigUChar to,
OnigUChar to_end,
const struct OnigEncodingTypeST enc 
)

◆ onigenc_get_case_fold_codes_by_str_with_map()

int onigenc_get_case_fold_codes_by_str_with_map ( int  map_size,
const OnigPairCaseFoldCodes  map[],
int  ess_tsett_flag,
OnigCaseFoldType flag  ARG_UNUSED,
const OnigUChar p,
const OnigUChar end,
OnigCaseFoldCodeItem  items[] 
)

◆ onigenc_get_default_encoding()

OnigEncoding onigenc_get_default_encoding ( void  )

Definition at line 42 of file regenc.c.

References OnigEncDefaultCharEncoding.

◆ onigenc_get_left_adjust_char_head()

UChar* onigenc_get_left_adjust_char_head ( OnigEncoding  enc,
const UChar start,
const UChar s,
const UChar end 
)

Definition at line 377 of file regenc.c.

References ONIGENC_LEFT_ADJUST_CHAR_HEAD.

◆ onigenc_get_prev_char_head()

UChar* onigenc_get_prev_char_head ( OnigEncoding  enc,
const UChar start,
const UChar s,
const UChar end 
)

Definition at line 92 of file regenc.c.

References NULL, ONIGENC_LEFT_ADJUST_CHAR_HEAD, and UChar.

◆ onigenc_get_right_adjust_char_head()

UChar* onigenc_get_right_adjust_char_head ( OnigEncoding  enc,
const UChar start,
const UChar s,
const UChar end 
)

Definition at line 66 of file regenc.c.

References enclen, ONIGENC_LEFT_ADJUST_CHAR_HEAD, and UChar.

◆ onigenc_get_right_adjust_char_head_with_prev()

UChar* onigenc_get_right_adjust_char_head_with_prev ( OnigEncoding  enc,
const UChar start,
const UChar s,
const UChar end,
const UChar **  prev 
)

Definition at line 76 of file regenc.c.

References enclen, NULL, ONIGENC_LEFT_ADJUST_CHAR_HEAD, and UChar.

◆ onigenc_init()

int onigenc_init ( void  )

Definition at line 36 of file regenc.c.

Referenced by onig_init().

◆ onigenc_is_mbc_newline_0x0a()

int onigenc_is_mbc_newline_0x0a ( const UChar p,
const UChar end,
OnigEncoding enc  ARG_UNUSED 
)

Definition at line 582 of file regenc.c.

◆ onigenc_mb2_code_to_mbc()

int onigenc_mb2_code_to_mbc ( OnigEncoding  enc,
OnigCodePoint  code,
UChar buf 
)

Definition at line 757 of file regenc.c.

References buf, enclen, ONIGERR_INVALID_CODE_POINT_VALUE, and UChar.

◆ onigenc_mb2_code_to_mbclen()

int onigenc_mb2_code_to_mbclen ( OnigCodePoint  code,
OnigEncoding enc  ARG_UNUSED 
)

Definition at line 740 of file regenc.c.

References ONIGERR_TOO_BIG_WIDE_CHAR_VALUE.

◆ onigenc_mb2_is_code_ctype()

int onigenc_mb2_is_code_ctype ( OnigEncoding  enc,
OnigCodePoint  code,
unsigned int  ctype 
)

◆ onigenc_mb4_code_to_mbc()

int onigenc_mb4_code_to_mbc ( OnigEncoding  enc,
OnigCodePoint  code,
UChar buf 
)

Definition at line 774 of file regenc.c.

References buf, enclen, ONIGERR_INVALID_CODE_POINT_VALUE, and UChar.

◆ onigenc_mb4_code_to_mbclen()

int onigenc_mb4_code_to_mbclen ( OnigCodePoint  code,
OnigEncoding enc  ARG_UNUSED 
)

Definition at line 748 of file regenc.c.

◆ onigenc_mb4_is_code_ctype()

int onigenc_mb4_is_code_ctype ( OnigEncoding  enc,
OnigCodePoint  code,
unsigned int  ctype 
)

◆ onigenc_mbclen_approximate()

int onigenc_mbclen_approximate ( const OnigUChar p,
const OnigUChar e,
OnigEncoding  enc 
)

◆ onigenc_mbn_mbc_case_fold()

int onigenc_mbn_mbc_case_fold ( OnigEncoding  enc,
OnigCaseFoldType flag  ARG_UNUSED,
const UChar **  pp,
const UChar *end  ARG_UNUSED,
UChar lower 
)

◆ onigenc_mbn_mbc_to_code()

OnigCodePoint onigenc_mbn_mbc_to_code ( OnigEncoding  enc,
const UChar p,
const UChar end 
)

Definition at line 680 of file regenc.c.

References enclen, and len.

◆ onigenc_minimum_property_name_to_ctype()

int onigenc_minimum_property_name_to_ctype ( OnigEncoding  enc,
const UChar p,
const UChar end 
)

◆ onigenc_not_support_get_ctype_code_range()

int onigenc_not_support_get_ctype_code_range ( OnigCtype ctype  ARG_UNUSED,
OnigCodePoint *sb_out  ARG_UNUSED,
const OnigCodePoint *ranges []  ARG_UNUSED,
OnigEncoding  enc 
)

Definition at line 573 of file regenc.c.

References ONIG_NO_SUPPORT_CONFIG.

◆ onigenc_set_default_encoding()

int onigenc_set_default_encoding ( OnigEncoding  enc)

Definition at line 48 of file regenc.c.

Referenced by Init_Regexp().

◆ onigenc_single_byte_ascii_only_case_map()

int onigenc_single_byte_ascii_only_case_map ( OnigCaseFoldType flagP,
const OnigUChar **  pp,
const OnigUChar end,
OnigUChar to,
OnigUChar to_end,
const struct OnigEncodingTypeST enc 
)

◆ onigenc_single_byte_code_to_mbc()

int onigenc_single_byte_code_to_mbc ( OnigCodePoint  code,
UChar buf,
OnigEncoding enc  ARG_UNUSED 
)

Definition at line 634 of file regenc.c.

References rb_eRangeError, rb_raise(), and UChar.

◆ onigenc_single_byte_code_to_mbclen()

int onigenc_single_byte_code_to_mbclen ( OnigCodePoint code  ARG_UNUSED,
OnigEncoding enc  ARG_UNUSED 
)

Definition at line 628 of file regenc.c.

◆ onigenc_single_byte_left_adjust_char_head()

UChar* onigenc_single_byte_left_adjust_char_head ( const UChar *start  ARG_UNUSED,
const UChar s,
const UChar *end  ARG_UNUSED,
OnigEncoding enc  ARG_UNUSED 
)

Definition at line 645 of file regenc.c.

References UChar.

◆ onigenc_single_byte_mbc_enc_len()

int onigenc_single_byte_mbc_enc_len ( const UChar *p  ARG_UNUSED,
const UChar *e  ARG_UNUSED,
OnigEncoding enc  ARG_UNUSED 
)

Definition at line 614 of file regenc.c.

◆ onigenc_single_byte_mbc_to_code()

OnigCodePoint onigenc_single_byte_mbc_to_code ( const UChar p,
const UChar *end  ARG_UNUSED,
OnigEncoding enc  ARG_UNUSED 
)

Definition at line 621 of file regenc.c.

◆ onigenc_step()

UChar* onigenc_step ( OnigEncoding  enc,
const UChar p,
const UChar end,
int  n 
)

Definition at line 113 of file regenc.c.

References NULL, ONIGENC_MBC_ENC_LEN, and UChar.

◆ onigenc_step_back()

UChar* onigenc_step_back ( OnigEncoding  enc,
const UChar start,
const UChar s,
const UChar end,
int  n 
)

Definition at line 101 of file regenc.c.

References NULL, ONIG_IS_NOT_NULL, ONIGENC_LEFT_ADJUST_CHAR_HEAD, and UChar.

◆ onigenc_str_bytelen_null()

int onigenc_str_bytelen_null ( OnigEncoding  enc,
const UChar s 
)

Definition at line 163 of file regenc.c.

References len, ONIGENC_MBC_ENC_LEN, ONIGENC_MBC_MAXLEN, ONIGENC_MBC_MINLEN, and UChar.

◆ onigenc_strlen()

int onigenc_strlen ( OnigEncoding  enc,
const UChar p,
const UChar end 
)

Definition at line 123 of file regenc.c.

References ONIGENC_MBC_ENC_LEN, and UChar.

Referenced by onigenc_minimum_property_name_to_ctype().

◆ onigenc_strlen_null()

int onigenc_strlen_null ( OnigEncoding  enc,
const UChar s 
)

Definition at line 136 of file regenc.c.

References len, ONIGENC_MBC_ENC_LEN, ONIGENC_MBC_MAXLEN, ONIGENC_MBC_MINLEN, and UChar.

◆ onigenc_with_ascii_strncmp()

int onigenc_with_ascii_strncmp ( OnigEncoding  enc,
const UChar p,
const UChar end,
const UChar sascii,
int  n 
)

Definition at line 860 of file regenc.c.

References enclen, and ONIGENC_MBC_TO_CODE.

◆ onigenc_with_ascii_strnicmp()

int onigenc_with_ascii_strnicmp ( OnigEncoding  enc,
const UChar p,
const UChar end,
const UChar sascii,
int  n 
)

Variable Documentation

◆ OnigAsciiLowerMap

const OnigPairCaseFoldCodes OnigAsciiLowerMap[]
Initial value:
= {
{ 0x41, 0x61 },
{ 0x42, 0x62 },
{ 0x43, 0x63 },
{ 0x44, 0x64 },
{ 0x45, 0x65 },
{ 0x46, 0x66 },
{ 0x47, 0x67 },
{ 0x48, 0x68 },
{ 0x49, 0x69 },
{ 0x4a, 0x6a },
{ 0x4b, 0x6b },
{ 0x4c, 0x6c },
{ 0x4d, 0x6d },
{ 0x4e, 0x6e },
{ 0x4f, 0x6f },
{ 0x50, 0x70 },
{ 0x51, 0x71 },
{ 0x52, 0x72 },
{ 0x53, 0x73 },
{ 0x54, 0x74 },
{ 0x55, 0x75 },
{ 0x56, 0x76 },
{ 0x57, 0x77 },
{ 0x58, 0x78 },
{ 0x59, 0x79 },
{ 0x5a, 0x7a }
}

Definition at line 382 of file regenc.c.

◆ OnigEncAsciiCtypeTable

const unsigned short OnigEncAsciiCtypeTable[256]

Definition at line 260 of file regenc.c.

◆ OnigEncAsciiToLowerCaseTable

const UChar OnigEncAsciiToLowerCaseTable[]

Definition at line 188 of file regenc.c.

◆ OnigEncAsciiToUpperCaseTable

const UChar OnigEncAsciiToUpperCaseTable[256]

Definition at line 224 of file regenc.c.

◆ OnigEncDefaultCharEncoding

OnigEncoding OnigEncDefaultCharEncoding = ONIG_ENCODING_INIT_DEFAULT

Definition at line 33 of file regenc.c.

Referenced by onigenc_get_default_encoding().

◆ OnigEncISO_8859_1_ToLowerCaseTable

const UChar OnigEncISO_8859_1_ToLowerCaseTable[256]

Definition at line 295 of file regenc.c.

◆ OnigEncISO_8859_1_ToUpperCaseTable

const UChar OnigEncISO_8859_1_ToUpperCaseTable[256]

Definition at line 331 of file regenc.c.