diff options
| author | Andrew Innes | 1999-05-02 10:05:22 +0000 |
|---|---|---|
| committer | Andrew Innes | 1999-05-02 10:05:22 +0000 |
| commit | 716e0b0ab9bff9358719803a607745387aca65f9 (patch) | |
| tree | 6c69fa69486e09521ef57d09ae453df478336114 /src/coding.c | |
| parent | 3102421f63b7ce05acf079625d2e8ff569cb6104 (diff) | |
| download | emacs-716e0b0ab9bff9358719803a607745387aca65f9.tar.gz emacs-716e0b0ab9bff9358719803a607745387aca65f9.zip | |
[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 363af3561f4..8b2bf7cac3d 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -2577,7 +2577,11 @@ decode_eol (coding, source, destination, src_bytes, dst_bytes) | |||
| 2577 | coding->fake_multibyte = 0; | 2577 | coding->fake_multibyte = 0; |
| 2578 | 2578 | ||
| 2579 | if (src_bytes <= 0) | 2579 | if (src_bytes <= 0) |
| 2580 | return result; | 2580 | { |
| 2581 | coding->produced = coding->produced_char = 0; | ||
| 2582 | coding->consumed = coding->consumed_char = 0; | ||
| 2583 | return result; | ||
| 2584 | } | ||
| 2581 | 2585 | ||
| 2582 | switch (coding->eol_type) | 2586 | switch (coding->eol_type) |
| 2583 | { | 2587 | { |
| @@ -3240,6 +3244,7 @@ setup_raw_text_coding_system (coding) | |||
| 3240 | coding->symbol | 3244 | coding->symbol |
| 3241 | = XVECTOR (subsidiaries)->contents[coding->eol_type]; | 3245 | = XVECTOR (subsidiaries)->contents[coding->eol_type]; |
| 3242 | } | 3246 | } |
| 3247 | setup_coding_system (coding->symbol, coding); | ||
| 3243 | } | 3248 | } |
| 3244 | return; | 3249 | return; |
| 3245 | } | 3250 | } |