Mercurial > emacs
comparison src/coding.c @ 23067:ac788ee31080
(ccl_coding_driver): Setup ccl->last_block properly.
(setup_coding_system): Correctly setup `valid_codes' member.
| author | Kenichi Handa <handa@m17n.org> |
|---|---|
| date | Tue, 18 Aug 1998 13:15:18 +0000 |
| parents | 0dc823b2335f |
| children | 910740dcedb5 |
comparison
equal
deleted
inserted
replaced
| 23066:d40f9a8d7779 | 23067:ac788ee31080 |
|---|---|
| 3084 val = Fplist_get (plist, Qvalid_codes); | 3084 val = Fplist_get (plist, Qvalid_codes); |
| 3085 if (CONSP (val)) | 3085 if (CONSP (val)) |
| 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; |
| 3094 else if (CONSP (this) | 3095 else if (CONSP (this) |
| 3095 && INTEGERP (XCONS (this)->car) | 3096 && INTEGERP (XCONS (this)->car) |
| 3603 int src_bytes, dst_bytes, encodep; | 3604 int src_bytes, dst_bytes, encodep; |
| 3604 { | 3605 { |
| 3605 struct ccl_program *ccl | 3606 struct ccl_program *ccl |
| 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; |
| 3609 | |
| 3610 if (encodep) | |
| 3611 ccl->last_block = coding->mode & CODING_MODE_LAST_BLOCK; | |
| 3608 | 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) |
| 3612 { | 3616 { |
