diff options
| author | Kenichi Handa | 2000-12-21 23:22:16 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2000-12-21 23:22:16 +0000 |
| commit | 80e0ca99ce27986ad7b977dcacb1b8d9e9abb3df (patch) | |
| tree | 3fb4018e498de080a5a270f5332f118dcb4655b8 /src/coding.c | |
| parent | 886bc93350e9e760248db22b208c54b8e1718fd1 (diff) | |
| download | emacs-80e0ca99ce27986ad7b977dcacb1b8d9e9abb3df.tar.gz emacs-80e0ca99ce27986ad7b977dcacb1b8d9e9abb3df.zip | |
(ccl_coding_driver): Initialize ccl->cr_consumed.
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/coding.c b/src/coding.c index 18958564e52..10be961c3aa 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -4022,12 +4022,22 @@ ccl_coding_driver (coding, source, destination, src_bytes, dst_bytes, encodep) | |||
| 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 |