2
* KAKASI (Kanji Kana Simple inversion program)
3
* $Id: ee2.c,v 1.3 2001/01/16 07:51:47 rug Exp $
5
* Hironobu Takahashi (takahasi@tiny.or.jp)
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either versions 2, or (at your option)
12
* This program is distributed in the hope that it will be useful
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with KAKASI, see the file COPYING. If not, write to the Free
19
* Software Foundation Inc., 59 Temple Place - Suite 330, Boston, MA
30
E2alphabet_copy(n, str, type)
37
for (i = 0; str[i] != '\0'; ++ i) {
47
E2alphabet(c, n, type)
52
static char E2alphabet_a1table[94][12] = {
53
" ",",",".",",",".",".",":",";","?","!","\"","(maru)","'","`","..","~",
54
"~","_","(kurikaesi)","(kurikaesi)","(kurikaesi)","(kurikaesi)","(kurikaesi)",
55
"(kurikaesi)","(kurikaesi)","sime","(maru)","^","-","-","/","\\","~","||",
56
"|","...","..","`","'","\"","\"","(",")","[","]","[","]","{","}","<",">",
57
"<<",">>","(",")","(",")","(",")","+","-","+-","X","/","=","!=","<",">",
58
"<=",">=","(kigou)","...","(osu)","(mesu)","(do)","'","\"","(Sessi)","\\",
59
"$","(cent)","(fran)","%","#","&","*","@","(setu)","(hosi)","(hosi)","(maru)",
60
"(maru)","(maru)","(diamond)" };
61
static char E2greek_table[56][8] = {
62
"Alpha", "Beta", "Gamma", "Delta", "Epsilon", "Zeta", "Eta", "Theta",
63
"Iota", "Kappa", "Lambda", "Mu", "Nu", "Xi", "Omicron", "Pi", "Rho",
64
"Sigma", "Tau", "Upsilon", "Phi", "Chi", "Psi", "Omega",
65
"", "", "", "", "", "", "", "",
66
"alpha", "beta", "gamma", "delta", "epsilon", "zeta", "eta", "theta",
67
"iota", "kappa", "lambda", "mu", "nu", "xi", "omicron", "pi", "rho",
68
"sigma", "tau", "upsilon", "phi", "chi", "psi", "omega"};
70
switch(c[0].c1) { /* Management is divided into every classification. */
71
case 0xa1: /* It changes by using the table because sign/others are mixed in the first district. */
72
if ((0xa1 <= c[0].c2) && (c[0].c2 < 0xa1 + 94)) {
73
E2alphabet_copy(n, E2alphabet_a1table[c[0].c2-0xa1], type);
76
E2alphabet_copy(n, "??", type);
79
case 0xa2: /* A sign is contained in the second district. Because it is troublesome, (kigou) is completely taken. */
80
E2alphabet_copy(n, "(kigou)", type);
82
case 0xa3: /* Ascii and number are contained in the third district. */
84
n[0].c1 = c[0].c2 & 0x7f; /* This is corner-cutting. The character which isn't defined is done somehow. */
92
#endif /* WAKATIGAKI */
94
case 0xa4: /* HIRAGANA */
95
return H2rom(c, n, type);
96
case 0xa5: /* KATAKANA */
97
return K2rom(c, n, type);
98
case 0xa6: /* The sixth district is Greek. */
99
if ((0xa1 <= c[0].c2) && (c[0].c2 < 0xa1 + 56)) {
100
E2alphabet_copy(n, E2greek_table[c[0].c2-0xa1], type);
103
E2alphabet_copy(n, "??", type);
106
case 0xa7: /* The seventh district is Russian. */
107
E2alphabet_copy(n, "(Russia)", type);
109
default: /* The eighth district line base settlement. You have only to read it except for that with what. */
110
E2alphabet_copy(n, "??", type);
120
return E2alphabet(c, n, ASCII);
128
return E2alphabet(c, n, JISROMAN);