euc_jp.c File Reference
`#include "regint.h"`

Go to the source code of this file.

## Macros

#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,
FAILURE = -2, ACCEPT = -1, S0 = 0, S1,
FAILURE = -2, ACCEPT = -1, S0 = 0, S1,
S2, S3, S4, S5,
S6, FAILURE = -2, ACCEPT = -1, S0 = 0,
S1, S2, FAILURE = -2, ACCEPT = -1,
S0 = 0, S1, FAILURE = -2, ACCEPT = -1,
S0 = 0, S1, S2, S3,
FAILURE = -2, ACCEPT = -1, S0 = 0, S1,
S2, S3, FAILURE = -2, ACCEPT = -1,
S0 = 0, S1, FAILURE = -2, ACCEPT = -1,
S0 = 0, S1, FAILURE = -2, ACCEPT,
S0, S1, S2, S3,
S4, S5, S6, S7
}

## 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 | 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 int | PropertyInited = 0
static const OnigCodePoint ** | PropertyList
static int | PropertyListNum
static int | PropertyListSize
static hash_table_type * | PropertyNameTable
static const OnigCodePoint | CR_Hiragana []
static const OnigCodePoint | CR_Katakana []

## Macro Definition Documentation

#define A ACCEPT

Definition at line 55 of file euc_jp.c.

#define eucjp_islead | ( |  | c | ) | ((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 |
FAILURE |
ACCEPT |
S0 |
S1 |
FAILURE |
ACCEPT |
S0 |
S1 |
S2 |
S3 |
S4 |
S5 |
S6 |
FAILURE |
ACCEPT |
S0 |
S1 |
S2 |
FAILURE |
ACCEPT |
S0 |
S1 |
FAILURE |
ACCEPT |
S0 |
S1 |
S2 |
S3 |
FAILURE |
ACCEPT |
S0 |
S1 |
S2 |
S3 |
FAILURE |
ACCEPT |
S0 |
S1 |
FAILURE |
ACCEPT |
S0 |
S1 |
FAILURE |
ACCEPT |
S0 |
S1 |
S2 |
S3 |
S4 |
S5 |
S6 |
S7 |

Definition at line 54 of file euc_jp.c.

## Function Documentation

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

static

Definition at line 185 of file euc_jp.c.

References buf, enclen, ONIGERR_INVALID_CODE_POINT_VALUE, p, and UChar.

static int code_to_mbclen | ( | OnigCodePoint | code,
|  | OnigEncoding enc | ARG_UNUSED
| ) |  |

static

Definition at line 154 of file euc_jp.c.

References ONIGENC_IS_CODE_ASCII, ONIGERR_INVALID_CODE_POINT_VALUE, and ONIGERR_TOO_BIG_WIDE_CHAR_VALUE.

Referenced by is_code_ctype().

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

static

Definition at line 332 of file euc_jp.c.

References ONIG_NO_SUPPORT_CONFIG, ONIGENC_MAX_STD_CTYPE, ONIGERR_TYPE_BUG, PROPERTY_LIST_INIT_CHECK, and PropertyListNum.

static int init_property_list | ( | void |  | ) |

static

Definition at line 274 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 245 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 307 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, PropertyListNum, TRUE, and UChar.

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

static

Definition at line 226 of file euc_jp.c.

References enclen, eucjp_islead, len, p, and UChar.

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

static

Definition at line 201 of file euc_jp.c.

References enclen, i, len, ONIGENC_ASCII_CODE_TO_LOWER_CASE, ONIGENC_IS_MBC_ASCII, p, and UChar.

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

static

Definition at line 118 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 136 of file euc_jp.c.

References enclen, i, and len.

OnigEncodingDefine | ( | euc_jp | ,
|  | EUC_JP |
| ) |  |

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

static

Definition at line 287 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, and UChar.

## Variable Documentation

const OnigCodePoint CR_Hiragana[]

static

Initial value:
= {
1,
0xa4a1, 0xa4f3
}

Definition at line 261 of file euc_jp.c.

const OnigCodePoint CR_Katakana[]

static

Initial value:
= {
3,
0xa5a1, 0xa5f6,
0xaaa6, 0xaaaf,
0xaab1, 0xaadd
}

Definition at line 266 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 255 of file euc_jp.c.

const OnigCodePoint** PropertyList

static

Definition at line 256 of file euc_jp.c.

int PropertyListNum

static

Definition at line 257 of file euc_jp.c.

Referenced by get_ctype_code_range(), and is_code_ctype().

int PropertyListSize

static

Definition at line 258 of file euc_jp.c.

hash_table_type* PropertyNameTable

static

Definition at line 259 of file euc_jp.c.

const signed char trans[][0x100]

static

Definition at line 57 of file euc_jp.c.

Referenced by mbc_enc_len().