From aa4b3e5228baa070d1681cdae3278e4c2486c217 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 19 Jan 2000 03:32:12 +0000 Subject: [PATCH] Update after last bugfix in iconv implementation. --- manual/charset.texi | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/manual/charset.texi b/manual/charset.texi index 30bc74a83fa..51d358cfea8 100644 --- a/manual/charset.texi +++ b/manual/charset.texi @@ -1750,10 +1750,10 @@ desirable solution. Therefore future versions will provide better ones but they are not yet finished. If all input from the input buffer is successfully converted and stored -in the output buffer the function returns the number of conversions -performed. In all other cases the return value is @code{(size_t) -1} -and @code{errno} is set appropriately. In this case the value pointed -to by @var{inbytesleft} is nonzero. +in the output buffer the function returns the number of non-reversible +conversions performed. In all other cases the return value is +@code{(size_t) -1} and @code{errno} is set appropriately. In this case +the value pointed to by @var{inbytesleft} is nonzero. @table @code @item EILSEQ @@ -2667,7 +2667,7 @@ last written byte. This gives the caller the information on how much text is available in the output buffer. Beside this the variable pointed to by the fifth parameter, which is of type @code{size_t}, must be incremented by the number of characters (@emph{not bytes}) which were -written in the output buffer. Then the function can return. +converted in a non-reversible way. Then the function can return. In case the step is not the last one the later conversion functions have to get a chance to do their work. Therefore the appropriate conversion @@ -2787,10 +2787,6 @@ gconv (struct gconv_step *step, struct gconv_step_data *data, char *outend = data->outbufend; char *outptr; - /* @r{This variable is used to count the number of characters} - @r{we actually converted.} */ - size_t converted = 0; - do @{ /* @r{Remember the start value for this round.} */ @@ -2811,8 +2807,8 @@ gconv (struct gconv_step *step, struct gconv_step_data *data, @r{available.} */ data->outbuf = outbuf; - /* @r{Remember how many characters we converted.} */ - *written += converted; + /* @r{If any non-reversible conversions were performed,} + @r{add the number to @code{*written}.} */ break; @} -- 2.47.2