/* Character set conversion support for GDB.
- Copyright (C) 2001-2019 Free Software Foundation, Inc.
+ Copyright (C) 2001-2020 Free Software Foundation, Inc.
This file is part of GDB.
#ifdef ICONV_BIN
{
- char *iconv_dir = relocate_gdb_directory (ICONV_BIN,
- ICONV_BIN_RELOCATABLE);
- iconv_program = concat (iconv_dir, SLASH_STRING, "iconv", NULL);
- xfree (iconv_dir);
+ std::string iconv_dir = relocate_gdb_directory (ICONV_BIN,
+ ICONV_BIN_RELOCATABLE);
+ iconv_program
+ = concat (iconv_dir.c_str(), SLASH_STRING, "iconv", (char *) NULL);
}
#else
iconv_program = xstrdup ("iconv");
/* Not valid, free the allocated memory. */
xfree (result);
/* No valid charset found, generate error here. */
- error (_("Unable to find a vaild charset for string conversions"));
+ error (_("Unable to find a valid charset for string conversions"));
}
#endif /* USE_INTERMEDIATE_ENCODING_FUNCTION */
+void _initialize_charset ();
void
-_initialize_charset (void)
+_initialize_charset ()
{
/* The first element is always "auto". */
charsets.charsets.push_back (xstrdup ("auto"));