#endif /* ENABLE_NLS */
assert (default_encoding == NULL);
- default_encoding = strdup (locale_charset ());
+ default_encoding = xstrdup (locale_charset ());
hmapx_init (&map);
}
set_default_encoding (const char *enc)
{
free (default_encoding);
- default_encoding = strdup (enc);
+ default_encoding = xstrdup (enc);
}
bool ok = true;
char *c_encoding;
char *loc_encoding;
- char *tmp = strdup (setlocale (LC_CTYPE, NULL));
+ char *tmp = xstrdup (setlocale (LC_CTYPE, NULL));
setlocale (LC_CTYPE, "C");
- c_encoding = strdup (locale_charset ());
+ c_encoding = xstrdup (locale_charset ());
setlocale (LC_CTYPE, loc);
- loc_encoding = strdup (locale_charset ());
+ loc_encoding = xstrdup (locale_charset ());
if ( 0 == strcmp (loc_encoding, c_encoding))
{
char radix_char;
- char *ol = strdup (setlocale (LC_NUMERIC, NULL));
+ char *ol = xstrdup (setlocale (LC_NUMERIC, NULL));
setlocale (LC_NUMERIC, "");
#if HAVE_NL_LANGINFO