rem: long (*success) PARAMS ((const char *buf, size_t buflen, void *callback_arg)), long (*failure) PARAMS ((unsigned int code, const char *msg, void *callback_arg)),
add: long (*success) (const char *buf, size_t buflen, void *callback_arg), long (*failure) (unsigned int code, const char *msg, void *callback_arg),
context: unicode_to_mb (unsigned int code,	       long (*success) PARAMS ((const char *buf, size_t buflen,					void *callback_arg)),	       long (*failure) PARAMS ((unsigned int code, const char *msg,					void *callback_arg)),	       void *callback_arg){  static int initialized;  static int is_utf8;#if HAVE_ICONV  static iconv_t utf8_to_local;#endif  char inbuf[6];  int count;  if (!initialized)    {      extern const char *locale_charset PARAMS ((void));      const char *charset = locale_charset ();      is_utf8 = !strcmp (charset, UTF8_NAME);#if HAVE_ICONV      if (!is_utf8)	{	  utf8_to_local = iconv_open (charset, UTF8_NAME);	  if (utf8_to_local == (iconv_t)(-1))	    /* For an unknown encoding, assume ASCII.  */	    utf8_to_local = iconv_open ("ASCII", UTF8_NAME);	}#endif      initialized = 1;    }  /* Test whether the utf8_to_local converter is available at all.  */  if (!is_utf8)    {#if HAVE_ICONV      if (utf8_to_local == (iconv_t)(-1))	return failure (code, N_("iconv function not usable"), callback_arg);#else      return failure (code, N_("iconv function not available"), callback_arg);#endif    }  /* Convert the character to UTF-8.  */  count = utf8_wctomb ((unsigned char *) inbuf, code);  if (count < 0)    return failure (code, N_("character out of range"), callback_arg);#if HAVE_ICONV  if (!is_utf8)    {      char outbuf[25];      const char *inptr;      size_t inbytesleft;      char *outptr;      size_t outbytesleft;      size_t res;      inptr = inbuf;      inbytesleft = count;      outptr = outbuf;      outbytesleft = sizeof (outbuf);      /* Convert the character from UTF-8 to the locale's charset.  */      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)	  || (res > 0 && code != 0 && outptr - outbuf == 1 && *outbuf == '\0')# endif         )	return failure (code, NULL, callback_arg);      /* Avoid glibc-2.1 bug and Solaris 2.7 bug.  */# if defined _LIBICONV_VERSION \    || !((__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1) || defined __sun)      /* Get back to the initial shift state.  */      res = iconv (utf8_to_local, NULL, NULL, &outptr, &outbytesleft);      if (res == (size_t)(-1))	return failure (code, NULL, callback_arg);# endif      return success (outbuf, outptr - outbuf, callback_arg);    }#endif  /* At this point, is_utf8 is true, so no conversion is needed.  */  return success (inbuf, count, callback_arg);}