9 unsigned KCC_check(s
, extend
)
13 register unsigned code
, c
;
15 char str
[LENLINE
], *dummy
;
17 enum mode gsmode
; /* guess: M_ASCII M_KANJI M_SO */
18 unsigned long insi
; /* JIS shift-in sequence flag */
19 unsigned long inso
; /* JIS shift-out sequence flag
20 * including "ESC(I" */
21 unsigned long innj
; /* JIS 1990 sequence flag */
22 unsigned long ingj
; /* JIS 1990 aux flag */
25 code
= extend
? BIT8
: BIT8
& ~DEC
;
27 insi
= inso
= innj
= ingj
= 0;
28 while ((len
= Kcc_getstr(str
, sizeof str
, &dummy
)) != 0) {
29 c
= Kcc_guess(str
, len
, extend
, 0, &gsmode
, &insi
, &inso
, &innj
, &ingj
);
30 code
|= c
& (JIS
| NONASCII
), code
&= c
| ~BIT8
;
31 if (code
& NONASCII
&& !(code
& BIT8
))
35 return Kcc_showcode(code
);