Back to index

glibc  2.9
Defines | Typedefs | Variables
tcvn5712-1.c File Reference
#include <dlfcn.h>
#include <stdint.h>
#include <stdlib.h>
#include <iconv/loop.c>
#include <iconv/skeleton.c>

Go to the source code of this file.

Defines

#define NELEMS(arr)   (sizeof (arr) / sizeof (arr[0]))
#define CHARSET_NAME   "TCVN5712-1//"
#define FROM_LOOP   from_tcvn5712_1
#define TO_LOOP   to_tcvn5712_1
#define DEFINE_INIT   1
#define DEFINE_FINI   1
#define FROM_LOOP_MIN_NEEDED_FROM   1
#define FROM_LOOP_MAX_NEEDED_FROM   1
#define FROM_LOOP_MIN_NEEDED_TO   4
#define FROM_LOOP_MAX_NEEDED_TO   4
#define TO_LOOP_MIN_NEEDED_FROM   4
#define TO_LOOP_MAX_NEEDED_FROM   4
#define TO_LOOP_MIN_NEEDED_TO   1
#define TO_LOOP_MAX_NEEDED_TO   2
#define PREPARE_LOOP
#define EXTRA_LOOP_ARGS   , statep
#define SAVE_RESET_STATE(Save)
#define EMIT_SHIFT_TO_INIT
#define COMP_TABLE_IDX_0300   0
#define COMP_TABLE_LEN_0300   28
#define COMP_TABLE_IDX_0301   (COMP_TABLE_IDX_0300 + COMP_TABLE_LEN_0300)
#define COMP_TABLE_LEN_0301   51
#define COMP_TABLE_IDX_0303   (COMP_TABLE_IDX_0301 + COMP_TABLE_LEN_0301)
#define COMP_TABLE_LEN_0303   34
#define COMP_TABLE_IDX_0309   (COMP_TABLE_IDX_0303 + COMP_TABLE_LEN_0303)
#define COMP_TABLE_LEN_0309   24
#define COMP_TABLE_IDX_0323   (COMP_TABLE_IDX_0309 + COMP_TABLE_LEN_0309)
#define COMP_TABLE_LEN_0323   50
#define COMP_TABLE_IDX_END   (COMP_TABLE_IDX_0323 + COMP_TABLE_LEN_0323)
#define MIN_NEEDED_INPUT   FROM_LOOP_MIN_NEEDED_FROM
#define MAX_NEEDED_INPUT   FROM_LOOP_MAX_NEEDED_FROM
#define MIN_NEEDED_OUTPUT   FROM_LOOP_MIN_NEEDED_TO
#define MAX_NEEDED_OUTPUT   FROM_LOOP_MAX_NEEDED_TO
#define LOOPFCT   FROM_LOOP
#define BODY
#define EXTRA_LOOP_DECLS   , int *statep
#define ONEBYTE_BODY
#define FROM_IDX_00   0
#define FROM_IDX_01   (FROM_IDX_00 + 16)
#define FROM_IDX_02   (FROM_IDX_01 + 106)
#define FROM_IDX_03   (FROM_IDX_02 + 2)
#define FROM_IDX_04   (FROM_IDX_03 + 17)
#define FROM_IDX_05   (FROM_IDX_04 + 36)
#define FROM_IDX_END   (FROM_IDX_05 + 90)
#define MIN_NEEDED_INPUT   TO_LOOP_MIN_NEEDED_FROM
#define MAX_NEEDED_INPUT   TO_LOOP_MAX_NEEDED_FROM
#define MIN_NEEDED_OUTPUT   TO_LOOP_MIN_NEEDED_TO
#define MAX_NEEDED_OUTPUT   TO_LOOP_MAX_NEEDED_TO
#define LOOPFCT   TO_LOOP
#define BODY
#define LOOP_NEED_FLAGS
#define EXTRA_LOOP_DECLS   , int *statep

Typedefs

typedef int verify1 [(NELEMS(comp_table_data)==COMP_TABLE_IDX_END)-1]
typedef int verify2 [(NELEMS(from_ucs4)==FROM_IDX_END)-1]

Variables

static const uint16_t map_from_tcvn_low [0x18]
static const uint16_t map_from_tcvn_high [0x80]
struct {
uint16_t base
uint16_t composed
comp_table_data []
struct {
unsigned int idx
unsigned int len
comp_table [5]
static const unsigned char from_ucs4 []
struct {
uint16_t composed
uint32_t base:8
uint32_t comb1:8
decomp_table []

Define Documentation

#define BODY

Definition at line 625 of file tcvn5712-1.c.

#define BODY

Definition at line 625 of file tcvn5712-1.c.

#define CHARSET_NAME   "TCVN5712-1//"

Definition at line 28 of file tcvn5712-1.c.

#define COMP_TABLE_IDX_0300   0
#define COMP_TABLE_LEN_0300   28
#define COMP_TABLE_LEN_0301   51
#define COMP_TABLE_LEN_0303   34
#define COMP_TABLE_LEN_0309   24
#define COMP_TABLE_LEN_0323   50
#define DEFINE_FINI   1

Definition at line 32 of file tcvn5712-1.c.

#define DEFINE_INIT   1

Definition at line 31 of file tcvn5712-1.c.

Value:
if (data->__statep->__count != 0)                                    \
    {                                                                \
      if (FROM_DIRECTION)                                            \
       {                                                             \
         if (__builtin_expect (outbuf + 4 <= outend, 1))                    \
           {                                                         \
             /* Write out the last character.  */                           \
             *((uint32_t *) outbuf) = data->__statep->__count >> 3;         \
             outbuf += sizeof (uint32_t);                            \
             data->__statep->__count = 0;                            \
           }                                                         \
         else                                                        \
           /* We don't have enough room in the output buffer.  */           \
           status = __GCONV_FULL_OUTPUT;                             \
       }                                                             \
      else                                                           \
       /* We don't use shift states in the TO_DIRECTION.  */                \
       data->__statep->__count = 0;                                         \
    }

Definition at line 63 of file tcvn5712-1.c.

#define EXTRA_LOOP_ARGS   , statep

Definition at line 44 of file tcvn5712-1.c.

#define EXTRA_LOOP_DECLS   , int *statep

Definition at line 720 of file tcvn5712-1.c.

#define EXTRA_LOOP_DECLS   , int *statep

Definition at line 720 of file tcvn5712-1.c.

#define FROM_IDX_00   0
#define FROM_IDX_01   (FROM_IDX_00 + 16)
#define FROM_IDX_02   (FROM_IDX_01 + 106)
#define FROM_IDX_03   (FROM_IDX_02 + 2)
#define FROM_IDX_04   (FROM_IDX_03 + 17)
#define FROM_IDX_05   (FROM_IDX_04 + 36)
#define FROM_IDX_END   (FROM_IDX_05 + 90)
#define FROM_LOOP   from_tcvn5712_1

Definition at line 29 of file tcvn5712-1.c.

#define FROM_LOOP_MAX_NEEDED_FROM   1

Definition at line 34 of file tcvn5712-1.c.

#define FROM_LOOP_MAX_NEEDED_TO   4

Definition at line 36 of file tcvn5712-1.c.

#define FROM_LOOP_MIN_NEEDED_FROM   1

Definition at line 33 of file tcvn5712-1.c.

#define FROM_LOOP_MIN_NEEDED_TO   4

Definition at line 35 of file tcvn5712-1.c.

#define LOOP_NEED_FLAGS

Definition at line 719 of file tcvn5712-1.c.

#define LOOPFCT   FROM_LOOP

Definition at line 624 of file tcvn5712-1.c.

#define LOOPFCT   TO_LOOP

Definition at line 624 of file tcvn5712-1.c.

Definition at line 621 of file tcvn5712-1.c.

Definition at line 621 of file tcvn5712-1.c.

Definition at line 623 of file tcvn5712-1.c.

Definition at line 623 of file tcvn5712-1.c.

Definition at line 620 of file tcvn5712-1.c.

Definition at line 620 of file tcvn5712-1.c.

Definition at line 622 of file tcvn5712-1.c.

Definition at line 622 of file tcvn5712-1.c.

#define NELEMS (   arr)    (sizeof (arr) / sizeof (arr[0]))

Definition at line 25 of file tcvn5712-1.c.

#define ONEBYTE_BODY
Value:
{                                                                    \
    uint32_t ch;                                                     \
                                                                     \
    if (c < 0x18)                                                    \
      ch = map_from_tcvn_low[c];                                     \
    else if (c >= 0x80)                                                     \
      ch = map_from_tcvn_high[c - 0x80];                             \
    else                                                             \
      ch = c;                                                        \
    if (ch >= 0x0041 && ch <= 0x01b0)                                       \
      return WEOF;                                                   \
    return ch;                                                              \
  }

Definition at line 477 of file tcvn5712-1.c.

#define PREPARE_LOOP
Value:
int saved_state;                                                     \
  int *statep = &data->__statep->__count;

Definition at line 41 of file tcvn5712-1.c.

#define SAVE_RESET_STATE (   Save)
Value:
if (Save)                                                            \
    saved_state = *statep;                                           \
  else                                                               \
    *statep = saved_state

Definition at line 49 of file tcvn5712-1.c.

#define TO_LOOP   to_tcvn5712_1

Definition at line 30 of file tcvn5712-1.c.

#define TO_LOOP_MAX_NEEDED_FROM   4

Definition at line 38 of file tcvn5712-1.c.

#define TO_LOOP_MAX_NEEDED_TO   2

Definition at line 40 of file tcvn5712-1.c.

#define TO_LOOP_MIN_NEEDED_FROM   4

Definition at line 37 of file tcvn5712-1.c.

#define TO_LOOP_MIN_NEEDED_TO   1

Definition at line 39 of file tcvn5712-1.c.


Typedef Documentation

Definition at line 347 of file tcvn5712-1.c.

Definition at line 550 of file tcvn5712-1.c.


Variable Documentation

struct { ... } comp_table[5] [static]
struct { ... } comp_table_data[] [static]
struct { ... } decomp_table[] [static]
const unsigned char from_ucs4[] [static]

Definition at line 496 of file tcvn5712-1.c.

Initial value:
  {
    0x00c0, 0x1ea2, 0x00c3, 0x00c1, 0x1ea0, 0x1eb6, 0x1eac, 0x00c8,
    0x1eba, 0x1ebc, 0x00c9, 0x1eb8, 0x1ec6, 0x00cc, 0x1ec8, 0x0128,
    0x00cd, 0x1eca, 0x00d2, 0x1ece, 0x00d5, 0x00d3, 0x1ecc, 0x1ed8,
    0x1edc, 0x1ede, 0x1ee0, 0x1eda, 0x1ee2, 0x00d9, 0x1ee6, 0x0168,
    0x00a0, 0x0102, 0x00c2, 0x00ca, 0x00d4, 0x01a0, 0x01af, 0x0110,
    0x0103, 0x00e2, 0x00ea, 0x00f4, 0x01a1, 0x01b0, 0x0111, 0x1eb0,
    0x0300, 0x0309, 0x0303, 0x0301, 0x0323, 0x00e0, 0x1ea3, 0x00e3,
    0x00e1, 0x1ea1, 0x1eb2, 0x1eb1, 0x1eb3, 0x1eb5, 0x1eaf, 0x1eb4,
    0x1eae, 0x1ea6, 0x1ea8, 0x1eaa, 0x1ea4, 0x1ec0, 0x1eb7, 0x1ea7,
    0x1ea9, 0x1eab, 0x1ea5, 0x1ead, 0x00e8, 0x1ec2, 0x1ebb, 0x1ebd,
    0x00e9, 0x1eb9, 0x1ec1, 0x1ec3, 0x1ec5, 0x1ebf, 0x1ec7, 0x00ec,
    0x1ec9, 0x1ec4, 0x1ebe, 0x1ed2, 0x0129, 0x00ed, 0x1ecb, 0x00f2,
    0x1ed4, 0x1ecf, 0x00f5, 0x00f3, 0x1ecd, 0x1ed3, 0x1ed5, 0x1ed7,
    0x1ed1, 0x1ed9, 0x1edd, 0x1edf, 0x1ee1, 0x1edb, 0x1ee3, 0x00f9,
    0x1ed6, 0x1ee7, 0x0169, 0x00fa, 0x1ee5, 0x1eeb, 0x1eed, 0x1eef,
    0x1ee9, 0x1ef1, 0x1ef3, 0x1ef7, 0x1ef9, 0x00fd, 0x1ef5, 0x1ed0
  }

Definition at line 92 of file tcvn5712-1.c.

Initial value:
  {
    0x0000, 0x00da, 0x1ee4, 0x0003, 0x1eea, 0x1eec, 0x1eee, 0x0007,
    0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f,
    0x0010, 0x1ee8, 0x1ef0, 0x1ef2, 0x1ef6, 0x1ef8, 0x00dd, 0x1ef4
  }

Definition at line 85 of file tcvn5712-1.c.