aboutsummaryrefslogtreecommitdiff
path: root/binutils/winduni.h
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2007-06-05 13:10:30 +0000
committerNick Clifton <nickc@redhat.com>2007-06-05 13:10:30 +0000
commit5ba684e24cc4737088e295c4f3d1bcd69c1bfdf6 (patch)
treeed96f4d1cb6aecb8a29233dcf59208a426b17f6a /binutils/winduni.h
parent353ab8610a05f3a40b32c4fc1e11a44b53d3051d (diff)
downloadgdb-5ba684e24cc4737088e295c4f3d1bcd69c1bfdf6.zip
gdb-5ba684e24cc4737088e295c4f3d1bcd69c1bfdf6.tar.gz
gdb-5ba684e24cc4737088e295c4f3d1bcd69c1bfdf6.tar.bz2
* Makefile.am: Add LIBICONV to windres.
* acinclude.m4: Added missing "lib-*.m4" and "lt*.m4" files. * configure.in: Add AC_CHECK_HEADER for iconv.h and use AM_ICONV. * config.in: Add ICONV defines. * aclocal: Regenerate. * confugure: Regenerate. * winduni.c: (local_iconv_map codepages, wind_language_t, languages, unicode_is$ (ascii_from_unicode): Use codepage_from_unicode. (ascii_from_unicode): Use unicode_from_codepage. Use for cygwin windows API for unicode transformation. * winduni.h: (CP_ACP, CP_UTF7, CP_UTF8, CP_OEM, CP_UTF16): New macros. (wind_language_t, local_iconv_map): New types. (wind_find_language_by_id, wind_find_language_by_codepage, (unicode_is_valid_codepage, wind_find_codepage_info, unicode_from_codepage, c$
Diffstat (limited to 'binutils/winduni.h')
-rw-r--r--binutils/winduni.h44
1 files changed, 43 insertions, 1 deletions
diff --git a/binutils/winduni.h b/binutils/winduni.h
index 349f684..f22e252 100644
--- a/binutils/winduni.h
+++ b/binutils/winduni.h
@@ -56,7 +56,6 @@ typedef unsigned short unichar;
#define ESCAPE_V 013
/* Convert an ASCII string to a unicode string. */
-
extern void unicode_from_ascii (rc_uint_type *, unichar **, const char *);
/* Convert an unicode string to an ASCII string. */
@@ -80,6 +79,49 @@ extern void ascii_print (FILE *, const char *, rc_uint_type);
/* Print a quoted unicode string to a file. */
extern void unicode_print_quoted (FILE *, const unichar *, rc_uint_type);
+#ifndef CP_UTF8
+#define CP_UTF7 65000 /* UTF-7 translation. */
+#define CP_UTF8 65001 /* UTF-8 translation. */
+#endif
+
+#ifndef CP_UTF16
+#define CP_UTF16 65002 /* UTF-16 translation. */
+#endif
+
+#ifndef CP_ACP
+#define CP_ACP 0 /* Default to ANSI code page. */
+#endif
+
+#ifndef CP_OEM
+#define CP_OEM 1 /* Default OEM code page. */
+#endif
+
+typedef struct wind_language_t
+{
+ unsigned id;
+ unsigned doscp;
+ unsigned wincp;
+ const char *name;
+ const char *country;
+} wind_language_t;
+
+extern const wind_language_t *wind_find_language_by_id (unsigned);
+extern int unicode_is_valid_codepage (rc_uint_type);
+
+typedef struct local_iconv_map
+{
+ rc_uint_type codepage;
+ const char * iconv_name;
+} local_iconv_map;
+
+extern const local_iconv_map *wind_find_codepage_info (unsigned);
+
+/* Convert an Codepage string to a unicode string. */
+extern void unicode_from_codepage (rc_uint_type *, unichar **, const char *, rc_uint_type);
+
+/* Convert an unicode string to an codepage string. */
+extern void codepage_from_unicode (rc_uint_type *, const unichar *, char **, rc_uint_type);
+
/* Windres support routine called by unicode_from_ascii. This is both
here and in windres.h. It should probably be in a separate header
file, but it hardly seems worth it for one function. */