lcInit.c revision b4ee4795
1/* 2Copyright 1985, 1986, 1987, 1991, 1998 The Open Group 3 4Permission is hereby granted, free of charge, to any person obtaining a 5copy of this software and associated documentation files (the 6"Software"), to deal in the Software without restriction, including 7without limitation the rights to use, copy, modify, merge, publish, 8distribute, sublicense, and/or sell copies of the Software, and to 9permit persons to whom the Software is furnished to do so, subject to 10the following conditions: The above copyright notice and this 11permission notice shall be included in all copies or substantial 12portions of the Software. 13 14 15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 19AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE 21EVEN IF ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES. 22 23 24Except as contained in this notice, the name of The Open Group shall not be 25used in advertising or otherwise to promote the sale, use or other dealings 26in this Software without prior written authorization from The Open Group. 27 28 29X Window System is a trademark of The Open Group 30 31OSF/1, OSF/Motif and Motif are registered trademarks, and OSF, the OSF 32logo, LBX, X Window System, and Xinerama are trademarks of the Open 33Group. All other trademarks and registered trademarks mentioned herein 34are the property of their respective owners. No right, title or 35interest in or to any trademark, service mark, logo or trade name of 36Sun Microsystems, Inc. or its licensors is granted. 37 38*/ 39/* 40 * Copyright 2000 Sun Microsystems, Inc. All rights reserved. 41 * 42 * Permission is hereby granted, free of charge, to any person obtaining a 43 * copy of this software and associated documentation files (the "Software"), 44 * to deal in the Software without restriction, including without limitation 45 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 46 * and/or sell copies of the Software, and to permit persons to whom the 47 * Software is furnished to do so, subject to the following conditions: 48 * 49 * The above copyright notice and this permission notice (including the next 50 * paragraph) shall be included in all copies or substantial portions of the 51 * Software. 52 * 53 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 54 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 55 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 56 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 57 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 58 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 59 * DEALINGS IN THE SOFTWARE. 60 */ 61 62/* 63 * Copyright 1992, 1993 by TOSHIBA Corp. 64 * 65 * Permission to use, copy, modify, and distribute this software and its 66 * documentation for any purpose and without fee is hereby granted, provided 67 * that the above copyright notice appear in all copies and that both that 68 * copyright notice and this permission notice appear in supporting 69 * documentation, and that the name of TOSHIBA not be used in advertising 70 * or publicity pertaining to distribution of the software without specific, 71 * written prior permission. TOSHIBA make no representations about the 72 * suitability of this software for any purpose. It is provided "as is" 73 * without express or implied warranty. 74 * 75 * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 76 * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 77 * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 78 * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 79 * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 80 * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 81 * SOFTWARE. 82 * 83 * Author: Katsuhisa Yano TOSHIBA Corp. 84 * mopi@osa.ilab.toshiba.co.jp 85 */ 86/* 87 * (c) Copyright 1995 FUJITSU LIMITED 88 * This is source code modified by FUJITSU LIMITED under the Joint 89 * Development Agreement for the CDE/Motif PST. 90 * 91 * Modifier: Masayoshi Shimamura FUJITSU LIMITED 92 * 93 */ 94 95#ifdef HAVE_CONFIG_H 96#include <config.h> 97#endif 98#include "Xlibint.h" 99#include "Xlcint.h" 100 101#ifdef USE_DYNAMIC_LC 102#undef USE_DEFAULT_LOADER 103#undef USE_GENERIC_LOADER 104#undef USE_UTF8_LOADER 105#else 106#define USE_GENERIC_LOADER 107#define USE_DEFAULT_LOADER 108#define USE_UTF8_LOADER 109#ifdef X_LOCALE 110# define USE_EUC_LOADER 111# define USE_SJIS_LOADER 112# define USE_JIS_LOADER 113#endif 114#endif 115 116/* 117 * The _XlcInitLoader function initializes the locale object loader list 118 * with vendor specific manner. 119 */ 120 121void 122_XlcInitLoader(void) 123{ 124 125#ifdef USE_DYNAMIC_LC 126 _XlcAddLoader(_XlcDynamicLoad, XlcHead); 127#else /* USE_DYNAMIC_LC */ 128 129#ifdef USE_GENERIC_LOADER 130 _XlcAddLoader(_XlcGenericLoader, XlcHead); 131#endif 132 133#ifdef USE_DEFAULT_LOADER 134 _XlcAddLoader(_XlcDefaultLoader, XlcHead); 135#endif 136 137#ifdef USE_UTF8_LOADER 138 _XlcAddLoader(_XlcUtf8Loader, XlcHead); 139#endif 140 141#ifdef USE_EUC_LOADER 142 _XlcAddLoader(_XlcEucLoader, XlcHead); 143#endif 144 145#ifdef USE_SJIS_LOADER 146 _XlcAddLoader(_XlcSjisLoader, XlcHead); 147#endif 148 149#ifdef USE_JIS_LOADER 150 _XlcAddLoader(_XlcJisLoader, XlcHead); 151#endif 152 153#ifdef USE_DYNAMIC_LOADER 154 _XlcAddLoader(_XlcDynamicLoader, XlcHead); 155#endif 156 157#endif /* USE_DYNAMIC_LC */ 158} 159 160void 161_XlcDeInitLoader(void) 162{ 163 164#ifdef USE_DYNAMIC_LC 165 _XlcRemoveLoader(_XlcDynamicLoad); 166#else /* USE_DYNAMIC_LC */ 167 168#ifdef USE_GENERIC_LOADER 169 _XlcRemoveLoader(_XlcGenericLoader); 170#endif 171 172#ifdef USE_DEFAULT_LOADER 173 _XlcRemoveLoader(_XlcDefaultLoader); 174#endif 175 176#ifdef USE_UTF8_LOADER 177 _XlcRemoveLoader(_XlcUtf8Loader); 178#endif 179 180#ifdef USE_EUC_LOADER 181 _XlcRemoveLoader(_XlcEucLoader); 182#endif 183 184#ifdef USE_SJIS_LOADER 185 _XlcRemoveLoader(_XlcSjisLoader); 186#endif 187 188#ifdef USE_JIS_LOADER 189 _XlcRemoveLoader(_XlcJisLoader); 190#endif 191 192#ifdef USE_DYNAMIC_LOADER 193 _XlcRemoveLoader(_XlcDynamicLoader); 194#endif 195 196#endif /* USE_DYNAMIC_LC */ 197} 198