diff options
| author | Kenichi Handa | 2000-08-16 11:19:34 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2000-08-16 11:19:34 +0000 |
| commit | bb10be8b6f10bc9a53f11869b1fb7f216394b852 (patch) | |
| tree | 9cc887225c24540002d25d8a94d59f1c701db586 /src/coding.c | |
| parent | 9d7bcb2ee809eecf41ffdecd4794ca62e44a5478 (diff) | |
| download | emacs-bb10be8b6f10bc9a53f11869b1fb7f216394b852.tar.gz emacs-bb10be8b6f10bc9a53f11869b1fb7f216394b852.zip | |
(encode_coding): Fix the bug of not flushing ISO escape sequence at
the end of the source block.
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/coding.c b/src/coding.c index a9704c04c7d..462f88b23cc 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -4186,7 +4186,7 @@ decode_coding (coding, source, destination, src_bytes, dst_bytes) | |||
| 4186 | unsigned char *dst = destination + coding->produced; | 4186 | unsigned char *dst = destination + coding->produced; |
| 4187 | 4187 | ||
| 4188 | src_bytes -= coding->consumed; | 4188 | src_bytes -= coding->consumed; |
| 4189 | coding->errors++; | 4189 | coding->errors++; |
| 4190 | if (COMPOSING_P (coding)) | 4190 | if (COMPOSING_P (coding)) |
| 4191 | DECODE_COMPOSITION_END ('1'); | 4191 | DECODE_COMPOSITION_END ('1'); |
| 4192 | while (src_bytes--) | 4192 | while (src_bytes--) |
| @@ -4255,10 +4255,6 @@ encode_coding (coding, source, destination, src_bytes, dst_bytes) | |||
| 4255 | encode_eol (coding, source, destination, src_bytes, dst_bytes); | 4255 | encode_eol (coding, source, destination, src_bytes, dst_bytes); |
| 4256 | } | 4256 | } |
| 4257 | 4257 | ||
| 4258 | if (coding->result == CODING_FINISH_INSUFFICIENT_SRC | ||
| 4259 | && coding->consumed == src_bytes) | ||
| 4260 | coding->result = CODING_FINISH_NORMAL; | ||
| 4261 | |||
| 4262 | if (coding->mode & CODING_MODE_LAST_BLOCK | 4258 | if (coding->mode & CODING_MODE_LAST_BLOCK |
| 4263 | && coding->result == CODING_FINISH_INSUFFICIENT_SRC) | 4259 | && coding->result == CODING_FINISH_INSUFFICIENT_SRC) |
| 4264 | { | 4260 | { |
| @@ -4284,6 +4280,10 @@ encode_coding (coding, source, destination, src_bytes, dst_bytes) | |||
| 4284 | coding->result = CODING_FINISH_NORMAL; | 4280 | coding->result = CODING_FINISH_NORMAL; |
| 4285 | } | 4281 | } |
| 4286 | 4282 | ||
| 4283 | if (coding->result == CODING_FINISH_INSUFFICIENT_SRC | ||
| 4284 | && coding->consumed == src_bytes) | ||
| 4285 | coding->result = CODING_FINISH_NORMAL; | ||
| 4286 | |||
| 4287 | return coding->result; | 4287 | return coding->result; |
| 4288 | } | 4288 | } |
| 4289 | 4289 | ||