Added bigprefix1.exp.
[findutils.git] / intl / libgnuintl.h
blob014a8b5ac534981dc6ff31c769024170da6d1486
1 /* Message catalogs for internationalization.
2 Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option)
7 any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software Foundation,
16 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
18 #ifndef _LIBINTL_H
19 #define _LIBINTL_H 1
21 #include <locale.h>
23 /* The LC_MESSAGES locale category is the category used by the functions
24 gettext() and dgettext(). It is specified in POSIX, but not in ANSI C.
25 On systems that don't define it, use an arbitrary value instead.
26 On Solaris, <locale.h> defines __LOCALE_H then includes <libintl.h> (i.e.
27 this file!) and then only defines LC_MESSAGES. To avoid a redefinition
28 warning, don't define LC_MESSAGES in this case. */
29 #if !defined LC_MESSAGES && !defined __LOCALE_H
30 # define LC_MESSAGES 1729
31 #endif
33 /* We define an additional symbol to signal that we use the GNU
34 implementation of gettext. */
35 #define __USE_GNU_GETTEXT 1
37 /* Resolve a platform specific conflict on DJGPP. GNU gettext takes
38 precedence over _conio_gettext. */
39 #ifdef __DJGPP__
40 # undef gettext
41 # define gettext gettext
42 #endif
44 #ifndef PARAMS
45 # if __STDC__ || defined __cplusplus
46 # define PARAMS(args) args
47 # else
48 # define PARAMS(args) ()
49 # endif
50 #endif
52 #ifdef __cplusplus
53 extern "C" {
54 #endif
56 /* Look up MSGID in the current default message catalog for the current
57 LC_MESSAGES locale. If not found, returns MSGID itself (the default
58 text). */
59 extern char *gettext PARAMS ((const char *__msgid));
61 /* Look up MSGID in the DOMAINNAME message catalog for the current
62 LC_MESSAGES locale. */
63 extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid));
65 /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
66 locale. */
67 extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid,
68 int __category));
71 /* Similar to `gettext' but select the plural form corresponding to the
72 number N. */
73 extern char *ngettext PARAMS ((const char *__msgid1, const char *__msgid2,
74 unsigned long int __n));
76 /* Similar to `dgettext' but select the plural form corresponding to the
77 number N. */
78 extern char *dngettext PARAMS ((const char *__domainname, const char *__msgid1,
79 const char *__msgid2, unsigned long int __n));
81 /* Similar to `dcgettext' but select the plural form corresponding to the
82 number N. */
83 extern char *dcngettext PARAMS ((const char *__domainname, const char *__msgid1,
84 const char *__msgid2, unsigned long int __n,
85 int __category));
88 /* Set the current default message catalog to DOMAINNAME.
89 If DOMAINNAME is null, return the current default.
90 If DOMAINNAME is "", reset to the default of "messages". */
91 extern char *textdomain PARAMS ((const char *__domainname));
93 /* Specify that the DOMAINNAME message catalog will be found
94 in DIRNAME rather than in the system locale data base. */
95 extern char *bindtextdomain PARAMS ((const char *__domainname,
96 const char *__dirname));
98 /* Specify the character encoding in which the messages from the
99 DOMAINNAME message catalog will be returned. */
100 extern char *bind_textdomain_codeset PARAMS ((const char *__domainname,
101 const char *__codeset));
104 /* Optimized version of the functions above. */
105 #if defined __OPTIMIZED
106 /* These are macros, but could also be inline functions. */
108 # define gettext(msgid) \
109 dgettext (NULL, msgid)
111 # define dgettext(domainname, msgid) \
112 dcgettext (domainname, msgid, LC_MESSAGES)
114 # define ngettext(msgid1, msgid2, n) \
115 dngettext (NULL, msgid1, msgid2, n)
117 # define dngettext(domainname, msgid1, msgid2, n) \
118 dcngettext (domainname, msgid1, msgid2, n, LC_MESSAGES)
120 #endif /* Optimizing. */
123 #ifdef __cplusplus
125 #endif
127 #endif /* libintl.h */