Back to index

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

Go to the source code of this file.

Defines

#define BIG5_ISMB_FIRST(byte)   (EncLen_BIG5[byte] > 1)
#define BIG5_ISMB_TRAIL(byte)   BIG5_CAN_BE_TRAIL_TABLE[(byte)]

Functions

static int big5_mbc_enc_len (const UChar *p)
static OnigCodePoint big5_mbc_to_code (const UChar *p, const UChar *end)
static int big5_code_to_mbc (OnigCodePoint code, UChar *buf)
static int big5_mbc_to_normalize (OnigAmbigType flag, const UChar **pp, const UChar *end, UChar *lower)
static int big5_is_mbc_ambiguous (OnigAmbigType flag, const UChar **pp, const UChar *end)
static int big5_is_code_ctype (OnigCodePoint code, unsigned int ctype)
static UCharbig5_left_adjust_char_head (const UChar *start, const UChar *s)
static int big5_is_allowed_reverse_match (const UChar *s, const UChar *end)

Variables

static const int EncLen_BIG5 []
static const char BIG5_CAN_BE_TRAIL_TABLE [256]
OnigEncodingType OnigEncodingBIG5

Define Documentation

#define BIG5_ISMB_FIRST (   byte)    (EncLen_BIG5[byte] > 1)

Definition at line 108 of file big5.c.

#define BIG5_ISMB_TRAIL (   byte)    BIG5_CAN_BE_TRAIL_TABLE[(byte)]

Definition at line 109 of file big5.c.


Function Documentation

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

Definition at line 64 of file big5.c.

Here is the call graph for this function:

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

Definition at line 135 of file big5.c.

{
  const UChar c = *s;

  return (BIG5_ISMB_TRAIL(c) ? FALSE : TRUE);
}
static int big5_is_code_ctype ( OnigCodePoint  code,
unsigned int  ctype 
) [static]

Definition at line 84 of file big5.c.

Here is the call graph for this function:

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

Definition at line 78 of file big5.c.

Here is the call graph for this function:

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

Definition at line 112 of file big5.c.

{
  const UChar *p;
  int len;

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

  if (BIG5_ISMB_TRAIL(*p)) {
    while (p > start) {
      if (! BIG5_ISMB_FIRST(*--p)) {
       p++;
       break;
      }
    } 
  }
  len = enc_len(ONIG_ENCODING_BIG5, p);
  if (p + len > s) return (UChar* )p;
  p += len;
  return (UChar* )(p + ((s - p) & ~1));
}
static int big5_mbc_enc_len ( const UChar p) [static]

Definition at line 52 of file big5.c.

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

Definition at line 58 of file big5.c.

Here is the call graph for this function:

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

Definition at line 70 of file big5.c.

Here is the call graph for this function:


Variable Documentation

const char BIG5_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,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