projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
.
[gnulib.git]
/
lib
/
unicodeio.c
diff --git
a/lib/unicodeio.c
b/lib/unicodeio.c
index
a846bb0
..
9f90366
100644
(file)
--- a/
lib/unicodeio.c
+++ b/
lib/unicodeio.c
@@
-1,6
+1,6
@@
/* Unicode character output to streams with locale dependent encoding.
/* Unicode character output to streams with locale dependent encoding.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000
, 2001
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU Library General Public License as published
@@
-121,16
+121,14
@@
print_unicode_char (FILE *stream, unsigned int code)
if (!initialized)
{
if (!initialized)
{
- extern const char *locale_charset
(void
);
+ extern const char *locale_charset
PARAMS ((void)
);
const char *charset = locale_charset ();
const char *charset = locale_charset ();
- is_utf8 =
(charset != NULL && !strcmp (charset, UTF8_NAME)
);
+ is_utf8 =
!strcmp (charset, UTF8_NAME
);
#if HAVE_ICONV
if (!is_utf8)
{
#if HAVE_ICONV
if (!is_utf8)
{
- utf8_to_local = (charset != NULL
- ? iconv_open (charset, UTF8_NAME)
- : (iconv_t)(-1));
+ utf8_to_local = iconv_open (charset, UTF8_NAME);
if (utf8_to_local == (iconv_t)(-1))
{
/* For an unknown encoding, assume ASCII. */
if (utf8_to_local == (iconv_t)(-1))
{
/* For an unknown encoding, assume ASCII. */
@@
-170,7
+168,9
@@
print_unicode_char (FILE *stream, unsigned int code)
outbytesleft = sizeof (outbuf);
/* Convert the character from UTF-8 to the locale's charset. */
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)
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)