1 /*
2  * ctable_t.h
3  *
4  * All rights reserved. Copyright (C) 1996 by NARITA Tomio
5  * $Id: ctable_t.h,v 1.4 2003/11/13 03:08:19 nrt Exp $
6  */
7 
8 #ifndef __CTABLE_T_H__
9 #define __CTABLE_T_H__
10 
11 /* coding systems (byte) */
12 
13 #define AUTOSELECT		0	/* pseudo coding system */
14 
15 #define UTF_7			1	/* UTF-7 */
16 #define HZ_GB			2	/* HZ enabled euc-china */
17 
18 #define EUC_KOREA		3	/* Extended unix code */
19 #define EUC_JAPAN		4	/* Extended unix code */
20 #define EUC_TAIWAN		5	/* Extended unix code */
21 #define EUC_CHINA		6	/* Extended unix code */
22 
23 #define BIG_FIVE		7	/* big5 encoding */
24 #define SHIFT_JIS		8	/* shift-jis encoding */
25 
26 #define UTF_8			9	/* UTF-8 */
27 
28 #define ISO_8859_1		10	/* iso-2022-8bit-ss2 */
29 #define ISO_8859_2		11	/* iso-2022-8bit-ss2 */
30 #define ISO_8859_3		12	/* iso-2022-8bit-ss2 */
31 #define ISO_8859_4		13	/* iso-2022-8bit-ss2 */
32 #define ISO_8859_5		14	/* iso-2022-8bit-ss2 */
33 #define ISO_8859_6		15	/* iso-2022-8bit-ss2 */
34 #define ISO_8859_7		16	/* iso-2022-8bit-ss2 */
35 #define ISO_8859_8		17	/* iso-2022-8bit-ss2 */
36 #define ISO_8859_9		18	/* iso-2022-8bit-ss2 */
37 #define ISO_8859_10		19	/* iso-2022-8bit-ss2 */
38 #define ISO_8859_11		20	/* iso-2022-8bit-ss2 */
39 #define ISO_8859_13		21	/* iso-2022-8bit-ss2 */
40 #define ISO_8859_14		22	/* iso-2022-8bit-ss2 */
41 #define ISO_8859_15		23	/* iso-2022-8bit-ss2 */
42 #define ISO_8859_16		24	/* iso-2022-8bit-ss2 */
43 
44 #define ISO_2022_CN		25	/* iso-2022-cn */
45 #define ISO_2022_JP		26	/* iso-2022-jp */
46 #define ISO_2022_KR		27	/* iso-2022-kr */
47 
48 #define RAW			28	/* raw mode */
49 
50 #define C_TABLE_SIZE		29	/* pseudo coding system */
51 
52 #define GL			0
53 #define GR			1
54 
55 #define G0			0
56 #define G1			1
57 #define G2			2
58 #define G3			3
59 
60 typedef struct {
61   byte      gset[ 2 ];
62   byte      cset[ 4 ];
63   byte      sset;
64   byte      attr;
65 } state_t;
66 
67 typedef struct {
68   byte      codingSystem;
69   boolean_t bit8;
70   byte      *codingSystemName;
71   state_t   state;
72 } c_table_t;
73 
74 public void CtableInit();
75 
76 #endif /* __CTABLE_T_H__ */
77