Mercurial > hg > octave-lyh > gnulib-hg
changeset 3123:f65bb2158462
(print_unicode_char): Cast the second iconv() arg,
to avoid a warning. Add back 'const' to inptr.
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Sun, 21 Jan 2001 09:40:43 +0000 |
parents | b2b1e6be3824 |
children | c0296bf3b04f |
files | lib/unicodeio.c |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lib/unicodeio.c +++ b/lib/unicodeio.c @@ -158,7 +158,7 @@ { #if HAVE_ICONV char outbuf[25]; - char *inptr; + const char *inptr; size_t inbytesleft; char *outptr; size_t outbytesleft; @@ -170,7 +170,9 @@ outbytesleft = sizeof (outbuf); /* Convert the character from UTF-8 to the locale's charset. */ - res = iconv (utf8_to_local, &inptr, &inbytesleft, &outptr, &outbytesleft); + res = iconv (utf8_to_local, + (ICONV_CONST char **)&inptr, &inbytesleft, + &outptr, &outbytesleft); if (inbytesleft > 0 || res == (size_t)(-1) /* Irix iconv() inserts a NUL byte if it cannot convert. */ # if !defined _LIBICONV_VERSION && (defined sgi || defined __sgi)