Mercurial > emacs
comparison src/coding.c @ 34813:e112f39ea5b6
(ccl_coding_driver): Initialize ccl->cr_consumed.
| author | Kenichi Handa <handa@m17n.org> |
|---|---|
| date | Thu, 21 Dec 2000 23:22:16 +0000 |
| parents | f727eb496b4e |
| children | b469d29c0815 |
comparison
equal
deleted
inserted
replaced
| 34812:6506a2f76b62 | 34813:e112f39ea5b6 |
|---|---|
| 4020 = encodep ? &coding->spec.ccl.encoder : &coding->spec.ccl.decoder; | 4020 = encodep ? &coding->spec.ccl.encoder : &coding->spec.ccl.decoder; |
| 4021 int result; | 4021 int result; |
| 4022 | 4022 |
| 4023 ccl->last_block = coding->mode & CODING_MODE_LAST_BLOCK; | 4023 ccl->last_block = coding->mode & CODING_MODE_LAST_BLOCK; |
| 4024 if (encodep) | 4024 if (encodep) |
| 4025 ccl->eol_type = coding->eol_type; | 4025 { |
| 4026 /* On encoding, EOL format is converted within ccl_driver. For | |
| 4027 that, setup proper information in the structure CCL. */ | |
| 4028 ccl->eol_type = coding->eol_type; | |
| 4029 if (ccl->eol_type ==CODING_EOL_UNDECIDED) | |
| 4030 ccl->eol_type = CODING_EOL_LF; | |
| 4031 ccl->cr_consumed = coding->spec.ccl.cr_carryover; | |
| 4032 } | |
| 4026 ccl->multibyte = coding->src_multibyte; | 4033 ccl->multibyte = coding->src_multibyte; |
| 4027 coding->produced = ccl_driver (ccl, source, destination, | 4034 coding->produced = ccl_driver (ccl, source, destination, |
| 4028 src_bytes, dst_bytes, &(coding->consumed)); | 4035 src_bytes, dst_bytes, &(coding->consumed)); |
| 4029 if (encodep) | 4036 if (encodep) |
| 4030 coding->produced_char = coding->produced; | 4037 { |
| 4038 coding->produced_char = coding->produced; | |
| 4039 coding->spec.ccl.cr_carryover = ccl->cr_consumed; | |
| 4040 } | |
| 4031 else | 4041 else |
| 4032 { | 4042 { |
| 4033 int bytes | 4043 int bytes |
| 4034 = dst_bytes ? dst_bytes : source + coding->consumed - destination; | 4044 = dst_bytes ? dst_bytes : source + coding->consumed - destination; |
| 4035 coding->produced = str_as_multibyte (destination, bytes, | 4045 coding->produced = str_as_multibyte (destination, bytes, |
