Mercurial > emacs
changeset 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 | 6506a2f76b62 |
children | ce9ed5ad8fa2 |
files | src/coding.c |
diffstat | 1 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/coding.c Thu Dec 21 23:17:22 2000 +0000 +++ b/src/coding.c Thu Dec 21 23:22:16 2000 +0000 @@ -4022,12 +4022,22 @@ ccl->last_block = coding->mode & CODING_MODE_LAST_BLOCK; if (encodep) - ccl->eol_type = coding->eol_type; + { + /* On encoding, EOL format is converted within ccl_driver. For + that, setup proper information in the structure CCL. */ + ccl->eol_type = coding->eol_type; + if (ccl->eol_type ==CODING_EOL_UNDECIDED) + ccl->eol_type = CODING_EOL_LF; + ccl->cr_consumed = coding->spec.ccl.cr_carryover; + } ccl->multibyte = coding->src_multibyte; coding->produced = ccl_driver (ccl, source, destination, src_bytes, dst_bytes, &(coding->consumed)); if (encodep) - coding->produced_char = coding->produced; + { + coding->produced_char = coding->produced; + coding->spec.ccl.cr_carryover = ccl->cr_consumed; + } else { int bytes