aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/coding.c')
-rw-r--r--src/coding.c24
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
3734int 3744int
3735decode_coding (coding, source, destination, src_bytes, dst_bytes) 3745decode_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
3817int 3837int
3818encode_coding (coding, source, destination, src_bytes, dst_bytes) 3838encode_coding (coding, source, destination, src_bytes, dst_bytes)