Ruby 1.9.2p136(2010-12-25revision30365)

- Main Page
- Modules
- Data Structures
- Files

- File List
- Globals

Defines | Enumerations | Functions | Variables

# enc/cp949.c File Reference

`#include "regenc.h"`
Include dependency graph for cp949.c:

Go to the source code of this file.

## Defines
#define | CP949_ISMB_FIRST(byte) (EncLen_CP949[byte] > 1)
#define | CP949_ISMB_TRAIL(byte) CP949_CAN_BE_TRAIL_TABLE[(byte)]
#define | A ACCEPT
#define | F FAILURE
#define | RETURN(n)
## 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 | cp949_mbc_enc_len (const UChar *p, const UChar *e, OnigEncoding enc ARG_UNUSED)
static OnigCodePoint | cp949_mbc_to_code (const UChar *p, const UChar *end, OnigEncoding enc)
static int | cp949_code_to_mbc (OnigCodePoint code, UChar *buf, OnigEncoding enc)
static int | cp949_mbc_case_fold (OnigCaseFoldType flag, const UChar **pp, const UChar *end, UChar *lower, OnigEncoding enc)
static int | cp949_is_code_ctype (OnigCodePoint code, unsigned int ctype, OnigEncoding enc)
static UChar * | cp949_left_adjust_char_head (const UChar *start, const UChar *s, const UChar *end, OnigEncoding enc)
static int | cp949_is_allowed_reverse_match (const UChar *s, const UChar *end ARG_UNUSED, OnigEncoding enc ARG_UNUSED)
| OnigEncodingDefine (cp949, CP949)
## Variables
static const int | EncLen_CP949 []
static const char | CP949_CAN_BE_TRAIL_TABLE [256]
static const signed char | trans [][0x100]

## Define Documentation

#define A ACCEPT

Definition at line 74 of file cp949.c.

#define CP949_ISMB_FIRST | ( |  | byte | ) | (EncLen_CP949[byte] > 1)

Definition at line 70 of file cp949.c.

Referenced by cp949_left_adjust_char_head().

#define CP949_ISMB_TRAIL | ( |  | byte | ) | CP949_CAN_BE_TRAIL_TABLE[(byte)]

Definition at line 71 of file cp949.c.

Referenced by cp949_is_allowed_reverse_match(), and cp949_left_adjust_char_head().

#define F FAILURE

Definition at line 75 of file cp949.c.

#define RETURN | ( |  | n | ) |

Value:

    return s == ACCEPT ? ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(n) : \
                             ONIGENC_CONSTRUCT_MBCLEN_INVALID()

## 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 73 of file cp949.c.

## Function Documentation

static int cp949_code_to_mbc | ( | OnigCodePoint | code,
|  | UChar * | buf,
|  | OnigEncoding | enc
| ) |  | `[static]`

Definition at line 139 of file cp949.c.

References onigenc_mb2_code_to_mbc().

static int cp949_is_allowed_reverse_match | ( | const UChar * | s,
|  | const UChar *end | ARG_UNUSED,
|  | OnigEncoding enc | ARG_UNUSED
| ) |  | `[static]`

Definition at line 191 of file cp949.c.

References CP949_ISMB_TRAIL, FALSE, TRUE, and UChar.

static int cp949_is_code_ctype | ( | OnigCodePoint | code,
|  | unsigned int | ctype,
|  | OnigEncoding | enc
| ) |  | `[static]`

Definition at line 162 of file cp949.c.

References onigenc_mb2_is_code_ctype().

static UChar* cp949_left_adjust_char_head | ( | const UChar * | start,
|  | const UChar * | s,
|  | const UChar * | end,
|  | OnigEncoding | enc
| ) |  | `[static]`

Definition at line 168 of file cp949.c.

References CP949_ISMB_FIRST, CP949_ISMB_TRAIL, enclen, len, and UChar.

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

Definition at line 145 of file cp949.c.

References onigenc_mbn_mbc_case_fold().

static int cp949_mbc_enc_len | ( | const UChar * | p,
|  | const UChar * | e,
|  | OnigEncoding enc | ARG_UNUSED
| ) |  | `[static]`

Definition at line 118 of file cp949.c.

References EncLen_CP949, ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE, RETURN, and trans.

static OnigCodePoint cp949_mbc_to_code | ( | const UChar * | p,
|  | const UChar * | end,
|  | OnigEncoding | enc
| ) |  | `[static]`

Definition at line 133 of file cp949.c.

References onigenc_mbn_mbc_to_code().

OnigEncodingDefine | ( | cp949 | ,
|  | CP949 |
| ) |  |

## Variable Documentation

const char CP949_CAN_BE_TRAIL_TABLE[256]`[static]`

Initial value:

     {
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
      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, 0,
      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, 0
    }

Definition at line 51 of file cp949.c.

const int EncLen_CP949[]`[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, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
      2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
      2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
      2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
      2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
      2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
      2, 2, 2, 2, 2, 2, 2, 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 32 of file cp949.c.

Referenced by cp949_mbc_enc_len().

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

Definition at line 76 of file cp949.c.

Referenced by cp949_mbc_enc_len().