Age | Commit message (Collapse) | Author |
|
Bruno Haible <bruno@clisp.org>
* unicodeio.c (unicode_to_mb): New function, extracted from
print_unicode_char. Call failure callback instead of error.
(fwrite_success_callback): New function.
(exit_failure_callback): New function.
(fallback_failure_callback): New function.
(print_unicode_char): Call unicode_to_mb.
|
|
|
|
to avoid a warning. Add back 'const' to inptr.
|
|
local `inptr' to avoid warning with some system declarations of iconv.
|
|
|
|
|
|
|
|
|
|
|
|
(<limits.h>): Include if HAVE_LIMITS_H.
(MB_LEN_MAX): Define if limits.h doesn't.
(convert_unicode_char): New function, with the conversion part of the
old print_unicode_char. Use wctomb, not wcrtomb. Depend on
HAVE_WCTOMB, not HAVE_WCRTOMB.
(print_unicode_char): Use convert_unicode_char to do the conversion.
|
|
(wcrtomb): Provide fallback definition for broken platforms.
(print_unicode_char): New alternative definition for platforms where
wchar_t is Unicode.
|
|
|
|
Deal with the different error behaviour of Irix iconv.
|
|
Otherwise, include <strings.h>
|
|
(print_unicode_char): Pass the Unicode character to iconv in UTF-8
format instead of in UCS-4 with platform dependent endianness.
|
|
(errno): Declare if not defined.
|
|
One portability tweak:
guard inclusion of stddef.h.
|