Mercurial > emacs
comparison src/coding.c @ 24667:6156dc5f5ce0
[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.
| author | Andrew Innes <andrewi@gnu.org> |
|---|---|
| date | Sun, 02 May 1999 10:05:22 +0000 |
| parents | 05c797dbc451 |
| children | 778b3f056f7f |
comparison
equal
deleted
inserted
replaced
| 24666:239ee0e7b828 | 24667:6156dc5f5ce0 |
|---|---|
| 2575 int result = CODING_FINISH_NORMAL; | 2575 int result = CODING_FINISH_NORMAL; |
| 2576 | 2576 |
| 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 { |
| 2584 case CODING_EOL_CRLF: | 2588 case CODING_EOL_CRLF: |
| 2585 { | 2589 { |
| 3238 if (VECTORP (subsidiaries) | 3242 if (VECTORP (subsidiaries) |
| 3239 && XVECTOR (subsidiaries)->size == 3) | 3243 && XVECTOR (subsidiaries)->size == 3) |
| 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 } |
| 3246 | 3251 |
| 3247 /* Emacs has a mechanism to automatically detect a coding system if it | 3252 /* Emacs has a mechanism to automatically detect a coding system if it |
