chiark / gitweb /
Imported Upstream version 1.0.0
[e16] / src / lang.h
1 /*
2  * Copyright (C) 2000-2007 Carsten Haitzler, Geoff Harrison and various contributors
3  * Copyright (C) 2004-2007 Kim Woelders
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a copy
6  * of this software and associated documentation files (the "Software"), to
7  * deal in the Software without restriction, including without limitation the
8  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9  * sell copies of the Software, and to permit persons to whom the Software is
10  * furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included in
13  * all copies of the Software, its documentation and marketing & publicity
14  * materials, and acknowledgment shall be given in the documentation, materials
15  * and software packages that this Software was used.
16  *
17  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20  * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
21  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23  */
24 #ifndef _LANG_H_
25 #define _LANG_H_
26
27 #include <stdlib.h>
28
29 #include "config.h"
30
31 #ifdef ENABLE_NLS
32 # include <libintl.h>
33 # define _(String) gettext(String)
34 # ifdef gettext_noop
35 #  define N_(String) gettext_noop(String)
36 # else
37 #  define N_(String) (String)
38 # endif
39 #else
40 # define _(String) (String)
41 # define N_(String) (String)
42 #endif
43
44 /* lang.c */
45 void                LangInit(void);
46 void                LangExit(void);
47 void                LangExport(void);
48
49 char               *EstrUtf82Int(const char *str, int len);
50 const char         *EstrInt2Enc(const char *str, int want_utf8);
51 void                EstrInt2EncFree(const char *str, int want_utf8);
52
53 int                 EwcOpen(int utf8);
54 void                EwcClose(void);
55 int                 EwcStrToWcs(const char *str, int len, wchar_t * wcs,
56                                 int wcl);
57 int                 EwcWcsToStr(const wchar_t * wcs, int wcl, char *str,
58                                 int len);
59
60 #endif /* _LANG_H_ */