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