1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
/* ----------------------------------------------------------
Hangul Code Choice Table -- Order SHOULD be preserved
Unknown ::
:: ISO-2022 : ____ 2 Byte code without table ____
:: KS-5601 : ____ 2 Byte Codes without jump ____
:: TR :: NB : ____ Multibyte Codes without jump ____
----------------------------------------------------------- */
#define UN 0 /* UNknown */
#define IS 10 /* ISo-2022 */
#define KS 20 /* KS-5601 */
#define TR 30 /* TRigem johap */
#define NB 40 /* N-Byte */
#define SK 41 /* Simulation Keyinput */
#define RO 42 /* ROman char */
#define CODE2(x) ( (x>=TR) ? 0 : ((x>KS)?x-KS+1:1) )
/* ----------------------------------------------------------
Hangul Code Table Size
----------------------------------------------------------- */
#define No2Bcode 2 /* Trigem2byte and KS2byte */
#define No3Bcode 3 /* NB, SK, RO */
#define NoUnSorted 40 /* 19+21 */
#define NoKSC 2390 /* 19+21+2350 */
/* ----------------------------------------------------------
System Parameters ( Main & PrintOut Routine )
----------------------------------------------------------- */
#define MAXBUFSIZE 128 /* should be less than 0xff */
#define MAXHANSIZE 1024 /* Maximum Hangul word size */
#define HAN 0
#define MULHAN 1
#define ENDHAN 2
#define ENG 3 /* Multibyte Hangul Input Scan Mode */
#define PRNONE 0
#define PRINTED 1 /* Output Routine Inner Stat */
/* ----------------------------------------------------------
Option Check Routine Static Variables
----------------------------------------------------------- */
#define InDEF IS
#define OutDEF KS
static char syn[]=" [-Iknt[iKnrst]] [ input_file(-) [output_file] ]";
static int in_choice[] =
{ UN, UN, UN, UN, UN, UN, UN, UN, IS, UN, KS, UN, UN,
NB, UN, UN, UN, UN, UN, TR, UN, UN, UN, UN, UN, UN };
static int out_choice[] =
{ UN, UN, UN, UN, UN, UN, UN, UN, IS, UN, KS, UN, UN,
NB, UN, UN, UN, RO, SK, TR, UN, UN, UN, UN, UN, UN };
|