OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [binutils-2.18.50/] [binutils/] [winduni.h] - Diff between revs 38 and 156

Only display areas with differences | Details | Blame | View Log

Rev 38 Rev 156
/* 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
   Copyright 1997, 1998, 2002, 2007
   Free Software Foundation, Inc.
   Free Software Foundation, Inc.
   Written by Ian Lance Taylor, Cygnus Support.
   Written by Ian Lance Taylor, Cygnus Support.
   Rewritten by Kai Tietz, Onevision.
   Rewritten by Kai Tietz, Onevision.
 
 
   This file is part of GNU Binutils.
   This file is part of GNU Binutils.
 
 
   This program is free software; you can redistribute it and/or modify
   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
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3 of the License, or
   the Free Software Foundation; either version 3 of the License, or
   (at your option) any later version.
   (at your option) any later version.
 
 
   This program is distributed in the hope that it will be useful,
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
   GNU General Public License for more details.
 
 
   You should have received a copy of the GNU General Public License
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   along with this program; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
   02110-1301, USA.  */
   02110-1301, USA.  */
 
 
#include "ansidecl.h"
#include "ansidecl.h"
 
 
#ifndef WINDUNI_H
#ifndef WINDUNI_H
#define WINDUNI_H
#define WINDUNI_H
 
 
/* This header file declares the types and functions we use for
/* This header file declares the types and functions we use for
   unicode support in windres.  Our unicode support is very limited at
   unicode support in windres.  Our unicode support is very limited at
   present.
   present.
 
 
   We don't put this stuff in windres.h so that winduni.c doesn't have
   We don't put this stuff in windres.h so that winduni.c doesn't have
   to include windres.h.  winduni.c needs to includes windows.h, and
   to include windres.h.  winduni.c needs to includes windows.h, and
   that would conflict with the definitions of Windows macros we
   that would conflict with the definitions of Windows macros we
   already have in windres.h.  */
   already have in windres.h.  */
 
 
/* Use bfd_size_type to ensure a sufficient number of bits.  */
/* Use bfd_size_type to ensure a sufficient number of bits.  */
#ifndef DEFINED_RC_UINT_TYPE
#ifndef DEFINED_RC_UINT_TYPE
#define DEFINED_RC_UINT_TYPE
#define DEFINED_RC_UINT_TYPE
typedef bfd_size_type rc_uint_type;
typedef bfd_size_type rc_uint_type;
#endif
#endif
 
 
/* We use this type to hold a unicode character.  */
/* We use this type to hold a unicode character.  */
 
 
typedef unsigned short unichar;
typedef unsigned short unichar;
 
 
/* Escape character translations.  */
/* Escape character translations.  */
 
 
#define ESCAPE_A  007
#define ESCAPE_A  007
#define ESCAPE_B  010
#define ESCAPE_B  010
#define ESCAPE_F  014
#define ESCAPE_F  014
#define ESCAPE_N  012
#define ESCAPE_N  012
#define ESCAPE_R  015
#define ESCAPE_R  015
#define ESCAPE_T  011
#define ESCAPE_T  011
#define ESCAPE_V  013
#define ESCAPE_V  013
 
 
/* Convert an ASCII string to a unicode string.  */
/* Convert an ASCII string to a unicode string.  */
extern void unicode_from_ascii (rc_uint_type *, unichar **, const char *);
extern void unicode_from_ascii (rc_uint_type *, unichar **, const char *);
 
 
/* Convert an unicode string to an ASCII string.  */
/* Convert an unicode string to an ASCII string.  */
extern void ascii_from_unicode (rc_uint_type *, const unichar *, char **);
extern void ascii_from_unicode (rc_uint_type *, const unichar *, char **);
 
 
/* Duplicate a unicode string by using res_alloc.  */
/* Duplicate a unicode string by using res_alloc.  */
extern unichar *unichar_dup (const unichar *);
extern unichar *unichar_dup (const unichar *);
 
 
/* Duplicate a unicode string by using res_alloc and make it uppercase.  */
/* Duplicate a unicode string by using res_alloc and make it uppercase.  */
extern unichar *unichar_dup_uppercase (const unichar *);
extern unichar *unichar_dup_uppercase (const unichar *);
 
 
/* The count of unichar elements.  */
/* The count of unichar elements.  */
extern rc_uint_type unichar_len (const unichar *);
extern rc_uint_type unichar_len (const unichar *);
 
 
/* Print a unicode string to a file.  */
/* Print a unicode string to a file.  */
extern void unicode_print (FILE *, const unichar *, rc_uint_type);
extern void unicode_print (FILE *, const unichar *, rc_uint_type);
 
 
/* Print a ascii string to a file.  */
/* Print a ascii string to a file.  */
extern void ascii_print (FILE *, const char *, rc_uint_type);
extern void ascii_print (FILE *, const char *, rc_uint_type);
 
 
/* Print a quoted unicode string to a file.  */
/* Print a quoted unicode string to a file.  */
extern void unicode_print_quoted (FILE *, const unichar *, rc_uint_type);
extern void unicode_print_quoted (FILE *, const unichar *, rc_uint_type);
 
 
#ifndef CP_UTF8
#ifndef CP_UTF8
#define CP_UTF7 65000   /* UTF-7 translation.  */
#define CP_UTF7 65000   /* UTF-7 translation.  */
#define CP_UTF8 65001   /* UTF-8 translation.  */
#define CP_UTF8 65001   /* UTF-8 translation.  */
#endif
#endif
 
 
#ifndef CP_UTF16
#ifndef CP_UTF16
#define CP_UTF16  65002 /* UTF-16 translation.  */
#define CP_UTF16  65002 /* UTF-16 translation.  */
#endif
#endif
 
 
#ifndef CP_ACP
#ifndef CP_ACP
#define CP_ACP  0        /* Default to ANSI code page.  */
#define CP_ACP  0        /* Default to ANSI code page.  */
#endif
#endif
 
 
#ifndef CP_OEM
#ifndef CP_OEM
#define CP_OEM  1       /* Default OEM code page. */
#define CP_OEM  1       /* Default OEM code page. */
#endif
#endif
 
 
/* Specifies the default codepage to be used for unicode
/* Specifies the default codepage to be used for unicode
   transformations.  By default this is CP_ACP.  */
   transformations.  By default this is CP_ACP.  */
extern rc_uint_type wind_default_codepage;
extern rc_uint_type wind_default_codepage;
 
 
/* Specifies the currently used codepage for unicode
/* Specifies the currently used codepage for unicode
   transformations.  By default this is CP_ACP.  */
   transformations.  By default this is CP_ACP.  */
extern rc_uint_type wind_current_codepage;
extern rc_uint_type wind_current_codepage;
 
 
typedef struct wind_language_t
typedef struct wind_language_t
{
{
  unsigned id;
  unsigned id;
  unsigned doscp;
  unsigned doscp;
  unsigned wincp;
  unsigned wincp;
  const char *name;
  const char *name;
  const char *country;
  const char *country;
} wind_language_t;
} wind_language_t;
 
 
extern const wind_language_t *wind_find_language_by_id (unsigned);
extern const wind_language_t *wind_find_language_by_id (unsigned);
extern int unicode_is_valid_codepage (rc_uint_type);
extern int unicode_is_valid_codepage (rc_uint_type);
 
 
typedef struct local_iconv_map
typedef struct local_iconv_map
{
{
  rc_uint_type codepage;
  rc_uint_type codepage;
  const char * iconv_name;
  const char * iconv_name;
} local_iconv_map;
} local_iconv_map;
 
 
extern const local_iconv_map *wind_find_codepage_info (unsigned);
extern const local_iconv_map *wind_find_codepage_info (unsigned);
 
 
/* Convert an Codepage string to a unicode string.  */
/* 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_codepage (rc_uint_type *, unichar **, const char *, rc_uint_type);
 
 
/* Convert an unicode string to an codepage string.  */
/* Convert an unicode string to an codepage string.  */
extern void codepage_from_unicode (rc_uint_type *, const unichar *, char **, rc_uint_type);
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
/* Windres support routine called by unicode_from_ascii.  This is both
   here and in windres.h.  It should probably be in a separate header
   here and in windres.h.  It should probably be in a separate header
   file, but it hardly seems worth it for one function.  */
   file, but it hardly seems worth it for one function.  */
 
 
extern void * res_alloc (rc_uint_type);
extern void * res_alloc (rc_uint_type);
 
 
#endif
#endif
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.