| 1 | /* winduni.h -- header file for unicode support for windres program. |
| 2 | Copyright 1997, 1998 Free Software Foundation, Inc. |
| 3 | Written by Ian Lance Taylor, Cygnus Support. |
| 4 | |
| 5 | This file is part of GNU Binutils. |
| 6 | |
| 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. |
| 11 | |
| 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. |
| 16 | |
| 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. */ |
| 21 | |
| 22 | #include <ansidecl.h> |
| 23 | |
| 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. |
| 27 | |
| 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. */ |
| 32 | |
| 33 | /* We use this type to hold a unicode character. */ |
| 34 | |
| 35 | typedef unsigned short unichar; |
| 36 | |
| 37 | /* Escape character translations. */ |
| 38 | |
| 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) |
| 46 | |
| 47 | /* Convert an ASCII string to a unicode string. */ |
| 48 | |
| 49 | extern void unicode_from_ascii |
| 50 | PARAMS ((int *, unichar **, const char *)); |
| 51 | |
| 52 | /* Print a unicode string to a file. */ |
| 53 | |
| 54 | extern void unicode_print PARAMS ((FILE *, const unichar *, int)); |
| 55 | |
| 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. */ |
| 59 | |
| 60 | extern PTR res_alloc PARAMS ((size_t)); |