4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright (c) 1996, by Sun Microsystems, Inc.
24 * All rights reserved.
27 #pragma ident "%Z%%M% %I% %E% SMI"
30 * m_i18n.h: Header file dealing with all i18n issues. #included from mks.h,
31 * no program should ever #include any i18n-specific header (i.e. this
32 * will decide to include locale.h, nls.h and what not).
34 * Copyright 1992, 1993 by Mortice Kern Systems Inc. All rights reserved.
36 * $Header: /rd/h/rcs/m_i18n.h 1.17 1995/01/04 02:42:04 mark Exp ross $
44 * Libraries do not have leading m_ prefixes.
45 * Thus, we must create #defines which will change all our code from
46 * having m_ prefixes, to direct library calls.
48 #define m_collel_t collel_t
49 #define m_ismccollel ismccollel
50 #define m_collequiv collequiv
51 #define m_collrange collrange
52 #define m_collorder collorder
53 #define m_cclass cclass
54 #define m_strtocoll strtocoll
55 #define m_colltostr colltostr
57 #define m_localedtconv localedtconv
58 #define m_localeldconv localeldconv
59 #define m_dtconv dtconv
61 #endif /* !M_I18N_M_ */
63 #define M_CSETSIZE (UCHAR_MAX+1)
66 * Fetch all the data structures.
67 * Even if I18N is off, we need access to the data structures.
68 * Routines defined inside these headers may get changed via #define's
71 #include <m_nls.h> /* Our messaging scheme file */
72 #include <locale.h> /* Local compiler's locale.h */
73 #include <collate.h> /* Local compiler's collation: includes m_collel_t */
76 * Define i18n portability routines -- built on top of what we define
77 * as the mks extentions.
79 extern int m_isyes (char *);
84 * I18N is not supported -- make most of it disappear
86 * If we don't want all the internationalization stuff, then we get rid
87 * all the code, and all the data except the lconv structure (if used).
88 * This is done if I18N is undefined at compile time. In this case, #define's
89 * are used to convert strcoll into strcmp; setlocale to simply return POSIX,
90 * and localeconv to return a pointer to the static lconv structure.
97 #define m_textdomain(str)
98 #define m_textmsg(id, str, cls) (str)
99 #define m_textstr(id, str, cls) str
100 #define m_strmsg(str) (str)
101 #define m_msgdup(m) (m)
105 #define setlocale(class, locale) ((char *)"POSIX")
106 #define strcoll strcmp
107 #define localeconv() (&_m_lconv)
108 #undef m_localedtconv
109 #define m_localedtconv() (&_m_dtconv)
110 #undef m_localeldconv
111 #define m_localeldconv() (&_m_locdef)
113 #define m_colltostr(c) (NULL)
115 extern struct lconv _m_lconv
;
116 extern struct m_dtconv _m_dtconv
;
117 extern struct _m_localedef _m_locdef
;
121 #endif /*__M_M_I18N_H_*/