comparison src/coding.c @ 23201:392b44751a22

(ccl_coding_driver): Always calculate correct mulibyte chars in produced byte sequence. (Ffind_operation_coding_system): Doc-string fixed.
author Kenichi Handa <handa@m17n.org>
date Mon, 07 Sep 1998 13:39:15 +0000
parents b2770410c752
children 2f8585bcea90
comparison
equal deleted inserted replaced
23200:4750ba95a176 23201:392b44751a22
3610 3610
3611 ccl->last_block = coding->mode & CODING_MODE_LAST_BLOCK; 3611 ccl->last_block = coding->mode & CODING_MODE_LAST_BLOCK;
3612 3612
3613 coding->produced = ccl_driver (ccl, source, destination, 3613 coding->produced = ccl_driver (ccl, source, destination,
3614 src_bytes, dst_bytes, &(coding->consumed)); 3614 src_bytes, dst_bytes, &(coding->consumed));
3615 if (encodep) 3615 coding->produced_char
3616 { 3616 = multibyte_chars_in_text (destination, coding->produced);
3617 coding->produced_char = coding->produced; 3617 coding->consumed_char
3618 coding->consumed_char 3618 = multibyte_chars_in_text (source, coding->consumed);
3619 = multibyte_chars_in_text (source, coding->consumed); 3619
3620 }
3621 else
3622 {
3623 coding->produced_char
3624 = multibyte_chars_in_text (destination, coding->produced);
3625 coding->consumed_char = coding->consumed;
3626 }
3627 switch (ccl->status) 3620 switch (ccl->status)
3628 { 3621 {
3629 case CCL_STAT_SUSPEND_BY_SRC: 3622 case CCL_STAT_SUSPEND_BY_SRC:
3630 result = CODING_FINISH_INSUFFICIENT_SRC; 3623 result = CODING_FINISH_INSUFFICIENT_SRC;
3631 break; 3624 break;
4986 4979
4987 4980
4988 DEFUN ("find-operation-coding-system", Ffind_operation_coding_system, 4981 DEFUN ("find-operation-coding-system", Ffind_operation_coding_system,
4989 Sfind_operation_coding_system, 1, MANY, 0, 4982 Sfind_operation_coding_system, 1, MANY, 0,
4990 "Choose a coding system for an operation based on the target name.\n\ 4983 "Choose a coding system for an operation based on the target name.\n\
4991 The value names a pair of coding systems: (DECODING-SYSTEM ENCODING-SYSTEM).\n\ 4984 The value names a pair of coding systems: (DECODING-SYSTEM . ENCODING-SYSTEM).\n\
4992 DECODING-SYSTEM is the coding system to use for decoding\n\ 4985 DECODING-SYSTEM is the coding system to use for decoding\n\
4993 \(in case OPERATION does decoding), and ENCODING-SYSTEM is the coding system\n\ 4986 \(in case OPERATION does decoding), and ENCODING-SYSTEM is the coding system\n\
4994 for encoding (in case OPERATION does encoding).\n\ 4987 for encoding (in case OPERATION does encoding).\n\
4995 \n\ 4988 \n\
4996 The first argument OPERATION specifies an I/O primitive:\n\ 4989 The first argument OPERATION specifies an I/O primitive:\n\