diff options
| author | Kenichi Handa | 1998-08-18 13:15:18 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1998-08-18 13:15:18 +0000 |
| commit | 7b179c2dc2fb8f2e8a4cfad9a8c2bf0af1b37062 (patch) | |
| tree | d6747df70ffafb9058f74f0894adbd4edfa25917 /src/coding.c | |
| parent | 1814bd62c5029fb0589f1b755c1605316f0b671f (diff) | |
| download | emacs-7b179c2dc2fb8f2e8a4cfad9a8c2bf0af1b37062.tar.gz emacs-7b179c2dc2fb8f2e8a4cfad9a8c2bf0af1b37062.zip | |
(ccl_coding_driver): Setup ccl->last_block properly.
(setup_coding_system): Correctly setup `valid_codes' member.
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/coding.c b/src/coding.c index e9227a2ac7b..f44a0a09d40 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -3086,8 +3086,9 @@ setup_coding_system (coding_system, coding) | |||
| 3086 | { | 3086 | { |
| 3087 | Lisp_Object this; | 3087 | Lisp_Object this; |
| 3088 | 3088 | ||
| 3089 | for (this = XCONS (val)->car; CONSP (val); val = XCONS (val)->cdr) | 3089 | for (; CONSP (val); val = XCONS (val)->cdr) |
| 3090 | { | 3090 | { |
| 3091 | this = XCONS (val)->car; | ||
| 3091 | if (INTEGERP (this) | 3092 | if (INTEGERP (this) |
| 3092 | && XINT (this) >= 0 && XINT (this) < 256) | 3093 | && XINT (this) >= 0 && XINT (this) < 256) |
| 3093 | coding->spec.ccl.valid_codes[XINT (this)] = 1; | 3094 | coding->spec.ccl.valid_codes[XINT (this)] = 1; |
| @@ -3606,6 +3607,9 @@ ccl_coding_driver (coding, source, destination, src_bytes, dst_bytes, encodep) | |||
| 3606 | = encodep ? &coding->spec.ccl.encoder : &coding->spec.ccl.decoder; | 3607 | = encodep ? &coding->spec.ccl.encoder : &coding->spec.ccl.decoder; |
| 3607 | int result; | 3608 | int result; |
| 3608 | 3609 | ||
| 3610 | if (encodep) | ||
| 3611 | ccl->last_block = coding->mode & CODING_MODE_LAST_BLOCK; | ||
| 3612 | |||
| 3609 | coding->produced = ccl_driver (ccl, source, destination, | 3613 | coding->produced = ccl_driver (ccl, source, destination, |
| 3610 | src_bytes, dst_bytes, &(coding->consumed)); | 3614 | src_bytes, dst_bytes, &(coding->consumed)); |
| 3611 | if (encodep) | 3615 | if (encodep) |