xref: /utopia/UTPA2-700.0.x/projects/tools/lint/mips-linux-gnu_include/libintl.h (revision 53ee8cc121a030b8d368113ac3e966b4705770ef)
1*53ee8cc1Swenshuai.xi /* Message catalogs for internationalization.
2*53ee8cc1Swenshuai.xi    Copyright (C) 1995-2002, 2004, 2005 Free Software Foundation, Inc.
3*53ee8cc1Swenshuai.xi    This file is part of the GNU C Library.
4*53ee8cc1Swenshuai.xi    This file is derived from the file libgettext.h in the GNU gettext package.
5*53ee8cc1Swenshuai.xi 
6*53ee8cc1Swenshuai.xi    The GNU C Library is free software; you can redistribute it and/or
7*53ee8cc1Swenshuai.xi    modify it under the terms of the GNU Lesser General Public
8*53ee8cc1Swenshuai.xi    License as published by the Free Software Foundation; either
9*53ee8cc1Swenshuai.xi    version 2.1 of the License, or (at your option) any later version.
10*53ee8cc1Swenshuai.xi 
11*53ee8cc1Swenshuai.xi    The GNU C Library is distributed in the hope that it will be useful,
12*53ee8cc1Swenshuai.xi    but WITHOUT ANY WARRANTY; without even the implied warranty of
13*53ee8cc1Swenshuai.xi    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14*53ee8cc1Swenshuai.xi    Lesser General Public License for more details.
15*53ee8cc1Swenshuai.xi 
16*53ee8cc1Swenshuai.xi    You should have received a copy of the GNU Lesser General Public
17*53ee8cc1Swenshuai.xi    License along with the GNU C Library; if not, write to the Free
18*53ee8cc1Swenshuai.xi    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19*53ee8cc1Swenshuai.xi    02111-1307 USA.  */
20*53ee8cc1Swenshuai.xi 
21*53ee8cc1Swenshuai.xi #ifndef _LIBINTL_H
22*53ee8cc1Swenshuai.xi #define _LIBINTL_H	1
23*53ee8cc1Swenshuai.xi 
24*53ee8cc1Swenshuai.xi #include <features.h>
25*53ee8cc1Swenshuai.xi 
26*53ee8cc1Swenshuai.xi /* We define an additional symbol to signal that we use the GNU
27*53ee8cc1Swenshuai.xi    implementation of gettext.  */
28*53ee8cc1Swenshuai.xi #define __USE_GNU_GETTEXT 1
29*53ee8cc1Swenshuai.xi 
30*53ee8cc1Swenshuai.xi /* Provide information about the supported file formats.  Returns the
31*53ee8cc1Swenshuai.xi    maximum minor revision number supported for a given major revision.  */
32*53ee8cc1Swenshuai.xi #define __GNU_GETTEXT_SUPPORTED_REVISION(major) \
33*53ee8cc1Swenshuai.xi   ((major) == 0 ? 1 : -1)
34*53ee8cc1Swenshuai.xi 
35*53ee8cc1Swenshuai.xi __BEGIN_DECLS
36*53ee8cc1Swenshuai.xi 
37*53ee8cc1Swenshuai.xi /* Look up MSGID in the current default message catalog for the current
38*53ee8cc1Swenshuai.xi    LC_MESSAGES locale.  If not found, returns MSGID itself (the default
39*53ee8cc1Swenshuai.xi    text).  */
40*53ee8cc1Swenshuai.xi extern char *gettext (__const char *__msgid)
41*53ee8cc1Swenshuai.xi      __THROW __attribute_format_arg__ (1);
42*53ee8cc1Swenshuai.xi 
43*53ee8cc1Swenshuai.xi /* Look up MSGID in the DOMAINNAME message catalog for the current
44*53ee8cc1Swenshuai.xi    LC_MESSAGES locale.  */
45*53ee8cc1Swenshuai.xi extern char *dgettext (__const char *__domainname, __const char *__msgid)
46*53ee8cc1Swenshuai.xi      __THROW __attribute_format_arg__ (2);
47*53ee8cc1Swenshuai.xi extern char *__dgettext (__const char *__domainname, __const char *__msgid)
48*53ee8cc1Swenshuai.xi      __THROW __attribute_format_arg__ (2);
49*53ee8cc1Swenshuai.xi 
50*53ee8cc1Swenshuai.xi /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
51*53ee8cc1Swenshuai.xi    locale.  */
52*53ee8cc1Swenshuai.xi extern char *dcgettext (__const char *__domainname,
53*53ee8cc1Swenshuai.xi 			__const char *__msgid, int __category)
54*53ee8cc1Swenshuai.xi      __THROW __attribute_format_arg__ (2);
55*53ee8cc1Swenshuai.xi extern char *__dcgettext (__const char *__domainname,
56*53ee8cc1Swenshuai.xi 			  __const char *__msgid, int __category)
57*53ee8cc1Swenshuai.xi      __THROW __attribute_format_arg__ (2);
58*53ee8cc1Swenshuai.xi 
59*53ee8cc1Swenshuai.xi 
60*53ee8cc1Swenshuai.xi /* Similar to `gettext' but select the plural form corresponding to the
61*53ee8cc1Swenshuai.xi    number N.  */
62*53ee8cc1Swenshuai.xi extern char *ngettext (__const char *__msgid1, __const char *__msgid2,
63*53ee8cc1Swenshuai.xi 		       unsigned long int __n)
64*53ee8cc1Swenshuai.xi      __THROW __attribute_format_arg__ (1) __attribute_format_arg__ (2);
65*53ee8cc1Swenshuai.xi 
66*53ee8cc1Swenshuai.xi /* Similar to `dgettext' but select the plural form corresponding to the
67*53ee8cc1Swenshuai.xi    number N.  */
68*53ee8cc1Swenshuai.xi extern char *dngettext (__const char *__domainname, __const char *__msgid1,
69*53ee8cc1Swenshuai.xi 			__const char *__msgid2, unsigned long int __n)
70*53ee8cc1Swenshuai.xi      __THROW __attribute_format_arg__ (2) __attribute_format_arg__ (3);
71*53ee8cc1Swenshuai.xi 
72*53ee8cc1Swenshuai.xi /* Similar to `dcgettext' but select the plural form corresponding to the
73*53ee8cc1Swenshuai.xi    number N.  */
74*53ee8cc1Swenshuai.xi extern char *dcngettext (__const char *__domainname, __const char *__msgid1,
75*53ee8cc1Swenshuai.xi 			 __const char *__msgid2, unsigned long int __n,
76*53ee8cc1Swenshuai.xi 			 int __category)
77*53ee8cc1Swenshuai.xi      __THROW __attribute_format_arg__ (2) __attribute_format_arg__ (3);
78*53ee8cc1Swenshuai.xi 
79*53ee8cc1Swenshuai.xi 
80*53ee8cc1Swenshuai.xi /* Set the current default message catalog to DOMAINNAME.
81*53ee8cc1Swenshuai.xi    If DOMAINNAME is null, return the current default.
82*53ee8cc1Swenshuai.xi    If DOMAINNAME is "", reset to the default of "messages".  */
83*53ee8cc1Swenshuai.xi extern char *textdomain (__const char *__domainname) __THROW;
84*53ee8cc1Swenshuai.xi 
85*53ee8cc1Swenshuai.xi /* Specify that the DOMAINNAME message catalog will be found
86*53ee8cc1Swenshuai.xi    in DIRNAME rather than in the system locale data base.  */
87*53ee8cc1Swenshuai.xi extern char *bindtextdomain (__const char *__domainname,
88*53ee8cc1Swenshuai.xi 			     __const char *__dirname) __THROW;
89*53ee8cc1Swenshuai.xi 
90*53ee8cc1Swenshuai.xi /* Specify the character encoding in which the messages from the
91*53ee8cc1Swenshuai.xi    DOMAINNAME message catalog will be returned.  */
92*53ee8cc1Swenshuai.xi extern char *bind_textdomain_codeset (__const char *__domainname,
93*53ee8cc1Swenshuai.xi 				      __const char *__codeset) __THROW;
94*53ee8cc1Swenshuai.xi 
95*53ee8cc1Swenshuai.xi 
96*53ee8cc1Swenshuai.xi /* Optimized version of the function above.  */
97*53ee8cc1Swenshuai.xi #if defined __OPTIMIZE__ && !defined __cplusplus
98*53ee8cc1Swenshuai.xi 
99*53ee8cc1Swenshuai.xi /* We need NULL for `gettext'.  */
100*53ee8cc1Swenshuai.xi # define __need_NULL
101*53ee8cc1Swenshuai.xi # include <stddef.h>
102*53ee8cc1Swenshuai.xi 
103*53ee8cc1Swenshuai.xi /* We need LC_MESSAGES for `dgettext'.  */
104*53ee8cc1Swenshuai.xi # include <locale.h>
105*53ee8cc1Swenshuai.xi 
106*53ee8cc1Swenshuai.xi /* These must be macros.  Inlined functions are useless because the
107*53ee8cc1Swenshuai.xi    `__builtin_constant_p' predicate in dcgettext would always return
108*53ee8cc1Swenshuai.xi    false.  */
109*53ee8cc1Swenshuai.xi 
110*53ee8cc1Swenshuai.xi # define gettext(msgid) dgettext (NULL, msgid)
111*53ee8cc1Swenshuai.xi 
112*53ee8cc1Swenshuai.xi # define dgettext(domainname, msgid) \
113*53ee8cc1Swenshuai.xi   dcgettext (domainname, msgid, LC_MESSAGES)
114*53ee8cc1Swenshuai.xi 
115*53ee8cc1Swenshuai.xi # define ngettext(msgid1, msgid2, n) dngettext (NULL, msgid1, msgid2, n)
116*53ee8cc1Swenshuai.xi 
117*53ee8cc1Swenshuai.xi # define dngettext(domainname, msgid1, msgid2, n) \
118*53ee8cc1Swenshuai.xi   dcngettext (domainname, msgid1, msgid2, n, LC_MESSAGES)
119*53ee8cc1Swenshuai.xi 
120*53ee8cc1Swenshuai.xi #endif	/* Optimizing.  */
121*53ee8cc1Swenshuai.xi 
122*53ee8cc1Swenshuai.xi __END_DECLS
123*53ee8cc1Swenshuai.xi 
124*53ee8cc1Swenshuai.xi #endif /* libintl.h */
125