Ruby  1.9.3p547(2014-05-14revision45962)
Macros | Functions | Variables
utf_16be.c File Reference
#include "regenc.h"
Include dependency graph for utf_16be.c:

Go to the source code of this file.

Macros

#define UTF16_IS_SURROGATE_FIRST(c)   (((c) & 0xfc) == 0xd8)
 
#define UTF16_IS_SURROGATE_SECOND(c)   (((c) & 0xfc) == 0xdc)
 
#define UTF16_IS_SURROGATE(c)   (((c) & 0xf8) == 0xd8)
 

Functions

static int utf16be_mbc_enc_len (const UChar *p, const OnigUChar *e ARG_UNUSED, OnigEncoding enc ARG_UNUSED)
 
static int utf16be_is_mbc_newline (const UChar *p, const UChar *end, OnigEncoding enc)
 
static OnigCodePoint utf16be_mbc_to_code (const UChar *p, const UChar *end ARG_UNUSED, OnigEncoding enc)
 
static int utf16be_code_to_mbclen (OnigCodePoint code, OnigEncoding enc)
 
static int utf16be_code_to_mbc (OnigCodePoint code, UChar *buf, OnigEncoding enc)
 
static int utf16be_mbc_case_fold (OnigCaseFoldType flag, const UChar **pp, const UChar *end, UChar *fold, OnigEncoding enc)
 
static UCharutf16be_left_adjust_char_head (const UChar *start, const UChar *s, const UChar *end, OnigEncoding enc ARG_UNUSED)
 
static int utf16be_get_case_fold_codes_by_str (OnigCaseFoldType flag, const OnigUChar *p, const OnigUChar *end, OnigCaseFoldCodeItem items[], OnigEncoding enc)
 
 OnigEncodingDefine (utf_16be, UTF_16BE)
 

Variables

static const int EncLen_UTF16 []
 

Macro Definition Documentation

#define UTF16_IS_SURROGATE (   c)    (((c) & 0xf8) == 0xd8)

Definition at line 34 of file utf_16be.c.

Referenced by utf16be_mbc_enc_len().

#define UTF16_IS_SURROGATE_FIRST (   c)    (((c) & 0xfc) == 0xd8)

Definition at line 32 of file utf_16be.c.

Referenced by utf16be_mbc_enc_len(), and utf16be_mbc_to_code().

#define UTF16_IS_SURROGATE_SECOND (   c)    (((c) & 0xfc) == 0xdc)

Definition at line 33 of file utf_16be.c.

Referenced by utf16be_left_adjust_char_head(), and utf16be_mbc_enc_len().

Function Documentation

OnigEncodingDefine ( utf_16be  ,
UTF_16BE   
)
static int utf16be_code_to_mbc ( OnigCodePoint  code,
UChar buf,
OnigEncoding  enc 
)
static

Definition at line 128 of file utf_16be.c.

References buf, p, and UChar.

static int utf16be_code_to_mbclen ( OnigCodePoint  code,
OnigEncoding  enc 
)
static

Definition at line 121 of file utf_16be.c.

static int utf16be_get_case_fold_codes_by_str ( OnigCaseFoldType  flag,
const OnigUChar p,
const OnigUChar end,
OnigCaseFoldCodeItem  items[],
OnigEncoding  enc 
)
static

Definition at line 230 of file utf_16be.c.

References onigenc_unicode_get_case_fold_codes_by_str().

static int utf16be_is_mbc_newline ( const UChar p,
const UChar end,
OnigEncoding  enc 
)
static

Definition at line 84 of file utf_16be.c.

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

Definition at line 214 of file utf_16be.c.

References UChar, and UTF16_IS_SURROGATE_SECOND.

static int utf16be_mbc_case_fold ( OnigCaseFoldType  flag,
const UChar **  pp,
const UChar end,
UChar fold,
OnigEncoding  enc 
)
static
static int utf16be_mbc_enc_len ( const UChar p,
const OnigUChar *e  ARG_UNUSED,
OnigEncoding enc  ARG_UNUSED 
)
static
static OnigCodePoint utf16be_mbc_to_code ( const UChar p,
const UChar *end  ARG_UNUSED,
OnigEncoding  enc 
)
static

Definition at line 105 of file utf_16be.c.

References UTF16_IS_SURROGATE_FIRST.

Variable Documentation

const int EncLen_UTF16[]
static
Initial value:
= {
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 4, 4, 4, 4, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
}

Definition at line 36 of file utf_16be.c.