Back to index

php5  5.3.10
Defines | Functions | Variables
euc_tw.c File Reference
#include "regenc.h"

Go to the source code of this file.

Defines

#define euctw_islead(c)   (((c) < 0xa1 && (c) != 0x8e) || (c) == 0xff)

Functions

static int euctw_mbc_enc_len (const UChar *p)
static OnigCodePoint euctw_mbc_to_code (const UChar *p, const UChar *end)
static int euctw_code_to_mbc (OnigCodePoint code, UChar *buf)
static int euctw_mbc_to_normalize (OnigAmbigType flag, const UChar **pp, const UChar *end, UChar *lower)
static int euctw_is_mbc_ambiguous (OnigAmbigType flag, const UChar **pp, const UChar *end)
static int euctw_is_code_ctype (OnigCodePoint code, unsigned int ctype)
static UChareuctw_left_adjust_char_head (const UChar *start, const UChar *s)
static int euctw_is_allowed_reverse_match (const UChar *s, const UChar *end)

Variables

static const int EncLen_EUCTW []
OnigEncodingType OnigEncodingEUC_TW

Define Documentation

#define euctw_islead (   c)    (((c) < 0xa1 && (c) != 0x8e) || (c) == 0xff)

Definition at line 89 of file euc_tw.c.


Function Documentation

static int euctw_code_to_mbc ( OnigCodePoint  code,
UChar buf 
) [static]

Definition at line 64 of file euc_tw.c.

Here is the call graph for this function:

static int euctw_is_allowed_reverse_match ( const UChar s,
const UChar end 
) [static]

Definition at line 111 of file euc_tw.c.

{
  const UChar c = *s;
  if (c <= 0x7e) return TRUE;
  else           return FALSE;
}
static int euctw_is_code_ctype ( OnigCodePoint  code,
unsigned int  ctype 
) [static]

Definition at line 84 of file euc_tw.c.

Here is the call graph for this function:

static int euctw_is_mbc_ambiguous ( OnigAmbigType  flag,
const UChar **  pp,
const UChar end 
) [static]

Definition at line 78 of file euc_tw.c.

Here is the call graph for this function:

static UChar* euctw_left_adjust_char_head ( const UChar start,
const UChar s 
) [static]

Definition at line 92 of file euc_tw.c.

{
  /* Assumed in this encoding,
     mb-trail bytes don't mix with single bytes.
  */
  const UChar *p;
  int len;

  if (s <= start) return (UChar* )s;
  p = s;

  while (!euctw_islead(*p) && p > start) p--;
  len = enc_len(ONIG_ENCODING_EUC_TW, p);
  if (p + len > s) return (UChar* )p;
  p += len;
  return (UChar* )(p + ((s - p) & ~1));
}
static int euctw_mbc_enc_len ( const UChar p) [static]

Definition at line 52 of file euc_tw.c.

{
  return EncLen_EUCTW[*p];
}
static OnigCodePoint euctw_mbc_to_code ( const UChar p,
const UChar end 
) [static]

Definition at line 58 of file euc_tw.c.

Here is the call graph for this function:

static int euctw_mbc_to_normalize ( OnigAmbigType  flag,
const UChar **  pp,
const UChar end,
UChar lower 
) [static]

Definition at line 70 of file euc_tw.c.

Here is the call graph for this function:


Variable Documentation

const int EncLen_EUCTW[] [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, 4, 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, 1
}

Definition at line 32 of file euc_tw.c.