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