openATV enigma2
openATV is an open source SetTopBox Graphical user interface.
gb18030.h File Reference
#include <stdlib.h>

Go to the source code of this file.

Classes

struct  conv_t
 
struct  Summary16
 

Macros

#define STB_SUPPORT_UNICODE_FONT
 
#define _iconv_var_
 
#define RET_ILUNI   -1
 
#define RET_ILSEQ   -2
 
#define RET_TOOSMALL   -3
 
#define RET_TOOFEW(n)   (-4-(n))
 

Typedefs

typedef long ucs4_t
 

Functions

static int gbk_mbtowc (ucs4_t *pwc, const unsigned char *s, int n)
 
static int gbkext1_mbtowc (ucs4_t *pwc, const unsigned char *s, int n)
 
static int cp936ext_mbtowc (ucs4_t *pwc, const unsigned char *s, int n)
 
static int gb2312_mbtowc (ucs4_t *pwc, const unsigned char *s, int n)
 
static int gbkext2_mbtowc (ucs4_t *pwc, const unsigned char *s, int n)
 
static int gb18030ext_mbtowc (ucs4_t *pwc, const unsigned char *s, int n)
 
static int gb18030_mbtowc (ucs4_t *pwc, const unsigned char *s, int n)
 
static int gb18030uni_mbtowc (ucs4_t *pwc, const unsigned char *s, int n)
 
static int ascii_mbtowc (ucs4_t *pwc, const unsigned char *s, int n)
 
 __attribute__ ((unused)) static int gb2312_wctomb(unsigned char *r
 

Variables

static const unsigned short gb18030ext_2uni_pagea9 [13]
 
static const unsigned short gb18030ext_2uni_pagefe [96]
 
static const unsigned short gb18030uni_charset2uni_ranges [412]
 
static const unsigned short gb18030uni_uni2charset_ranges [412]
 
static const unsigned short gb18030uni_ranges [206]
 
static const unsigned short gbkext1_2uni_page81 [6080]
 
static const unsigned short gb2312_2uni_page21 [831]
 
static const unsigned short gb2312_2uni_page30 [6768]
 
static const unsigned short cp936ext_2uni_pagea6 [181-159]
 
static const unsigned short cp936ext_2uni_pagea8 [128-122]
 
static const unsigned short gb2312_2charset [7445]
 
static const Summary16 gb2312_uni2indx_page00 [70]
 
static const Summary16 gb2312_uni2indx_page20 [101]
 
static const Summary16 gb2312_uni2indx_page30 [35]
 
static const Summary16 gb2312_uni2indx_page4e [1263]
 
static const Summary16 gb2312_uni2indx_page9e [27]
 
static const Summary16 gb2312_uni2indx_pageff [15]
 
ucs4_t wc
 
ucs4_t int n
 
static const unsigned short gbkext2_2uni_pagea8 [8272]
 

Macro Definition Documentation

◆ _iconv_var_

#define _iconv_var_

◆ RET_ILSEQ

#define RET_ILSEQ   -2

◆ RET_ILUNI

#define RET_ILUNI   -1

◆ RET_TOOFEW

#define RET_TOOFEW (   n)    (-4-(n))

◆ RET_TOOSMALL

#define RET_TOOSMALL   -3

◆ STB_SUPPORT_UNICODE_FONT

#define STB_SUPPORT_UNICODE_FONT

Typedef Documentation

◆ ucs4_t

typedef long ucs4_t

Function Documentation

◆ __attribute__()

__attribute__ ( (unused)  )

◆ ascii_mbtowc()

static int ascii_mbtowc ( ucs4_t pwc,
const unsigned char *  s,
int  n 
)
static

◆ cp936ext_mbtowc()

static int cp936ext_mbtowc ( ucs4_t pwc,
const unsigned char *  s,
int  n 
)
static

◆ gb18030_mbtowc()

static int gb18030_mbtowc ( ucs4_t pwc,
const unsigned char *  s,
int  n 
)
static

◆ gb18030ext_mbtowc()

static int gb18030ext_mbtowc ( ucs4_t pwc,
const unsigned char *  s,
int  n 
)
static

◆ gb18030uni_mbtowc()

static int gb18030uni_mbtowc ( ucs4_t pwc,
const unsigned char *  s,
int  n 
)
static

◆ gb2312_mbtowc()

static int gb2312_mbtowc ( ucs4_t pwc,
const unsigned char *  s,
int  n 
)
static

◆ gbk_mbtowc()

static int gbk_mbtowc ( ucs4_t pwc,
const unsigned char *  s,
int  n 
)
static

◆ gbkext1_mbtowc()

static int gbkext1_mbtowc ( ucs4_t pwc,
const unsigned char *  s,
int  n 
)
static

◆ gbkext2_mbtowc()

static int gbkext2_mbtowc ( ucs4_t pwc,
const unsigned char *  s,
int  n 
)
static

Variable Documentation

◆ cp936ext_2uni_pagea6

const unsigned short cp936ext_2uni_pagea6[181-159]
static
Initial value:
= {
0xfe35,
0xfe36, 0xfe39, 0xfe3a, 0xfe3f, 0xfe40, 0xfe3d, 0xfe3e, 0xfe41,
0xfe42, 0xfe43, 0xfe44, 0xfffd, 0xfffd, 0xfe3b, 0xfe3c, 0xfe37,
0xfe38, 0xfe31, 0xfffd, 0xfe33, 0xfe34,
}

◆ cp936ext_2uni_pagea8

const unsigned short cp936ext_2uni_pagea8[128-122]
static
Initial value:
= {
0x0251, 0xfffd, 0x0144, 0x0148, 0xfffd, 0x0261,
}

◆ gb18030ext_2uni_pagea9

const unsigned short gb18030ext_2uni_pagea9[13]
static
Initial value:
= {
0x303e, 0x2ff0, 0x2ff1, 0x2ff2, 0x2ff3, 0x2ff4, 0x2ff5, 0x2ff6,
0x2ff7, 0x2ff8, 0x2ff9, 0x2ffa, 0x2ffb,
}

◆ gb18030ext_2uni_pagefe

const unsigned short gb18030ext_2uni_pagefe[96]
static
Initial value:
= {
0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd,
0x2e81, 0xe816, 0xe817, 0xe818, 0x2e84, 0x3473, 0x3447, 0x2e88,
0x2e8b, 0xe81e, 0x359e, 0x361a, 0x360e, 0x2e8c, 0x2e97, 0x396e,
0x3918, 0xe826, 0x39cf, 0x39df, 0x3a73, 0x39d0, 0xe82b, 0xe82c,
0x3b4e, 0x3c6e, 0x3ce0, 0x2ea7, 0xe831, 0xe832, 0x2eaa, 0x4056,
0x415f, 0x2eae, 0x4337, 0x2eb3, 0x2eb6, 0x2eb7, 0xe83b, 0x43b1,
0x43ac, 0x2ebb, 0x43dd, 0x44d6, 0x4661, 0x464c, 0xe843, 0x4723,
0x4729, 0x477c, 0x478d, 0x2eca, 0x4947, 0x497a, 0x497d, 0x4982,
0x4983, 0x4985, 0x4986, 0x499f, 0x499b, 0x49b7, 0x49b6, 0xe854,
0xe855, 0x4ca3, 0x4c9f, 0x4ca0, 0x4ca1, 0x4c77, 0x4ca2, 0x4d13,
0x4d14, 0x4d15, 0x4d16, 0x4d17, 0x4d18, 0x4d19, 0x4dae, 0xe864,
}

◆ gb18030uni_charset2uni_ranges

const unsigned short gb18030uni_charset2uni_ranges[412]
static

◆ gb18030uni_ranges

const unsigned short gb18030uni_ranges[206]
static
Initial value:
= {
128, 129, 131, 133, 134, 135, 137, 140,
142, 144, 145, 147, 148, 149, 150, 151,
152, 153, 154, 155, 156, 157, 158, 159,
160, 161, 162, 163, 164, 165, 166, 167,
168, 171, 172, 189, 196, 213, 220, 221,
285, 286, 287, 291, 293, 295, 297, 298,
300, 301, 302, 303, 304, 305, 306, 307,
308, 320, 330, 334, 338, 339, 340, 341,
342, 343, 347, 348, 349, 354, 355, 359,
360, 361, 362, 363, 365, 369, 371, 372,
373, 374, 375, 376, 386, 426, 502, 538,
553, 556, 558, 560, 562, 564, 565, 567,
571, 573, 574, 575, 576, 577, 578, 579,
581, 582, 583, 584, 585, 586, 588, 589,
590, 602, 606, 625, 627, 636, 637, 720,
724, 810, 813, 850, 860, 861, 862, 864,
867, 868, 869, 870, 872, 873, 874, 875,
876, 877, 878, 879, 880, 882, 883, 884,
885, 886, 887, 888, 889, 890, 891, 892,
893, 894, 895, 896, 897, 898, 899, 900,
901, 902, 903, 905, 907, 908, 909, 911,
912, 917, 924, 925, 21827,
25775, 25866, 25896,
25929, 25932, 25933, 25934, 25936, 25938, 25939, 25940,
25942,
25943, 25944, 25945, 25946, 25947, 25948, 25952,
25953, 25955, 25956, 25959, 25961, 25964, 25966, 25984,
25994, 25998, 26012, 26016, 26110, 26116
}

◆ gb18030uni_uni2charset_ranges

const unsigned short gb18030uni_uni2charset_ranges[412]
static

◆ gb2312_2charset

const unsigned short gb2312_2charset[7445]
static

◆ gb2312_2uni_page21

const unsigned short gb2312_2uni_page21[831]
static

◆ gb2312_2uni_page30

const unsigned short gb2312_2uni_page30[6768]
static

◆ gb2312_uni2indx_page00

const Summary16 gb2312_uni2indx_page00[70]
static
Initial value:
= {
{ 0, 0x0000 }, { 0, 0x0000 }, { 0, 0x0000 }, { 0, 0x0000 },
{ 0, 0x0000 }, { 0, 0x0000 }, { 0, 0x0000 }, { 0, 0x0000 },
{ 0, 0x0000 }, { 0, 0x0000 }, { 0, 0x0190 }, { 3, 0x0003 },
{ 5, 0x0000 }, { 5, 0x0080 }, { 6, 0x3703 }, { 13, 0x168c },
{ 19, 0x0002 }, { 20, 0x0808 }, { 22, 0x0800 }, { 23, 0x0000 },
{ 23, 0x2000 }, { 24, 0x0000 }, { 24, 0x0800 }, { 25, 0x0000 },
{ 25, 0x0000 }, { 25, 0x0000 }, { 25, 0x0000 }, { 25, 0x0000 },
{ 25, 0x4000 }, { 26, 0x1555 }, { 33, 0x0000 }, { 33, 0x0000 },
{ 33, 0x0000 }, { 33, 0x0000 }, { 33, 0x0000 }, { 33, 0x0000 },
{ 33, 0x0000 }, { 33, 0x0000 }, { 33, 0x0000 }, { 33, 0x0000 },
{ 33, 0x0000 }, { 33, 0x0000 }, { 33, 0x0000 }, { 33, 0x0000 },
{ 33, 0x0280 }, { 35, 0x0000 }, { 35, 0x0000 }, { 35, 0x0000 },
{ 35, 0x0000 }, { 35, 0x0000 }, { 35, 0x0000 }, { 35, 0x0000 },
{ 35, 0x0000 }, { 35, 0x0000 }, { 35, 0x0000 }, { 35, 0x0000 },
{ 35, 0x0000 }, { 35, 0xfffe }, { 50, 0x03fb }, { 59, 0xfffe },
{ 74, 0x03fb }, { 83, 0x0000 }, { 83, 0x0000 }, { 83, 0x0000 },
{ 83, 0x0002 }, { 84, 0xffff }, { 100, 0xffff }, { 116, 0xffff },
{ 132, 0xffff }, { 148, 0x0002 },
}

◆ gb2312_uni2indx_page20

const Summary16 gb2312_uni2indx_page20[101]
static

◆ gb2312_uni2indx_page30

const Summary16 gb2312_uni2indx_page30[35]
static
Initial value:
= {
{ 347, 0xff2f }, { 360, 0x00fb }, { 367, 0x0000 }, { 367, 0x0000 },
{ 367, 0xfffe }, { 382, 0xffff }, { 398, 0xffff }, { 414, 0xffff },
{ 430, 0xffff }, { 446, 0x000f }, { 450, 0xfffe }, { 465, 0xffff },
{ 481, 0xffff }, { 497, 0xffff }, { 513, 0xffff }, { 529, 0x087f },
{ 537, 0xffe0 }, { 548, 0xffff }, { 564, 0x03ff }, { 574, 0x0000 },
{ 574, 0x0000 }, { 574, 0x0000 }, { 574, 0x0000 }, { 574, 0x0000 },
{ 574, 0x0000 }, { 574, 0x0000 }, { 574, 0x0000 }, { 574, 0x0000 },
{ 574, 0x0000 }, { 574, 0x0000 }, { 574, 0x0000 }, { 574, 0x0000 },
{ 574, 0x0000 }, { 574, 0x0000 }, { 574, 0x03ff },
}

◆ gb2312_uni2indx_page4e

const Summary16 gb2312_uni2indx_page4e[1263]
static

◆ gb2312_uni2indx_page9e

const Summary16 gb2312_uni2indx_page9e[27]
static
Initial value:
= {
{ 7211, 0x0000 }, { 7211, 0x8000 }, { 7212, 0xbf6f }, { 7225, 0xe7ee },
{ 7237, 0xdffe }, { 7251, 0x5da2 }, { 7259, 0x3fd8 }, { 7269, 0xc00b },
{ 7274, 0x0984 }, { 7278, 0xa00c }, { 7282, 0x0040 }, { 7283, 0x6910 },
{ 7288, 0xe210 }, { 7293, 0xb912 }, { 7300, 0x86a5 }, { 7307, 0x5a00 },
{ 7311, 0x6800 }, { 7314, 0x0289 }, { 7318, 0x9005 }, { 7322, 0x6a80 },
{ 7327, 0x0010 }, { 7328, 0x0003 }, { 7330, 0x0000 }, { 7330, 0x8000 },
{ 7331, 0x1ff9 }, { 7342, 0x8e00 }, { 7346, 0x0001 },
}

◆ gb2312_uni2indx_pageff

const Summary16 gb2312_uni2indx_pageff[15]
static
Initial value:
= {
{ 7347, 0xfffe }, { 7362, 0xffff }, { 7378, 0xffff }, { 7394, 0xffff },
{ 7410, 0xffff }, { 7426, 0x7fff }, { 7441, 0x0000 }, { 7441, 0x0000 },
{ 7441, 0x0000 }, { 7441, 0x0000 }, { 7441, 0x0000 }, { 7441, 0x0000 },
{ 7441, 0x0000 }, { 7441, 0x0000 }, { 7441, 0x002b },
}

◆ gbkext1_2uni_page81

const unsigned short gbkext1_2uni_page81[6080]
static

◆ gbkext2_2uni_pagea8

const unsigned short gbkext2_2uni_pagea8[8272]
static

◆ n

ucs4_t int n

◆ wc

ucs4_t wc