From: Kenichi Handa Date: Tue, 6 Mar 2001 02:55:30 +0000 (+0000) Subject: (ccl_driver) : Fix for the case X-Git-Tag: emacs-pretest-21.0.100~198 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=38b9ed6a3530f7966b27dc63dd58c705b25b5b01;p=emacs.git (ccl_driver) : Fix for the case that the source is unibyte. --- diff --git a/src/ccl.c b/src/ccl.c index 285888f744f..ce0a1bd4402 100644 --- a/src/ccl.c +++ b/src/ccl.c @@ -1248,6 +1248,16 @@ ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed) goto ccl_read_multibyte_character_suspend; } + if (!ccl->multibyte) + { + int bytes; + if (!UNIBYTE_STR_AS_MULTIBYTE_P (src, src_end - src, bytes)) + { + reg[RRR] = CHARSET_8_BIT_CONTROL; + reg[rrr] = *src++; + break; + } + } i = *src++; if (i == '\n' && ccl->eol_type != CODING_EOL_LF) { @@ -1335,6 +1345,12 @@ ccl_driver (ccl, source, destination, src_bytes, dst_bytes, consumed) break; ccl_read_multibyte_character_suspend: + if (src <= src_end && !ccl->multibyte && ccl->last_block) + { + reg[RRR] = CHARSET_8_BIT_CONTROL; + reg[rrr] = i; + break; + } src--; if (ccl->last_block) {