diff options
| author | Kenichi Handa | 1999-04-06 12:34:12 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1999-04-06 12:34:12 +0000 |
| commit | 52d41803bec65198a696142f9bcb73ce9870c261 (patch) | |
| tree | 03dd1894c5a44e46b008baeeda2682468b4a2b09 /src | |
| parent | 6076842800e60d758b460ccf9e98dbf891956682 (diff) | |
| download | emacs-52d41803bec65198a696142f9bcb73ce9870c261.tar.gz emacs-52d41803bec65198a696142f9bcb73ce9870c261.zip | |
Add comments for decode_coding and encode_coding.
Diffstat (limited to 'src')
| -rw-r--r-- | src/coding.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/src/coding.c b/src/coding.c index 97b806eabd2..363af3561f4 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -3729,7 +3729,17 @@ ccl_coding_driver (coding, source, destination, src_bytes, dst_bytes, encodep) | |||
| 3729 | 3729 | ||
| 3730 | /* See "GENERAL NOTES about `decode_coding_XXX ()' functions". Before | 3730 | /* See "GENERAL NOTES about `decode_coding_XXX ()' functions". Before |
| 3731 | decoding, it may detect coding system and format of end-of-line if | 3731 | decoding, it may detect coding system and format of end-of-line if |
| 3732 | those are not yet decided. */ | 3732 | those are not yet decided. |
| 3733 | |||
| 3734 | This function does not make full use of DESTINATION buffer. For | ||
| 3735 | instance, if coding->type is coding_type_iso2022, it uses only | ||
| 3736 | (DST_BYTES - 7) bytes of DESTINATION buffer. In the case that | ||
| 3737 | DST_BYTES is decided by the function decoding_buffer_size, it | ||
| 3738 | contains extra 256 bytes (defined by CONVERSION_BUFFER_EXTRA_ROOM). | ||
| 3739 | So, this function can decode the full SOURCE. But, in the other | ||
| 3740 | case, if you want to avoid carry over, you must supply at least 7 | ||
| 3741 | bytes more area in DESTINATION buffer than expected maximum bytes | ||
| 3742 | that will be produced by this function. */ | ||
| 3733 | 3743 | ||
| 3734 | int | 3744 | int |
| 3735 | decode_coding (coding, source, destination, src_bytes, dst_bytes) | 3745 | decode_coding (coding, source, destination, src_bytes, dst_bytes) |
| @@ -3812,7 +3822,17 @@ decode_coding (coding, source, destination, src_bytes, dst_bytes) | |||
| 3812 | return result; | 3822 | return result; |
| 3813 | } | 3823 | } |
| 3814 | 3824 | ||
| 3815 | /* See "GENERAL NOTES about `encode_coding_XXX ()' functions". */ | 3825 | /* See "GENERAL NOTES about `encode_coding_XXX ()' functions". |
| 3826 | |||
| 3827 | This function does not make full use of DESTINATION buffer. For | ||
| 3828 | instance, if coding->type is coding_type_iso2022, it uses only | ||
| 3829 | (DST_BYTES - 20) bytes of DESTINATION buffer. In the case that | ||
| 3830 | DST_BYTES is decided by the function encoding_buffer_size, it | ||
| 3831 | contains extra 256 bytes (defined by CONVERSION_BUFFER_EXTRA_ROOM). | ||
| 3832 | So, this function can encode the full SOURCE. But, in the other | ||
| 3833 | case, if you want to avoid carry over, you must supply at least 20 | ||
| 3834 | bytes more area in DESTINATION buffer than expected maximum bytes | ||
| 3835 | that will be produced by this function. */ | ||
| 3816 | 3836 | ||
| 3817 | int | 3837 | int |
| 3818 | encode_coding (coding, source, destination, src_bytes, dst_bytes) | 3838 | encode_coding (coding, source, destination, src_bytes, dst_bytes) |