diff options
| author | Stefan Monnier | 2019-07-04 10:13:57 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2019-07-04 10:13:57 -0400 |
| commit | 2bc90e0ce0f349b8c80aa8df782f991b64aa7398 (patch) | |
| tree | 6fa53a0885048c2cf02b1b2f2edfe0c8efb17aca /src/coding.c | |
| parent | 138060e3661470128a071d17a48671842f108343 (diff) | |
| download | emacs-2bc90e0ce0f349b8c80aa8df782f991b64aa7398.tar.gz emacs-2bc90e0ce0f349b8c80aa8df782f991b64aa7398.zip | |
* src/coding.c (decode_coding): Improve doc.
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/coding.c b/src/coding.c index 59589caee61..e90d57144f6 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -7324,9 +7324,13 @@ produce_annotation (struct coding_system *coding, ptrdiff_t pos) | |||
| 7324 | In this case, if CODING->src_pos is positive, it is a position of | 7324 | In this case, if CODING->src_pos is positive, it is a position of |
| 7325 | the source text in the buffer, otherwise, the source text is in the | 7325 | the source text in the buffer, otherwise, the source text is in the |
| 7326 | gap area of the buffer, and CODING->src_pos specifies the offset of | 7326 | gap area of the buffer, and CODING->src_pos specifies the offset of |
| 7327 | the text from GPT (which must be the same as PT). If this is the | 7327 | the text from the end of the gap (and GPT must be equal to PT). |
| 7328 | same buffer as CODING->dst_object, CODING->src_pos must be | 7328 | |
| 7329 | negative. | 7329 | When the text is taken from the gap, it can't be at the beginning |
| 7330 | of the gap because the new decoded text is progressively acumulated | ||
| 7331 | at the beginning of the gap before it gets inserted at PT (this way, | ||
| 7332 | as the output grows, the input shrinks, so we only need to allocate | ||
| 7333 | enough space for `max(IN, OUT)` instead of `IN + OUT`). | ||
| 7330 | 7334 | ||
| 7331 | If CODING->src_object is a string, CODING->src_pos is an index to | 7335 | If CODING->src_object is a string, CODING->src_pos is an index to |
| 7332 | that string. | 7336 | that string. |