comparison lib/ctext.c @ 14:5a32b68b627d

imported patch 17_kinput2-v3.1-jisx0212.diff
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Mon, 08 Mar 2010 20:38:16 +0900
parents 92745d501b9a
children 7a454839a6de
comparison
equal deleted inserted replaced
13:eda83436b27e 14:5a32b68b627d
29 multi-byte 29 multi-byte
30 94chars ^ 2 30 94chars ^ 2
31 A GB Hanzi 31 A GB Hanzi
32 B JIS Kanji 1983 32 B JIS Kanji 1983
33 C KS Hangul/Hanja 33 C KS Hangul/Hanja
34 D JIS X0212
34 35
35 ------------------------------------------------------------------------------- 36 -------------------------------------------------------------------------------
36 COMPOUND_TEXT $B$N;EMM(B (Comopund Text Encoding Version 1 -- MIT X Consortium Standard) 37 COMPOUND_TEXT $B$N;EMM(B (Comopund Text Encoding Version 1 -- MIT X Consortium Standard)
37 $B!&(BG0 G1 $B$N$_$r;HMQ$9$k!#(BG2 G3 $B$O;HMQ$7$J$$!#(B 38 $B!&(BG0 G1 $B$N$_$r;HMQ$9$k!#(BG2 G3 $B$O;HMQ$7$J$$!#(B
38 $B!&(BG0 $B$,(B GL$B!"(BG1 $B$,(B GR $B$K8F$S=P$5$l$F$*$j!"$=$l$rJQ99$9$k$3$H$O$G$-$J$$!#(B 39 $B!&(BG0 $B$,(B GL$B!"(BG1 $B$,(B GR $B$K8F$S=P$5$l$F$*$j!"$=$l$rJQ99$9$k$3$H$O$G$-$J$$!#(B
64 * warranty. 65 * warranty.
65 * 66 *
66 * Author: Makoto Ishisone, Software Research Associates, Inc., Japan 67 * Author: Makoto Ishisone, Software Research Associates, Inc., Japan
67 * ishisone@sra.co.jp 68 * ishisone@sra.co.jp
68 */ 69 */
69
70 #ifndef lint 70 #ifndef lint
71 static char *rcsid = "$Id: ctext.c,v 2.6 1999/03/10 08:55:15 ishisone Exp $"; 71 static char *rcsid = "$Id: ctext.c,v 2.6 1999/03/10 08:55:15 ishisone Exp $";
72 #endif 72 #endif
73 73
74 typedef unsigned short wchar; 74 typedef unsigned short wchar;
175 g0 = MBCS|'B'; 175 g0 = MBCS|'B';
176 } 176 }
177 if (xstr) { 177 if (xstr) {
178 *xstr++ = (c >> 8) & 0xff; 178 *xstr++ = (c >> 8) & 0xff;
179 *xstr++ = c & 0xff; 179 *xstr++ = c & 0xff;
180 }
181 n += 2;
182 break;
183 case 0x8000:
184 if (g1 != (MBCS|'D')) {
185 if (xstr) {
186 *xstr++ = '\033';
187 *xstr++ = '$';
188 *xstr++ = ')';
189 *xstr++ = 'D';
190 }
191 n += 4;
192 g1 = MBCS|'D';
193 /*
194 * We have to invalidate G0 here,
195 * which is unnecessary if Xlib
196 * implementation is sane.
197 */
198 g0 = MBCS|'D';
199 }
200 if (xstr) {
201 *xstr++ = (c >> 8) & 0xff;
202 *xstr++ = (c & 0xff) | 0x80;
180 } 203 }
181 n += 2; 204 n += 2;
182 break; 205 break;
183 default: 206 default:
184 /* $BL5;k$9$k(B */ 207 /* $BL5;k$9$k(B */