xref: /onnv-gate/usr/src/head/libintl.h (revision 0)
1*0Sstevel@tonic-gate /*
2*0Sstevel@tonic-gate  * CDDL HEADER START
3*0Sstevel@tonic-gate  *
4*0Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*0Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*0Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*0Sstevel@tonic-gate  * with the License.
8*0Sstevel@tonic-gate  *
9*0Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*0Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*0Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*0Sstevel@tonic-gate  * and limitations under the License.
13*0Sstevel@tonic-gate  *
14*0Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*0Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*0Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*0Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*0Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*0Sstevel@tonic-gate  *
20*0Sstevel@tonic-gate  * CDDL HEADER END
21*0Sstevel@tonic-gate  */
22*0Sstevel@tonic-gate /*
23*0Sstevel@tonic-gate  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24*0Sstevel@tonic-gate  * Use is subject to license terms.
25*0Sstevel@tonic-gate  */
26*0Sstevel@tonic-gate 
27*0Sstevel@tonic-gate /* Libintl is a library of advanced internationalization functions. */
28*0Sstevel@tonic-gate 
29*0Sstevel@tonic-gate #ifndef	_LIBINTL_H
30*0Sstevel@tonic-gate #define	_LIBINTL_H
31*0Sstevel@tonic-gate 
32*0Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
33*0Sstevel@tonic-gate 
34*0Sstevel@tonic-gate #include <sys/isa_defs.h>
35*0Sstevel@tonic-gate 
36*0Sstevel@tonic-gate #ifdef	__cplusplus
37*0Sstevel@tonic-gate extern "C" {
38*0Sstevel@tonic-gate #endif
39*0Sstevel@tonic-gate 
40*0Sstevel@tonic-gate /*
41*0Sstevel@tonic-gate  * wchar_t is a built-in type in standard C++ and as such is not
42*0Sstevel@tonic-gate  * defined here when using standard C++. However, the GNU compiler
43*0Sstevel@tonic-gate  * fixincludes utility nonetheless creates it's own version of this
44*0Sstevel@tonic-gate  * header for use by gcc and g++. In that version it adds a redundant
45*0Sstevel@tonic-gate  * guard for __cplusplus. To avoid the creation of a gcc/g++ specific
46*0Sstevel@tonic-gate  * header we need to include the following magic comment:
47*0Sstevel@tonic-gate  *
48*0Sstevel@tonic-gate  * we must use the C++ compiler's type
49*0Sstevel@tonic-gate  *
50*0Sstevel@tonic-gate  * The above comment should not be removed or changed until GNU
51*0Sstevel@tonic-gate  * gcc/fixinc/inclhack.def is updated to bypass this header.
52*0Sstevel@tonic-gate  */
53*0Sstevel@tonic-gate #if !defined(__cplusplus) || (__cplusplus < 199711L && !defined(__GNUG__))
54*0Sstevel@tonic-gate #ifndef _WCHAR_T
55*0Sstevel@tonic-gate #define	_WCHAR_T
56*0Sstevel@tonic-gate #if defined(_LP64)
57*0Sstevel@tonic-gate typedef int	wchar_t;
58*0Sstevel@tonic-gate #else
59*0Sstevel@tonic-gate typedef long	wchar_t;
60*0Sstevel@tonic-gate #endif
61*0Sstevel@tonic-gate #endif	/* !_WCHAR_T */
62*0Sstevel@tonic-gate #endif	/* !defined(__cplusplus) ... */
63*0Sstevel@tonic-gate 
64*0Sstevel@tonic-gate #define	TEXTDOMAINMAX	256
65*0Sstevel@tonic-gate 
66*0Sstevel@tonic-gate #ifdef __STDC__
67*0Sstevel@tonic-gate extern char *dcgettext(const char *, const char *, const int);
68*0Sstevel@tonic-gate extern char *dgettext(const char *, const char *);
69*0Sstevel@tonic-gate extern char *gettext(const char *);
70*0Sstevel@tonic-gate extern char *textdomain(const char *);
71*0Sstevel@tonic-gate extern char *bindtextdomain(const char *, const char *);
72*0Sstevel@tonic-gate 
73*0Sstevel@tonic-gate /*
74*0Sstevel@tonic-gate  * LI18NUX 2000 Globalization Specification Version 1.0
75*0Sstevel@tonic-gate  * with Amendment 2
76*0Sstevel@tonic-gate  */
77*0Sstevel@tonic-gate extern char *dcngettext(const char *, const char *,
78*0Sstevel@tonic-gate 	const char *, unsigned long int, int);
79*0Sstevel@tonic-gate extern char *dngettext(const char *, const char *,
80*0Sstevel@tonic-gate 	const char *, unsigned long int);
81*0Sstevel@tonic-gate extern char *ngettext(const char *, const char *, unsigned long int);
82*0Sstevel@tonic-gate extern char *bind_textdomain_codeset(const char *, const char *);
83*0Sstevel@tonic-gate 
84*0Sstevel@tonic-gate /* Word handling functions --- requires dynamic linking */
85*0Sstevel@tonic-gate /* Warning: these are experimental and subject to change. */
86*0Sstevel@tonic-gate extern int wdinit(void);
87*0Sstevel@tonic-gate extern int wdchkind(wchar_t);
88*0Sstevel@tonic-gate extern int wdbindf(wchar_t, wchar_t, int);
89*0Sstevel@tonic-gate extern wchar_t *wddelim(wchar_t, wchar_t, int);
90*0Sstevel@tonic-gate extern wchar_t mcfiller(void);
91*0Sstevel@tonic-gate extern int mcwrap(void);
92*0Sstevel@tonic-gate 
93*0Sstevel@tonic-gate #else
94*0Sstevel@tonic-gate extern char *dcgettext();
95*0Sstevel@tonic-gate extern char *dgettext();
96*0Sstevel@tonic-gate extern char *gettext();
97*0Sstevel@tonic-gate extern char *textdomain();
98*0Sstevel@tonic-gate extern char *bindtextdomain();
99*0Sstevel@tonic-gate 
100*0Sstevel@tonic-gate /*
101*0Sstevel@tonic-gate  * LI18NUX 2000 Globalization Specification Version 1.0
102*0Sstevel@tonic-gate  * with Amendment 2
103*0Sstevel@tonic-gate  */
104*0Sstevel@tonic-gate extern char *dcngettext();
105*0Sstevel@tonic-gate extern char *dngettext();
106*0Sstevel@tonic-gate extern char *ngettext();
107*0Sstevel@tonic-gate extern char *bind_textdomain_codeset();
108*0Sstevel@tonic-gate 
109*0Sstevel@tonic-gate /* Word handling functions --- requires dynamic linking */
110*0Sstevel@tonic-gate /* Warning: these are experimental and subject to change. */
111*0Sstevel@tonic-gate extern int wdinit();
112*0Sstevel@tonic-gate extern int wdchkind();
113*0Sstevel@tonic-gate extern int wdbindf();
114*0Sstevel@tonic-gate extern wchar_t *wddelim();
115*0Sstevel@tonic-gate extern wchar_t mcfiller();
116*0Sstevel@tonic-gate extern int mcwrap();
117*0Sstevel@tonic-gate 
118*0Sstevel@tonic-gate #endif
119*0Sstevel@tonic-gate 
120*0Sstevel@tonic-gate #ifdef	__cplusplus
121*0Sstevel@tonic-gate }
122*0Sstevel@tonic-gate #endif
123*0Sstevel@tonic-gate 
124*0Sstevel@tonic-gate #endif /* _LIBINTL_H */
125