Mercurial > emacs
comparison src/coding.c @ 21502:388b7c77183b
(code_convert_string): Give decode_coding correct byte
length of source text.
| author | Kenichi Handa <handa@m17n.org> |
|---|---|
| date | Tue, 14 Apr 1998 01:06:44 +0000 |
| parents | 4c89837392b3 |
| children | eeffe4ca2306 |
comparison
equal
deleted
inserted
replaced
| 21501:c8c409640bf3 | 21502:388b7c77183b |
|---|---|
| 4386 bcopy (XSTRING (str)->data, buf, from); | 4386 bcopy (XSTRING (str)->data, buf, from); |
| 4387 result = (encodep | 4387 result = (encodep |
| 4388 ? encode_coding (coding, XSTRING (str)->data + from, | 4388 ? encode_coding (coding, XSTRING (str)->data + from, |
| 4389 buf + from, to_byte - from, len) | 4389 buf + from, to_byte - from, len) |
| 4390 : decode_coding (coding, XSTRING (str)->data + from, | 4390 : decode_coding (coding, XSTRING (str)->data + from, |
| 4391 buf + from, to - from, len)); | 4391 buf + from, to_byte - from, len)); |
| 4392 if (! encodep && result == CODING_FINISH_INCONSISTENT_EOL) | 4392 if (! encodep && result == CODING_FINISH_INCONSISTENT_EOL) |
| 4393 { | 4393 { |
| 4394 /* We simple try to decode the whole string again but without | 4394 /* We simple try to decode the whole string again but without |
| 4395 eol-conversion this time. */ | 4395 eol-conversion this time. */ |
| 4396 coding->eol_type = CODING_EOL_LF; | 4396 coding->eol_type = CODING_EOL_LF; |
