lcInit.c revision 1ab64890
11ab64890Smrg/*
21ab64890SmrgCopyright 1985, 1986, 1987, 1991, 1998  The Open Group
31ab64890Smrg
41ab64890SmrgPortions Copyright 2000 Sun Microsystems, Inc. All Rights Reserved.
51ab64890Smrg
61ab64890SmrgPermission is hereby granted, free of charge, to any person obtaining a
71ab64890Smrgcopy of this software and associated documentation files (the
81ab64890Smrg"Software"), to deal in the Software without restriction, including
91ab64890Smrgwithout limitation the rights to use, copy, modify, merge, publish,
101ab64890Smrgdistribute, sublicense, and/or sell copies of the Software, and to
111ab64890Smrgpermit persons to whom the Software is furnished to do so, subject to
121ab64890Smrgthe following conditions: The above copyright notice and this
131ab64890Smrgpermission notice shall be included in all copies or substantial
141ab64890Smrgportions of the Software.
151ab64890Smrg
161ab64890Smrg
171ab64890SmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
181ab64890SmrgOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
191ab64890SmrgMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
201ab64890SmrgIN NO EVENT SHALL THE OPEN GROUP OR SUN MICROSYSTEMS, INC. BE LIABLE
211ab64890SmrgFOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
221ab64890SmrgCONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
231ab64890SmrgTHE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE EVEN IF
241ab64890SmrgADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
251ab64890Smrg
261ab64890Smrg
271ab64890SmrgExcept as contained in this notice, the names of The Open Group and/or
281ab64890SmrgSun Microsystems, Inc. shall not be used in advertising or otherwise to
291ab64890Smrgpromote the sale, use or other dealings in this Software without prior
301ab64890Smrgwritten authorization from The Open Group and/or Sun Microsystems,
311ab64890SmrgInc., as applicable.
321ab64890Smrg
331ab64890Smrg
341ab64890SmrgX Window System is a trademark of The Open Group
351ab64890Smrg
361ab64890SmrgOSF/1, OSF/Motif and Motif are registered trademarks, and OSF, the OSF
371ab64890Smrglogo, LBX, X Window System, and Xinerama are trademarks of the Open
381ab64890SmrgGroup. All other trademarks and registered trademarks mentioned herein
391ab64890Smrgare the property of their respective owners. No right, title or
401ab64890Smrginterest in or to any trademark, service mark, logo or trade name of
411ab64890SmrgSun Microsystems, Inc. or its licensors is granted.
421ab64890Smrg
431ab64890Smrg*/
441ab64890Smrg/* $Xorg: lcInit.c,v 1.4 2000/12/12 12:44:05 coskrey Exp $ */
451ab64890Smrg/*
461ab64890Smrg * Copyright 1992, 1993 by TOSHIBA Corp.
471ab64890Smrg *
481ab64890Smrg * Permission to use, copy, modify, and distribute this software and its
491ab64890Smrg * documentation for any purpose and without fee is hereby granted, provided
501ab64890Smrg * that the above copyright notice appear in all copies and that both that
511ab64890Smrg * copyright notice and this permission notice appear in supporting
521ab64890Smrg * documentation, and that the name of TOSHIBA not be used in advertising
531ab64890Smrg * or publicity pertaining to distribution of the software without specific,
541ab64890Smrg * written prior permission. TOSHIBA make no representations about the
551ab64890Smrg * suitability of this software for any purpose.  It is provided "as is"
561ab64890Smrg * without express or implied warranty.
571ab64890Smrg *
581ab64890Smrg * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
591ab64890Smrg * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
601ab64890Smrg * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
611ab64890Smrg * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
621ab64890Smrg * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
631ab64890Smrg * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
641ab64890Smrg * SOFTWARE.
651ab64890Smrg *
661ab64890Smrg * Author: Katsuhisa Yano	TOSHIBA Corp.
671ab64890Smrg *			   	mopi@osa.ilab.toshiba.co.jp
681ab64890Smrg */
691ab64890Smrg/*
701ab64890Smrg *  (c) Copyright 1995 FUJITSU LIMITED
711ab64890Smrg *  This is source code modified by FUJITSU LIMITED under the Joint
721ab64890Smrg *  Development Agreement for the CDE/Motif PST.
731ab64890Smrg *
741ab64890Smrg *   Modifier: Masayoshi Shimamura      FUJITSU LIMITED
751ab64890Smrg *
761ab64890Smrg */
771ab64890Smrg/* $XFree86: xc/lib/X11/lcInit.c,v 3.9 2001/11/16 00:52:27 dawes Exp $ */
781ab64890Smrg
791ab64890Smrg#ifdef HAVE_CONFIG_H
801ab64890Smrg#include <config.h>
811ab64890Smrg#endif
821ab64890Smrg#include "Xlibint.h"
831ab64890Smrg#include "Xlcint.h"
841ab64890Smrg
851ab64890Smrg#ifdef USE_DYNAMIC_LC
861ab64890Smrg#undef USE_DEFAULT_LOADER
871ab64890Smrg#undef USE_GENERIC_LOADER
881ab64890Smrg#undef USE_UTF8_LOADER
891ab64890Smrg#else
901ab64890Smrg#define USE_GENERIC_LOADER
911ab64890Smrg#define USE_DEFAULT_LOADER
921ab64890Smrg#define USE_UTF8_LOADER
931ab64890Smrg#ifdef X_LOCALE
941ab64890Smrg# define USE_EUC_LOADER
951ab64890Smrg# define USE_SJIS_LOADER
961ab64890Smrg# define USE_JIS_LOADER
971ab64890Smrg#endif
981ab64890Smrg#endif
991ab64890Smrg
1001ab64890Smrg/*
1011ab64890Smrg * The _XlcInitLoader function initializes the locale object loader list
1021ab64890Smrg * with vendor specific manner.
1031ab64890Smrg */
1041ab64890Smrg
1051ab64890Smrgvoid
1061ab64890Smrg_XlcInitLoader()
1071ab64890Smrg{
1081ab64890Smrg
1091ab64890Smrg#ifdef USE_DYNAMIC_LC
1101ab64890Smrg    _XlcAddLoader(_XlcDynamicLoad, XlcHead);
1111ab64890Smrg#else /* USE_DYNAMIC_LC */
1121ab64890Smrg
1131ab64890Smrg#ifdef USE_GENERIC_LOADER
1141ab64890Smrg    _XlcAddLoader(_XlcGenericLoader, XlcHead);
1151ab64890Smrg#endif
1161ab64890Smrg
1171ab64890Smrg#ifdef USE_DEFAULT_LOADER
1181ab64890Smrg    _XlcAddLoader(_XlcDefaultLoader, XlcHead);
1191ab64890Smrg#endif
1201ab64890Smrg
1211ab64890Smrg#ifdef USE_UTF8_LOADER
1221ab64890Smrg    _XlcAddLoader(_XlcUtf8Loader, XlcHead);
1231ab64890Smrg#endif
1241ab64890Smrg
1251ab64890Smrg#ifdef USE_EUC_LOADER
1261ab64890Smrg    _XlcAddLoader(_XlcEucLoader, XlcHead);
1271ab64890Smrg#endif
1281ab64890Smrg
1291ab64890Smrg#ifdef USE_SJIS_LOADER
1301ab64890Smrg    _XlcAddLoader(_XlcSjisLoader, XlcHead);
1311ab64890Smrg#endif
1321ab64890Smrg
1331ab64890Smrg#ifdef USE_JIS_LOADER
1341ab64890Smrg    _XlcAddLoader(_XlcJisLoader, XlcHead);
1351ab64890Smrg#endif
1361ab64890Smrg
1371ab64890Smrg#ifdef USE_DYNAMIC_LOADER
1381ab64890Smrg    _XlcAddLoader(_XlcDynamicLoader, XlcHead);
1391ab64890Smrg#endif
1401ab64890Smrg
1411ab64890Smrg#endif /* USE_DYNAMIC_LC */
1421ab64890Smrg}
1431ab64890Smrg
1441ab64890Smrgvoid
1451ab64890Smrg_XlcDeInitLoader()
1461ab64890Smrg{
1471ab64890Smrg
1481ab64890Smrg#ifdef USE_DYNAMIC_LC
1491ab64890Smrg    _XlcRemoveLoader(_XlcDynamicLoad);
1501ab64890Smrg#else /* USE_DYNAMIC_LC */
1511ab64890Smrg
1521ab64890Smrg#ifdef USE_GENERIC_LOADER
1531ab64890Smrg    _XlcRemoveLoader(_XlcGenericLoader);
1541ab64890Smrg#endif
1551ab64890Smrg
1561ab64890Smrg#ifdef USE_DEFAULT_LOADER
1571ab64890Smrg    _XlcRemoveLoader(_XlcDefaultLoader);
1581ab64890Smrg#endif
1591ab64890Smrg
1601ab64890Smrg#ifdef USE_UTF8_LOADER
1611ab64890Smrg    _XlcRemoveLoader(_XlcUtf8Loader);
1621ab64890Smrg#endif
1631ab64890Smrg
1641ab64890Smrg#ifdef USE_EUC_LOADER
1651ab64890Smrg    _XlcRemoveLoader(_XlcEucLoader);
1661ab64890Smrg#endif
1671ab64890Smrg
1681ab64890Smrg#ifdef USE_SJIS_LOADER
1691ab64890Smrg   _XlcRemoveLoader(_XlcSjisLoader);
1701ab64890Smrg#endif
1711ab64890Smrg
1721ab64890Smrg#ifdef USE_JIS_LOADER
1731ab64890Smrg    _XlcRemoveLoader(_XlcJisLoader);
1741ab64890Smrg#endif
1751ab64890Smrg
1761ab64890Smrg#ifdef USE_DYNAMIC_LOADER
1771ab64890Smrg    _XlcRemoveLoader(_XlcDynamicLoader);
1781ab64890Smrg#endif
1791ab64890Smrg
1801ab64890Smrg#endif /* USE_DYNAMIC_LC */
1811ab64890Smrg}
182