Back to index

glibc  2.9
Defines | Variables
gbk.c File Reference
#include <dlfcn.h>
#include <gconv.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <wchar.h>
#include <assert.h>
#include <iconv/loop.c>
#include <iconv/skeleton.c>

Go to the source code of this file.

Defines

#define USE_PRIVATE_AREA   0
#define CHARSET_NAME   "GBK//"
#define FROM_LOOP   from_gbk
#define TO_LOOP   to_gbk
#define DEFINE_INIT   1
#define DEFINE_FINI   1
#define MIN_NEEDED_FROM   1
#define MAX_NEEDED_FROM   2
#define MIN_NEEDED_TO   4
#define MIN_NEEDED_INPUT   MIN_NEEDED_FROM
#define MAX_NEEDED_INPUT   MAX_NEEDED_FROM
#define MIN_NEEDED_OUTPUT   MIN_NEEDED_TO
#define LOOPFCT   FROM_LOOP
#define BODY
#define LOOP_NEED_FLAGS
#define ONEBYTE_BODY
#define MIN_NEEDED_INPUT   MIN_NEEDED_TO
#define MIN_NEEDED_OUTPUT   MIN_NEEDED_FROM
#define MAX_NEEDED_OUTPUT   MAX_NEEDED_FROM
#define LOOPFCT   TO_LOOP
#define BODY
#define LOOP_NEED_FLAGS

Variables

static const uint16_t __gbk_to_ucs []
static const char __gbk_from_ucs4_tab1 [][2]
static const char __gbk_from_ucs4_tab2 [][2]
static const char __gbk_from_ucs4_tab3 [][2]
static const char __gbk_from_ucs4_tab4 [][2]
static const char __gbk_from_ucs4_tab5 [][2]
static const char __gbk_from_ucs4_tab6 [][2]
static const char __gbk_from_ucs4_tab7 [][2]
static const char __gbk_from_ucs4_tab8 [][2]
static const char __gbk_from_ucs4_tab9 [][2]
static const char __gbk_from_ucs4_tab10 [][2]
static const char __gbk_from_ucs4_tab11 [][2]
static const char __gbk_from_ucs4_tab12 [][2]

Define Documentation

#define BODY

Definition at line 13210 of file gbk.c.

#define BODY

Definition at line 13210 of file gbk.c.

#define CHARSET_NAME   "GBK//"

Definition at line 13126 of file gbk.c.

#define DEFINE_FINI   1

Definition at line 13130 of file gbk.c.

#define DEFINE_INIT   1

Definition at line 13129 of file gbk.c.

#define FROM_LOOP   from_gbk

Definition at line 13127 of file gbk.c.

#define LOOP_NEED_FLAGS

Definition at line 13478 of file gbk.c.

#define LOOP_NEED_FLAGS

Definition at line 13478 of file gbk.c.

#define LOOPFCT   FROM_LOOP

Definition at line 13209 of file gbk.c.

#define LOOPFCT   TO_LOOP

Definition at line 13209 of file gbk.c.

#define MAX_NEEDED_FROM   2

Definition at line 13132 of file gbk.c.

Definition at line 13138 of file gbk.c.

Definition at line 13208 of file gbk.c.

#define MIN_NEEDED_FROM   1

Definition at line 13131 of file gbk.c.

Definition at line 13206 of file gbk.c.

Definition at line 13206 of file gbk.c.

Definition at line 13207 of file gbk.c.

Definition at line 13207 of file gbk.c.

#define MIN_NEEDED_TO   4

Definition at line 13133 of file gbk.c.

#define ONEBYTE_BODY
Value:
{                                                                    \
    if (c < 0x80)                                                    \
      return c;                                                             \
    else                                                             \
      return WEOF;                                                   \
  }

Definition at line 13195 of file gbk.c.

#define TO_LOOP   to_gbk

Definition at line 13128 of file gbk.c.

#define USE_PRIVATE_AREA   0

Definition at line 33 of file gbk.c.


Variable Documentation

const char __gbk_from_ucs4_tab1[][2] [static]
Initial value:
{
  [0x0000] = "\xa1\xe8", [0x0003] = "\xa1\xec", [0x0004] = "\xa1\xa7",
  [0x000c] = "\xa1\xe3", [0x000d] = "\xa1\xc0", [0x0013] = "\xa1\xa4",
  [0x0033] = "\xa1\xc1", [0x003c] = "\xa8\xa4", [0x003d] = "\xa8\xa2",
  [0x0044] = "\xa8\xa8", [0x0045] = "\xa8\xa6", [0x0046] = "\xa8\xba",
  [0x0048] = "\xa8\xac", [0x0049] = "\xa8\xaa", [0x004e] = "\xa8\xb0",
  [0x004f] = "\xa8\xae", [0x0053] = "\xa1\xc2", [0x0055] = "\xa8\xb4",
  [0x0056] = "\xa8\xb2", [0x0058] = "\xa8\xb9", [0x005d] = "\xa8\xa1"
}

Definition at line 5566 of file gbk.c.

const char __gbk_from_ucs4_tab10[][2] [static]
Initial value:
{
  [0x0000] = "\xfe\x40", [0x0001] = "\xfe\x41", [0x0002] = "\xfe\x42",
  [0x0003] = "\xfe\x43", [0x0005] = "\xfe\x44", [0x0007] = "\xfe\x45",
  [0x0008] = "\xfe\x46", [0x000c] = "\xfe\x47", [0x0013] = "\xfe\x48",
  [0x0014] = "\xfe\x49", [0x0015] = "\xfe\x4a", [0x0017] = "\xfe\x4b",
  [0x0018] = "\xfe\x4c", [0x001b] = "\xfe\x4d", [0x001c] = "\xfe\x4e",
  [0x001d] = "\xfe\x4f",
}

Definition at line 13016 of file gbk.c.

const char __gbk_from_ucs4_tab11[][2] [static]
Initial value:
{
  [0x0000] = "\xa9\x55", [0x0001] = "\xa6\xf2", [0x0003] = "\xa6\xf4",
  [0x0004] = "\xa6\xf5", [0x0005] = "\xa6\xe0", [0x0006] = "\xa6\xe1",
  [0x0007] = "\xa6\xf0", [0x0008] = "\xa6\xf1", [0x0009] = "\xa6\xe2",
  [0x000a] = "\xa6\xe3", [0x000b] = "\xa6\xee", [0x000c] = "\xa6\xef",
  [0x000d] = "\xa6\xe6", [0x000e] = "\xa6\xe7", [0x000f] = "\xa6\xe4",
  [0x0010] = "\xa6\xe5", [0x0011] = "\xa6\xe8", [0x0012] = "\xa6\xe9",
  [0x0013] = "\xa6\xea", [0x0014] = "\xa6\xeb", [0x0019] = "\xa9\x68",
  [0x001a] = "\xa9\x69", [0x001b] = "\xa9\x6a", [0x001c] = "\xa9\x6b",
  [0x001d] = "\xa9\x6c", [0x001e] = "\xa9\x6d", [0x001f] = "\xa9\x6e",
  [0x0020] = "\xa9\x6f", [0x0021] = "\xa9\x70", [0x0022] = "\xa9\x71",
  [0x0024] = "\xa9\x72", [0x0025] = "\xa9\x73", [0x0026] = "\xa9\x74",
  [0x0027] = "\xa9\x75", [0x0029] = "\xa9\x76", [0x002a] = "\xa9\x77",
  [0x002b] = "\xa9\x78", [0x002c] = "\xa9\x79", [0x002d] = "\xa9\x7a",
  [0x002e] = "\xa9\x7b", [0x002f] = "\xa9\x7c", [0x0030] = "\xa9\x7d",
  [0x0031] = "\xa9\x7e", [0x0032] = "\xa9\x80", [0x0033] = "\xa9\x81",
  [0x0034] = "\xa9\x82", [0x0035] = "\xa9\x83", [0x0036] = "\xa9\x84",
  [0x0038] = "\xa9\x85", [0x0039] = "\xa9\x86", [0x003a] = "\xa9\x87",
  [0x003b] = "\xa9\x88",
}

Definition at line 13046 of file gbk.c.

const char __gbk_from_ucs4_tab12[][2] [static]

Definition at line 13088 of file gbk.c.

const char __gbk_from_ucs4_tab2[][2] [static]
Initial value:
{
  [0x0000] = "\xa6\xa1", [0x0001] = "\xa6\xa2", [0x0002] = "\xa6\xa3",
  [0x0003] = "\xa6\xa4", [0x0004] = "\xa6\xa5", [0x0005] = "\xa6\xa6",
  [0x0006] = "\xa6\xa7", [0x0007] = "\xa6\xa8", [0x0008] = "\xa6\xa9",
  [0x0009] = "\xa6\xaa", [0x000a] = "\xa6\xab", [0x000b] = "\xa6\xac",
  [0x000c] = "\xa6\xad", [0x000d] = "\xa6\xae", [0x000e] = "\xa6\xaf",
  [0x000f] = "\xa6\xb0", [0x0010] = "\xa6\xb1", [0x0012] = "\xa6\xb2",
  [0x0013] = "\xa6\xb3", [0x0014] = "\xa6\xb4", [0x0015] = "\xa6\xb5",
  [0x0016] = "\xa6\xb6", [0x0017] = "\xa6\xb7", [0x0018] = "\xa6\xb8",
  [0x0020] = "\xa6\xc1", [0x0021] = "\xa6\xc2", [0x0022] = "\xa6\xc3",
  [0x0023] = "\xa6\xc4", [0x0024] = "\xa6\xc5", [0x0025] = "\xa6\xc6",
  [0x0026] = "\xa6\xc7", [0x0027] = "\xa6\xc8", [0x0028] = "\xa6\xc9",
  [0x0029] = "\xa6\xca", [0x002a] = "\xa6\xcb", [0x002b] = "\xa6\xcc",
  [0x002c] = "\xa6\xcd", [0x002d] = "\xa6\xce", [0x002e] = "\xa6\xcf",
  [0x002f] = "\xa6\xd0", [0x0030] = "\xa6\xd1", [0x0032] = "\xa6\xd2",
  [0x0033] = "\xa6\xd3", [0x0034] = "\xa6\xd4", [0x0035] = "\xa6\xd5",
  [0x0036] = "\xa6\xd6", [0x0037] = "\xa6\xd7", [0x0038] = "\xa6\xd8",
}

Definition at line 5597 of file gbk.c.

const char __gbk_from_ucs4_tab3[][2] [static]
Initial value:
{
  [0x0000] = "\xa7\xa7", [0x000f] = "\xa7\xa1", [0x0010] = "\xa7\xa2",
  [0x0011] = "\xa7\xa3", [0x0012] = "\xa7\xa4", [0x0013] = "\xa7\xa5",
  [0x0014] = "\xa7\xa6", [0x0015] = "\xa7\xa8", [0x0016] = "\xa7\xa9",
  [0x0017] = "\xa7\xaa", [0x0018] = "\xa7\xab", [0x0019] = "\xa7\xac",
  [0x001a] = "\xa7\xad", [0x001b] = "\xa7\xae", [0x001c] = "\xa7\xaf",
  [0x001d] = "\xa7\xb0", [0x001e] = "\xa7\xb1", [0x001f] = "\xa7\xb2",
  [0x0020] = "\xa7\xb3", [0x0021] = "\xa7\xb4", [0x0022] = "\xa7\xb5",
  [0x0023] = "\xa7\xb6", [0x0024] = "\xa7\xb7", [0x0025] = "\xa7\xb8",
  [0x0026] = "\xa7\xb9", [0x0027] = "\xa7\xba", [0x0028] = "\xa7\xbb",
  [0x0029] = "\xa7\xbc", [0x002a] = "\xa7\xbd", [0x002b] = "\xa7\xbe",
  [0x002c] = "\xa7\xbf", [0x002d] = "\xa7\xc0", [0x002e] = "\xa7\xc1",
  [0x002f] = "\xa7\xd1", [0x0030] = "\xa7\xd2", [0x0031] = "\xa7\xd3",
  [0x0032] = "\xa7\xd4", [0x0033] = "\xa7\xd5", [0x0034] = "\xa7\xd6",
  [0x0035] = "\xa7\xd8", [0x0036] = "\xa7\xd9", [0x0037] = "\xa7\xda",
  [0x0038] = "\xa7\xdb", [0x0039] = "\xa7\xdc", [0x003a] = "\xa7\xdd",
  [0x003b] = "\xa7\xde", [0x003c] = "\xa7\xdf", [0x003d] = "\xa7\xe0",
  [0x003e] = "\xa7\xe1", [0x003f] = "\xa7\xe2", [0x0040] = "\xa7\xe3",
  [0x0041] = "\xa7\xe4", [0x0042] = "\xa7\xe5", [0x0043] = "\xa7\xe6",
  [0x0044] = "\xa7\xe7", [0x0045] = "\xa7\xe8", [0x0046] = "\xa7\xe9",
  [0x0047] = "\xa7\xea", [0x0048] = "\xa7\xeb", [0x0049] = "\xa7\xec",
  [0x004a] = "\xa7\xed", [0x004b] = "\xa7\xee", [0x004c] = "\xa7\xef",
  [0x004d] = "\xa7\xf0", [0x004e] = "\xa7\xf1", [0x0050] = "\xa7\xd7",
}

Definition at line 5637 of file gbk.c.

const char __gbk_from_ucs4_tab4[][2] [static]
Initial value:
{
  [0x0000] = "\xa9\x5c", [0x0003] = "\xa8\x43", [0x0004] = "\xa1\xaa",
  [0x0005] = "\xa8\x44", [0x0006] = "\xa1\xac", [0x0008] = "\xa1\xae",
  [0x0009] = "\xa1\xaf", [0x000c] = "\xa1\xb0", [0x000d] = "\xa1\xb1",
  [0x0015] = "\xa8\x45", [0x0016] = "\xa1\xad", [0x0020] = "\xa1\xeb",
  [0x0022] = "\xa1\xe4", [0x0023] = "\xa1\xe5", [0x0025] = "\xa8\x46",
  [0x002b] = "\xa1\xf9",
}

Definition at line 5683 of file gbk.c.

const char __gbk_from_ucs4_tab5[][2] [static]
Initial value:
{
  [0x0000] = "\xa1\xe6", [0x0002] = "\xa8\x47", [0x0006] = "\xa8\x48",
  [0x0013] = "\xa1\xed", [0x001e] = "\xa9\x59", [0x005d] = "\xa2\xf1",
  [0x005e] = "\xa2\xf2", [0x005f] = "\xa2\xf3", [0x0060] = "\xa2\xf4",
  [0x0061] = "\xa2\xf5", [0x0062] = "\xa2\xf6", [0x0063] = "\xa2\xf7",
  [0x0064] = "\xa2\xf8", [0x0065] = "\xa2\xf9", [0x0066] = "\xa2\xfa",
  [0x0067] = "\xa2\xfb", [0x0068] = "\xa2\xfc", [0x006d] = "\xa2\xa1",
  [0x006e] = "\xa2\xa2", [0x006f] = "\xa2\xa3", [0x0070] = "\xa2\xa4",
  [0x0071] = "\xa2\xa5", [0x0072] = "\xa2\xa6", [0x0073] = "\xa2\xa7",
  [0x0074] = "\xa2\xa8", [0x0075] = "\xa2\xa9", [0x0076] = "\xa2\xaa",
  [0x008d] = "\xa1\xfb", [0x008e] = "\xa1\xfc", [0x008f] = "\xa1\xfa",
  [0x0090] = "\xa1\xfd", [0x0093] = "\xa8\x49", [0x0094] = "\xa8\x4a",
  [0x0095] = "\xa8\x4b", [0x0096] = "\xa8\x4c", [0x0105] = "\xa1\xca",
  [0x010c] = "\xa1\xc7", [0x010e] = "\xa1\xc6", [0x0112] = "\xa8\x4d",
  [0x0117] = "\xa1\xcc", [0x011a] = "\xa1\xd8", [0x011b] = "\xa1\xde",
  [0x011c] = "\xa8\x4e", [0x011d] = "\xa1\xcf", [0x0120] = "\xa8\x4f",
  [0x0122] = "\xa1\xce", [0x0124] = "\xa1\xc4", [0x0125] = "\xa1\xc5",
  [0x0126] = "\xa1\xc9", [0x0127] = "\xa1\xc8", [0x0128] = "\xa1\xd2",
  [0x012b] = "\xa1\xd3", [0x0131] = "\xa1\xe0", [0x0132] = "\xa1\xdf",
  [0x0133] = "\xa1\xc3", [0x0134] = "\xa1\xcb", [0x013a] = "\xa1\xd7",
  [0x0145] = "\xa1\xd6", [0x0149] = "\xa1\xd5", [0x014f] = "\xa8\x50",
  [0x015d] = "\xa1\xd9", [0x015e] = "\xa1\xd4", [0x0161] = "\xa1\xdc",
  [0x0162] = "\xa1\xdd", [0x0163] = "\xa8\x51", [0x0164] = "\xa8\x52",
  [0x016b] = "\xa1\xda", [0x016c] = "\xa1\xdb", [0x0192] = "\xa8\x92",
  [0x0196] = "\xa1\xd1", [0x01a2] = "\xa1\xcd", [0x01bc] = "\xa8\x53",
}

Definition at line 5713 of file gbk.c.

const char __gbk_from_ucs4_tab6[][2] [static]

Definition at line 5761 of file gbk.c.

const char __gbk_from_ucs4_tab7[][2] [static]

Definition at line 5852 of file gbk.c.

const char __gbk_from_ucs4_tab8[][2] [static]

Definition at line 5966 of file gbk.c.

const char __gbk_from_ucs4_tab9[][2] [static]

Definition at line 12958 of file gbk.c.

Definition at line 55 of file gbk.c.