Fix possible bug when no args have been provided to the executable
[deliverable/binutils-gdb.git] / binutils / winduni.h
index 349f684578482a6b5bfe3d08777152f9436bb115..e661be9edf13699a061f6676ce7a04e63fea79dc 100644 (file)
@@ -1,6 +1,5 @@
 /* winduni.h -- header file for unicode support for windres program.
 /* winduni.h -- header file for unicode support for windres program.
-   Copyright 1997, 1998, 2002, 2007
-   Free Software Foundation, Inc.
+   Copyright (C) 1997-2017 Free Software Foundation, Inc.
    Written by Ian Lance Taylor, Cygnus Support.
    Rewritten by Kai Tietz, Onevision.
 
    Written by Ian Lance Taylor, Cygnus Support.
    Rewritten by Kai Tietz, Onevision.
 
@@ -8,7 +7,7 @@
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -56,7 +55,6 @@ typedef unsigned short unichar;
 #define ESCAPE_V  013
 
 /* Convert an ASCII string to a unicode string.  */
 #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.  */
 extern void unicode_from_ascii (rc_uint_type *, unichar **, const char *);
 
 /* Convert an unicode string to an ASCII string.  */
@@ -80,6 +78,58 @@ 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);
 
 /* 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
+
+/* Specifies the default codepage to be used for unicode
+   transformations.  By default this is CP_ACP.  */
+extern rc_uint_type wind_default_codepage;
+
+/* Specifies the currently used codepage for unicode
+   transformations.  By default this is CP_ACP.  */
+extern rc_uint_type wind_current_codepage;
+
+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);
+extern void unicode_from_ascii_len (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.  */
 /* 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.  */
This page took 0.023989 seconds and 4 git commands to generate.