lcInit.c revision b4ee4795
11ab64890Smrg/* 21ab64890SmrgCopyright 1985, 1986, 1987, 1991, 1998 The Open Group 31ab64890Smrg 41ab64890SmrgPermission is hereby granted, free of charge, to any person obtaining a 51ab64890Smrgcopy of this software and associated documentation files (the 61ab64890Smrg"Software"), to deal in the Software without restriction, including 71ab64890Smrgwithout limitation the rights to use, copy, modify, merge, publish, 81ab64890Smrgdistribute, sublicense, and/or sell copies of the Software, and to 91ab64890Smrgpermit persons to whom the Software is furnished to do so, subject to 101ab64890Smrgthe following conditions: The above copyright notice and this 111ab64890Smrgpermission notice shall be included in all copies or substantial 121ab64890Smrgportions of the Software. 131ab64890Smrg 141ab64890Smrg 15b4ee4795SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16b4ee4795SmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17b4ee4795SmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18b4ee4795SmrgOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 19b4ee4795SmrgAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20b4ee4795SmrgCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE 21b4ee4795SmrgEVEN IF ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES. 221ab64890Smrg 231ab64890Smrg 24b4ee4795SmrgExcept as contained in this notice, the name of The Open Group shall not be 25b4ee4795Smrgused in advertising or otherwise to promote the sale, use or other dealings 26b4ee4795Smrgin this Software without prior written authorization from The Open Group. 271ab64890Smrg 281ab64890Smrg 291ab64890SmrgX Window System is a trademark of The Open Group 301ab64890Smrg 311ab64890SmrgOSF/1, OSF/Motif and Motif are registered trademarks, and OSF, the OSF 321ab64890Smrglogo, LBX, X Window System, and Xinerama are trademarks of the Open 331ab64890SmrgGroup. All other trademarks and registered trademarks mentioned herein 341ab64890Smrgare the property of their respective owners. No right, title or 351ab64890Smrginterest in or to any trademark, service mark, logo or trade name of 361ab64890SmrgSun Microsystems, Inc. or its licensors is granted. 371ab64890Smrg 381ab64890Smrg*/ 39b4ee4795Smrg/* 40b4ee4795Smrg * Copyright 2000 Sun Microsystems, Inc. All rights reserved. 41b4ee4795Smrg * 42b4ee4795Smrg * Permission is hereby granted, free of charge, to any person obtaining a 43b4ee4795Smrg * copy of this software and associated documentation files (the "Software"), 44b4ee4795Smrg * to deal in the Software without restriction, including without limitation 45b4ee4795Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense, 46b4ee4795Smrg * and/or sell copies of the Software, and to permit persons to whom the 47b4ee4795Smrg * Software is furnished to do so, subject to the following conditions: 48b4ee4795Smrg * 49b4ee4795Smrg * The above copyright notice and this permission notice (including the next 50b4ee4795Smrg * paragraph) shall be included in all copies or substantial portions of the 51b4ee4795Smrg * Software. 52b4ee4795Smrg * 53b4ee4795Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 54b4ee4795Smrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 55b4ee4795Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 56b4ee4795Smrg * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 57b4ee4795Smrg * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 58b4ee4795Smrg * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 59b4ee4795Smrg * DEALINGS IN THE SOFTWARE. 60b4ee4795Smrg */ 61b4ee4795Smrg 621ab64890Smrg/* 631ab64890Smrg * Copyright 1992, 1993 by TOSHIBA Corp. 641ab64890Smrg * 651ab64890Smrg * Permission to use, copy, modify, and distribute this software and its 661ab64890Smrg * documentation for any purpose and without fee is hereby granted, provided 671ab64890Smrg * that the above copyright notice appear in all copies and that both that 681ab64890Smrg * copyright notice and this permission notice appear in supporting 691ab64890Smrg * documentation, and that the name of TOSHIBA not be used in advertising 701ab64890Smrg * or publicity pertaining to distribution of the software without specific, 711ab64890Smrg * written prior permission. TOSHIBA make no representations about the 721ab64890Smrg * suitability of this software for any purpose. It is provided "as is" 731ab64890Smrg * without express or implied warranty. 741ab64890Smrg * 751ab64890Smrg * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 761ab64890Smrg * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 771ab64890Smrg * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 781ab64890Smrg * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 791ab64890Smrg * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 801ab64890Smrg * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 811ab64890Smrg * SOFTWARE. 821ab64890Smrg * 831ab64890Smrg * Author: Katsuhisa Yano TOSHIBA Corp. 841ab64890Smrg * mopi@osa.ilab.toshiba.co.jp 851ab64890Smrg */ 861ab64890Smrg/* 871ab64890Smrg * (c) Copyright 1995 FUJITSU LIMITED 881ab64890Smrg * This is source code modified by FUJITSU LIMITED under the Joint 891ab64890Smrg * Development Agreement for the CDE/Motif PST. 901ab64890Smrg * 9161b2299dSmrg * Modifier: Masayoshi Shimamura FUJITSU LIMITED 921ab64890Smrg * 931ab64890Smrg */ 941ab64890Smrg 951ab64890Smrg#ifdef HAVE_CONFIG_H 961ab64890Smrg#include <config.h> 971ab64890Smrg#endif 981ab64890Smrg#include "Xlibint.h" 991ab64890Smrg#include "Xlcint.h" 1001ab64890Smrg 1011ab64890Smrg#ifdef USE_DYNAMIC_LC 1021ab64890Smrg#undef USE_DEFAULT_LOADER 1031ab64890Smrg#undef USE_GENERIC_LOADER 1041ab64890Smrg#undef USE_UTF8_LOADER 1051ab64890Smrg#else 1061ab64890Smrg#define USE_GENERIC_LOADER 1071ab64890Smrg#define USE_DEFAULT_LOADER 1081ab64890Smrg#define USE_UTF8_LOADER 1091ab64890Smrg#ifdef X_LOCALE 1101ab64890Smrg# define USE_EUC_LOADER 1111ab64890Smrg# define USE_SJIS_LOADER 1121ab64890Smrg# define USE_JIS_LOADER 1131ab64890Smrg#endif 1141ab64890Smrg#endif 1151ab64890Smrg 1161ab64890Smrg/* 1171ab64890Smrg * The _XlcInitLoader function initializes the locale object loader list 1181ab64890Smrg * with vendor specific manner. 1191ab64890Smrg */ 1201ab64890Smrg 1211ab64890Smrgvoid 12261b2299dSmrg_XlcInitLoader(void) 1231ab64890Smrg{ 1241ab64890Smrg 1251ab64890Smrg#ifdef USE_DYNAMIC_LC 1261ab64890Smrg _XlcAddLoader(_XlcDynamicLoad, XlcHead); 1271ab64890Smrg#else /* USE_DYNAMIC_LC */ 1281ab64890Smrg 1291ab64890Smrg#ifdef USE_GENERIC_LOADER 1301ab64890Smrg _XlcAddLoader(_XlcGenericLoader, XlcHead); 1311ab64890Smrg#endif 1321ab64890Smrg 1331ab64890Smrg#ifdef USE_DEFAULT_LOADER 1341ab64890Smrg _XlcAddLoader(_XlcDefaultLoader, XlcHead); 1351ab64890Smrg#endif 1361ab64890Smrg 1371ab64890Smrg#ifdef USE_UTF8_LOADER 1381ab64890Smrg _XlcAddLoader(_XlcUtf8Loader, XlcHead); 1391ab64890Smrg#endif 1401ab64890Smrg 1411ab64890Smrg#ifdef USE_EUC_LOADER 1421ab64890Smrg _XlcAddLoader(_XlcEucLoader, XlcHead); 1431ab64890Smrg#endif 1441ab64890Smrg 1451ab64890Smrg#ifdef USE_SJIS_LOADER 1461ab64890Smrg _XlcAddLoader(_XlcSjisLoader, XlcHead); 1471ab64890Smrg#endif 1481ab64890Smrg 1491ab64890Smrg#ifdef USE_JIS_LOADER 1501ab64890Smrg _XlcAddLoader(_XlcJisLoader, XlcHead); 1511ab64890Smrg#endif 1521ab64890Smrg 1531ab64890Smrg#ifdef USE_DYNAMIC_LOADER 1541ab64890Smrg _XlcAddLoader(_XlcDynamicLoader, XlcHead); 1551ab64890Smrg#endif 1561ab64890Smrg 1571ab64890Smrg#endif /* USE_DYNAMIC_LC */ 1581ab64890Smrg} 1591ab64890Smrg 1601ab64890Smrgvoid 16161b2299dSmrg_XlcDeInitLoader(void) 1621ab64890Smrg{ 1631ab64890Smrg 1641ab64890Smrg#ifdef USE_DYNAMIC_LC 1651ab64890Smrg _XlcRemoveLoader(_XlcDynamicLoad); 1661ab64890Smrg#else /* USE_DYNAMIC_LC */ 1671ab64890Smrg 1681ab64890Smrg#ifdef USE_GENERIC_LOADER 1691ab64890Smrg _XlcRemoveLoader(_XlcGenericLoader); 1701ab64890Smrg#endif 1711ab64890Smrg 1721ab64890Smrg#ifdef USE_DEFAULT_LOADER 1731ab64890Smrg _XlcRemoveLoader(_XlcDefaultLoader); 1741ab64890Smrg#endif 1751ab64890Smrg 1761ab64890Smrg#ifdef USE_UTF8_LOADER 1771ab64890Smrg _XlcRemoveLoader(_XlcUtf8Loader); 1781ab64890Smrg#endif 1791ab64890Smrg 1801ab64890Smrg#ifdef USE_EUC_LOADER 1811ab64890Smrg _XlcRemoveLoader(_XlcEucLoader); 1821ab64890Smrg#endif 1831ab64890Smrg 1841ab64890Smrg#ifdef USE_SJIS_LOADER 1851ab64890Smrg _XlcRemoveLoader(_XlcSjisLoader); 1861ab64890Smrg#endif 1871ab64890Smrg 1881ab64890Smrg#ifdef USE_JIS_LOADER 1891ab64890Smrg _XlcRemoveLoader(_XlcJisLoader); 1901ab64890Smrg#endif 1911ab64890Smrg 1921ab64890Smrg#ifdef USE_DYNAMIC_LOADER 1931ab64890Smrg _XlcRemoveLoader(_XlcDynamicLoader); 1941ab64890Smrg#endif 1951ab64890Smrg 1961ab64890Smrg#endif /* USE_DYNAMIC_LC */ 1971ab64890Smrg} 198