signal cleanup fix
[gnupg.git] / common / i18n.h
blob7405f9a5503cef1133058c7d33da99938a4193cf
1 /* i18n.h
2 * Copyright (C) 1998, 2001 Free Software Foundation, Inc.
4 * This file is free software; as a special exception the author gives
5 * unlimited permission to copy and/or distribute it, with or without
6 * modifications, as long as this notice is preserved.
7 *
8 * This file is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY, to the extent permitted by law; without even
10 * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 * PURPOSE.
14 #ifndef GNUPG_COMMON_I18N_H
15 #define GNUPG_COMMON_I18N_H
18 #ifdef USE_SIMPLE_GETTEXT
19 # include "../jnlib/w32help.h"
20 # define _(a) gettext (a)
21 # define N_(a) (a)
22 #else
23 # ifdef HAVE_LOCALE_H
24 # include <locale.h>
25 # endif
26 # ifdef ENABLE_NLS
27 # include <libintl.h>
28 # define _(a) gettext (a)
29 # ifdef gettext_noop
30 # define N_(a) gettext_noop (a)
31 # else
32 # define N_(a) (a)
33 # endif
34 # else
35 # define _(a) (a)
36 # define N_(a) (a)
37 # define ngettext(a,b,c) ((c)==1? (a):(b))
38 # endif
39 #endif /*!USE_SIMPLE_GETTEXT*/
41 void i18n_init (void);
42 char *i18n_switchto_utf8 (void);
43 void i18n_switchback (char *saved_codeset);
44 const char *i18n_utf8 (const char *string);
47 #endif /*GNUPG_COMMON_I18N_H*/