merge from gcc
[binutils.git] / binutils / winduni.h
blobc55189c273a651ec4cbe77df8e41a867d927fc33
1 /* winduni.h -- header file for unicode support for windres program.
2 Copyright 1997, 1998, 2002 Free Software Foundation, Inc.
3 Written by Ian Lance Taylor, Cygnus Support.
5 This file is part of GNU Binutils.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA. */
22 #include "ansidecl.h"
24 /* This header file declares the types and functions we use for
25 unicode support in windres. Our unicode support is very limited at
26 present.
28 We don't put this stuff in windres.h so that winduni.c doesn't have
29 to include windres.h. winduni.c needs to includes windows.h, and
30 that would conflict with the definitions of Windows macros we
31 already have in windres.h. */
33 /* We use this type to hold a unicode character. */
35 typedef unsigned short unichar;
37 /* Escape character translations. */
39 #define ESCAPE_A (007)
40 #define ESCAPE_B (010)
41 #define ESCAPE_F (014)
42 #define ESCAPE_N (012)
43 #define ESCAPE_R (015)
44 #define ESCAPE_T (011)
45 #define ESCAPE_V (013)
47 /* Convert an ASCII string to a unicode string. */
49 extern void unicode_from_ascii
50 PARAMS ((int *, unichar **, const char *));
52 /* Print a unicode string to a file. */
54 extern void unicode_print PARAMS ((FILE *, const unichar *, int));
56 /* Windres support routine called by unicode_from_ascii. This is both
57 here and in windres.h. It should probably be in a separate header
58 file, but it hardly seems worth it for one function. */
60 extern PTR res_alloc PARAMS ((size_t));