diff options
author | Andrew Innes <[email protected]> | 1999-05-02 10:05:22 +0000 |
---|---|---|
committer | Andrew Innes <[email protected]> | 1999-05-02 10:05:22 +0000 |
commit | 716e0b0ab9bff9358719803a607745387aca65f9 (patch) | |
tree | 6c69fa69486e09521ef57d09ae453df478336114 /src/coding.c | |
parent | 3102421f63b7ce05acf079625d2e8ff569cb6104 (diff) |
[andrewi]
(decode_eol): Set produced/consumed values to zero if
src_bytes is <= 0 on entry.
[handa]
(setup_raw_text_coding_system): Call
setup_coding_system to initialize the fields of struct
coding_system correctly.
Diffstat (limited to 'src/coding.c')
-rw-r--r-- | src/coding.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/coding.c b/src/coding.c index 363af3561f..8b2bf7cac3 100644 --- a/src/coding.c +++ b/src/coding.c @@ -2577,7 +2577,11 @@ decode_eol (coding, source, destination, src_bytes, dst_bytes) coding->fake_multibyte = 0; if (src_bytes <= 0) - return result; + { + coding->produced = coding->produced_char = 0; + coding->consumed = coding->consumed_char = 0; + return result; + } switch (coding->eol_type) { @@ -3240,6 +3244,7 @@ setup_raw_text_coding_system (coding) coding->symbol = XVECTOR (subsidiaries)->contents[coding->eol_type]; } + setup_coding_system (coding->symbol, coding); } return; } |