enc/euc_jp.c File Reference

#include "regint.h"

Go to the source code of this file.

Defines

#define eucjp_islead(c)   ((UChar )((c) - 0xa1) > 0xfe - 0xa1)
#define A   ACCEPT
#define F   FAILURE

Enumerations

enum  state_t {
  FAILURE = -2, ACCEPT = -1, S0 = 0, S1,
  S2
}

Functions

static int mbc_enc_len (const UChar *p, const UChar *e, OnigEncoding enc ARG_UNUSED)
static OnigCodePoint mbc_to_code (const UChar *p, const UChar *end, OnigEncoding enc)
static int code_to_mbclen (OnigCodePoint code, OnigEncoding enc ARG_UNUSED)
static int code_to_mbc (OnigCodePoint code, UChar *buf, OnigEncoding enc)
static int apply_all_case_fold (OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void *arg, OnigEncoding enc)
static OnigCodePoint get_lower_case (OnigCodePoint code)
static OnigCodePoint get_upper_case (OnigCodePoint code)
static int get_case_fold_codes_by_str (OnigCaseFoldType flag, const OnigUChar *p, const OnigUChar *end, OnigCaseFoldCodeItem items[], OnigEncoding enc)
static int mbc_case_fold (OnigCaseFoldType flag, const UChar **pp, const UChar *end, UChar *lower, OnigEncoding enc)
static UChar * left_adjust_char_head (const UChar *start, const UChar *s, const UChar *end, OnigEncoding enc)
static int is_allowed_reverse_match (const UChar *s, const UChar *end, OnigEncoding enc ARG_UNUSED)
static int init_property_list (void)
static int property_name_to_ctype (OnigEncoding enc, UChar *p, UChar *end)
static int is_code_ctype (OnigCodePoint code, unsigned int ctype, OnigEncoding enc ARG_UNUSED)
static int get_ctype_code_range (OnigCtype ctype, OnigCodePoint *sb_out, const OnigCodePoint *ranges[], OnigEncoding enc ARG_UNUSED)
 OnigEncodingDefine (euc_jp, EUC_JP)

Variables

static const int EncLen_EUCJP []
static const signed char trans [][0x100]
static const OnigPairCaseFoldCodes CaseFoldMap []
static int PropertyInited = 0
static const OnigCodePoint ** PropertyList
static int PropertyListNum
static int PropertyListSize
static hash_table_typePropertyNameTable
static const OnigCodePoint CR_Hiragana []
static const OnigCodePoint CR_Katakana []
static const OnigCodePoint CR_Han []
static const OnigCodePoint CR_Latin []
static const OnigCodePoint CR_Greek []
static const OnigCodePoint CR_Cyrillic []


Define Documentation

#define A   ACCEPT

Definition at line 55 of file euc_jp.c.

#define eucjp_islead (  )     ((UChar )((c) - 0xa1) > 0xfe - 0xa1)

Definition at line 33 of file euc_jp.c.

Referenced by left_adjust_char_head().

#define F   FAILURE

Definition at line 56 of file euc_jp.c.


Enumeration Type Documentation

enum state_t

Enumerator:
FAILURE 
ACCEPT 
S0 
S1 
S2 

Definition at line 54 of file euc_jp.c.


Function Documentation

static int apply_all_case_fold ( OnigCaseFoldType  flag,
OnigApplyAllCaseFoldFunc  f,
void *  arg,
OnigEncoding enc   
) [static]

Definition at line 292 of file euc_jp.c.

References CaseFoldMap, and onigenc_apply_all_case_fold_with_map().

static int code_to_mbc ( OnigCodePoint  code,
UChar *  buf,
OnigEncoding enc   
) [static]

Definition at line 276 of file euc_jp.c.

References mbc_enc_len(), ONIGERR_INVALID_CODE_POINT_VALUE, and UChar.

static int code_to_mbclen ( OnigCodePoint  code,
OnigEncoding enc  ARG_UNUSED 
) [static]

Definition at line 245 of file euc_jp.c.

References ONIGENC_IS_CODE_ASCII, ONIGERR_INVALID_CODE_POINT_VALUE, and ONIGERR_TOO_BIG_WIDE_CHAR_VALUE.

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

Definition at line 337 of file euc_jp.c.

References OnigCaseFoldCodeItem::byte_len, OnigCaseFoldCodeItem::code, OnigCaseFoldCodeItem::code_len, get_lower_case(), get_upper_case(), len, mbc_enc_len(), mbc_to_code(), onigenc_ascii_get_case_fold_codes_by_str(), and ONIGENC_IS_ASCII_CODE.

static int get_ctype_code_range ( OnigCtype  ctype,
OnigCodePoint sb_out,
const OnigCodePoint ranges[],
OnigEncoding enc  ARG_UNUSED 
) [static]

Definition at line 570 of file euc_jp.c.

References ONIG_NO_SUPPORT_CONFIG, ONIGENC_MAX_STD_CTYPE, ONIGERR_TYPE_BUG, and PROPERTY_LIST_INIT_CHECK.

static OnigCodePoint get_lower_case ( OnigCodePoint  code  )  [static]

Definition at line 301 of file euc_jp.c.

References ONIGENC_IS_IN_RANGE.

Referenced by get_case_fold_codes_by_str(), and mbc_case_fold().

static OnigCodePoint get_upper_case ( OnigCodePoint  code  )  [static]

Definition at line 319 of file euc_jp.c.

References ONIGENC_IS_IN_RANGE.

Referenced by get_case_fold_codes_by_str().

static int init_property_list ( void   )  [static]

Definition at line 508 of file euc_jp.c.

References PROPERTY_LIST_ADD_PROP.

static int is_allowed_reverse_match ( const UChar *  s,
const UChar *  end,
OnigEncoding enc  ARG_UNUSED 
) [static]

Definition at line 411 of file euc_jp.c.

References FALSE, TRUE, and UChar.

static int is_code_ctype ( OnigCodePoint  code,
unsigned int  ctype,
OnigEncoding enc  ARG_UNUSED 
) [static]

Definition at line 545 of file euc_jp.c.

References code_to_mbclen(), CTYPE_IS_WORD_GRAPH_PRINT, FALSE, onig_is_in_code_range(), ONIGENC_IS_ASCII_CODE_CTYPE, ONIGENC_MAX_STD_CTYPE, ONIGERR_TYPE_BUG, PROPERTY_LIST_INIT_CHECK, TRUE, and UChar.

static UChar* left_adjust_char_head ( const UChar *  start,
const UChar *  s,
const UChar *  end,
OnigEncoding enc   
) [static]

Definition at line 392 of file euc_jp.c.

References eucjp_islead, len, mbc_enc_len(), and UChar.

static int mbc_case_fold ( OnigCaseFoldType  flag,
const UChar **  pp,
const UChar *  end,
UChar *  lower,
OnigEncoding  enc 
) [static]

Definition at line 369 of file euc_jp.c.

References code_to_mbc(), get_lower_case(), len, mbc_to_code(), ONIGENC_ASCII_CODE_TO_LOWER_CASE, ONIGENC_IS_MBC_ASCII, and UChar.

static int mbc_enc_len ( const UChar *  p,
const UChar *  e,
OnigEncoding enc  ARG_UNUSED 
) [static]

Definition at line 209 of file euc_jp.c.

References ACCEPT, EncLen_EUCJP, ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND, ONIGENC_CONSTRUCT_MBCLEN_INVALID, ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE, and trans.

static OnigCodePoint mbc_to_code ( const UChar *  p,
const UChar *  end,
OnigEncoding  enc 
) [static]

Definition at line 227 of file euc_jp.c.

References len, and mbc_enc_len().

OnigEncodingDefine ( euc_jp  ,
EUC_JP   
)

static int property_name_to_ctype ( OnigEncoding  enc,
UChar *  p,
UChar *  end 
) [static]

Definition at line 525 of file euc_jp.c.

References ALLOCA_N, onig_st_lookup_strend(), ONIGENC_ASCII_CODE_TO_LOWER_CASE, onigenc_minimum_property_name_to_ctype(), PROPERTY_LIST_INIT_CHECK, st_data_t, and UChar.


Variable Documentation

const OnigPairCaseFoldCodes CaseFoldMap[] [static]

Definition at line 117 of file euc_jp.c.

Referenced by apply_all_case_fold(), cp1251_apply_all_case_fold(), cp1251_get_case_fold_codes_by_str(), get_case_fold_codes_by_str(), koi8_r_apply_all_case_fold(), koi8_r_get_case_fold_codes_by_str(), koi8_u_apply_all_case_fold(), and koi8_u_get_case_fold_codes_by_str().

const OnigCodePoint CR_Cyrillic[] [static]

Initial value:

 {
  2,
  0xa7a1, 0xa7c1,
  0xa7d1, 0xa7f1,
  
}

Definition at line 500 of file euc_jp.c.

const OnigCodePoint CR_Greek[] [static]

Initial value:

 {
  2,
  0xa6a1, 0xa6b8,



  0xa6c1, 0xa6d8,
  

}

Definition at line 489 of file euc_jp.c.

const OnigCodePoint CR_Han[] [static]

Initial value:

 {
  
  4,
  0xa1b8, 0xa1b8,
  0xb0a1, 0xcfd3,       
  0xd0a1, 0xf4a6,       
  0x8fb0a1, 0x8fedf3    
}

Definition at line 469 of file euc_jp.c.

const OnigCodePoint CR_Hiragana[] [static]

Initial value:

 {
  1,



  0xa4a1, 0xa4f3

}

Definition at line 427 of file euc_jp.c.

const OnigCodePoint CR_Katakana[] [static]

Initial value:

 {
  3,
  0x8ea6, 0x8eaf,       
  0x8eb1, 0x8edd,       
  0xa5a1, 0xa5f6,
}

Definition at line 446 of file euc_jp.c.

const OnigCodePoint CR_Latin[] [static]

Initial value:

 {
  4,
  0x0041, 0x005a,
  0x0061, 0x007a,
  0xa3c1, 0xa3da,
  0xa3e1, 0xa3fa,
  
  
}

Definition at line 479 of file euc_jp.c.

const int EncLen_EUCJP[] [static]

Initial value:

 {
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  1, 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, 1
}

Definition at line 35 of file euc_jp.c.

Referenced by mbc_enc_len().

int PropertyInited = 0 [static]

Definition at line 421 of file euc_jp.c.

const OnigCodePoint** PropertyList [static]

Definition at line 422 of file euc_jp.c.

int PropertyListNum [static]

Definition at line 423 of file euc_jp.c.

int PropertyListSize [static]

Definition at line 424 of file euc_jp.c.

hash_table_type* PropertyNameTable [static]

Definition at line 425 of file euc_jp.c.

const signed char trans[][0x100] [static]

Definition at line 57 of file euc_jp.c.


Generated on 19 Jul 2016 for Ruby by  doxygen 1.4.7