Debian Codegraph @

nx-X11/lib/src/xlibi18n/lcInit.c

raw
1 /*
2 Copyright 1985, 1986, 1987, 1991, 1998 The Open Group
3
4 Permission is hereby granted, free of charge, to any person obtaining a
5 copy of this software and associated documentation files (the
6 "Software"), to deal in the Software without restriction, including
7 without limitation the rights to use, copy, modify, merge, publish,
8 distribute, sublicense, and/or sell copies of the Software, and to
9 permit persons to whom the Software is furnished to do so, subject to
10 the following conditions: The above copyright notice and this
11 permission notice shall be included in all copies or substantial
12 portions of the Software.
13
14
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE
21 EVEN IF ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH DAMAGES.
22
23
24 Except as contained in this notice, the name of The Open Group shall not be
25 used in advertising or otherwise to promote the sale, use or other dealings
26 in this Software without prior written authorization from The Open Group.
27
28
29 X Window System is a trademark of The Open Group
30
31 OSF/1, OSF/Motif and Motif are registered trademarks, and OSF, the OSF
32 logo, LBX, X Window System, and Xinerama are trademarks of the Open
33 Group. All other trademarks and registered trademarks mentioned herein
34 are the property of their respective owners. No right, title or
35 interest in or to any trademark, service mark, logo or trade name of
36 Sun Microsystems, Inc. or its licensors is granted.
37
38 */
39 /*
40 * Copyright 2000 Oracle and/or its affiliates. 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 * [email protected]
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 #endif
110
111 /*
112 * The _XlcInitLoader function initializes the locale object loader list
113 * with vendor specific manner.
114 */
115
116 void
117 _XlcInitLoader(void)
118 {
119
120 #ifdef USE_DYNAMIC_LC
121 _XlcAddLoader(_XlcDynamicLoad, XlcHead);
122 #else /* USE_DYNAMIC_LC */
123
124 #ifdef USE_GENERIC_LOADER
125 _XlcAddLoader(_XlcGenericLoader, XlcHead);
126 #endif
127
128 #ifdef USE_DEFAULT_LOADER
129 _XlcAddLoader(_XlcDefaultLoader, XlcHead);
130 #endif
131
132 #ifdef USE_UTF8_LOADER
133 _XlcAddLoader(_XlcUtf8Loader, XlcHead);
134 #endif
135
136 #ifdef USE_DYNAMIC_LOADER
137 _XlcAddLoader(_XlcDynamicLoader, XlcHead);
138 #endif
139
140 #endif /* USE_DYNAMIC_LC */
141 }
142
143 void
144 _XlcDeInitLoader(void)
145 {
146
147 #ifdef USE_DYNAMIC_LC
148 _XlcRemoveLoader(_XlcDynamicLoad);
149 #else /* USE_DYNAMIC_LC */
150
151 #ifdef USE_GENERIC_LOADER
152 _XlcRemoveLoader(_XlcGenericLoader);
153 #endif
154
155 #ifdef USE_DEFAULT_LOADER
156 _XlcRemoveLoader(_XlcDefaultLoader);
157 #endif
158
159 #ifdef USE_UTF8_LOADER
160 _XlcRemoveLoader(_XlcUtf8Loader);
161 #endif
162
163 #ifdef USE_DYNAMIC_LOADER
164 _XlcRemoveLoader(_XlcDynamicLoader);
165 #endif
166
167 #endif /* USE_DYNAMIC_LC */
168 }