diff options
author | Bruno Haible <bruno@clisp.org> | 2007-01-21 21:34:27 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2007-01-21 21:34:27 +0000 |
commit | 6984bc2a8dbe533274ee1869ba3c9e919040cf85 (patch) | |
tree | 805571638f1403088a010f7696c3aac582c37eb8 /lib/striconveh.h | |
parent | 09588236cbfd1a2fb863f9f4f6db8158e8bcf062 (diff) | |
download | gnulib-6984bc2a8dbe533274ee1869ba3c9e919040cf85.tar.gz |
Change specification of mem_cd_iconveh.
Diffstat (limited to 'lib/striconveh.h')
-rw-r--r-- | lib/striconveh.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/striconveh.h b/lib/striconveh.h index b528e5152f..2ea7d540f0 100644 --- a/lib/striconveh.h +++ b/lib/striconveh.h @@ -47,12 +47,13 @@ enum iconv_ilseq_handler (iconv_t)(-1) if FROM_CODESET is UTF-8). CD2 is the conversion descriptor from UTF-8 to TO_CODESET (or (iconv_t)(-1) if TO_CODESET is UTF-8). - *RESULTP should initially contain NULL or a malloced memory block. - May change the size of the allocated memory block in *RESULTP, storing - its new address in *RESULTP and its new length in *LENGTHP. + *RESULTP and *LENGTH should initially be a scratch buffer and its size, + or *RESULTP can initially be NULL. + May erase the contents of the memory at *RESULTP. Return value: 0 if successful, otherwise -1 and errno set. - If successful, the resulting string is stored in *RESULTP and its length - in *LENGTHP. */ + If successful: The resulting string is stored in *RESULTP and its length + in *LENGTHP. *RESULTP is set to a freshly allocated memory block, or is + unchanged if no dynamic memory allocation was necessary. */ extern int mem_cd_iconveh (const char *src, size_t srclen, iconv_t cd, iconv_t cd1, iconv_t cd2, |