aboutsummaryrefslogtreecommitdiff
path: root/gdb/charset.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2009-09-25 20:53:14 +0000
committerTom Tromey <tromey@redhat.com>2009-09-25 20:53:14 +0000
commitb8899f2b6861deda28ccc10d925105e7e516d68b (patch)
tree71860a04741deb562bfb6abdddc2840953369f27 /gdb/charset.c
parentfe2d172ccbde84427ab164b885a0df6c9e21f9a0 (diff)
downloadgdb-b8899f2b6861deda28ccc10d925105e7e516d68b.zip
gdb-b8899f2b6861deda28ccc10d925105e7e516d68b.tar.gz
gdb-b8899f2b6861deda28ccc10d925105e7e516d68b.tar.bz2
gdb
* charset.c (iconv_open): Use UTF-16 and UTF-32, not UCS-2 and UCS-4. (iconv): Rename 'ucs_flag'. (GDB_DEFAULT_TARGET_WIDE_CHARSET): Use UTF-32. * c-lang.c (charset_for_string_type): Use UTF-16 and UTF-32, not UCS-2 and UCS-4. (convert_ucn): Use UTF-32. gdb/testsuite * gdb.base/charset.exp: Use UTF-16 and UTF-32, not UCS-2 and UCS-4. * gdb.base/charset.c (utf_32_string): Rename. (init_utf32): Rename. (main): Update.
Diffstat (limited to 'gdb/charset.c')
-rw-r--r--gdb/charset.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gdb/charset.c b/gdb/charset.c
index a59d9c6..f5281ed 100644
--- a/gdb/charset.c
+++ b/gdb/charset.c
@@ -102,17 +102,17 @@
iconv_t
iconv_open (const char *to, const char *from)
{
- /* We allow conversions from UCS-4BE, wchar_t, and the host charset.
+ /* We allow conversions from UTF-32BE, wchar_t, and the host charset.
We allow conversions to wchar_t and the host charset. */
- if (strcmp (from, "UCS-4BE") && strcmp (from, "wchar_t")
+ if (strcmp (from, "UTF-32BE") && strcmp (from, "wchar_t")
&& strcmp (from, GDB_DEFAULT_HOST_CHARSET))
return -1;
if (strcmp (to, "wchar_t") && strcmp (to, GDB_DEFAULT_HOST_CHARSET))
return -1;
- /* Return 1 if we are converting from UCS-4BE, 0 otherwise. This is
+ /* Return 1 if we are converting from UTF-32BE, 0 otherwise. This is
used as a flag in calls to iconv. */
- return !strcmp (from, "UCS-4BE");
+ return !strcmp (from, "UTF-32BE");
}
int
@@ -122,10 +122,10 @@ iconv_close (iconv_t arg)
}
size_t
-iconv (iconv_t ucs_flag, const char **inbuf, size_t *inbytesleft,
+iconv (iconv_t utf_flag, const char **inbuf, size_t *inbytesleft,
char **outbuf, size_t *outbytesleft)
{
- if (ucs_flag)
+ if (utf_flag)
{
while (*inbytesleft >= 4)
{
@@ -193,7 +193,7 @@ iconv (iconv_t ucs_flag, const char **inbuf, size_t *inbytesleft,
#endif
#ifndef GDB_DEFAULT_TARGET_WIDE_CHARSET
-#define GDB_DEFAULT_TARGET_WIDE_CHARSET "UCS-4"
+#define GDB_DEFAULT_TARGET_WIDE_CHARSET "UTF-32"
#endif
static const char *auto_host_charset_name = GDB_DEFAULT_HOST_CHARSET;