1 /* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
3 Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21 #define _WCSMBSLOAD_H 1
25 #include <locale/localeinfo.h>
28 /* Contains pointers to the used functions in the `gconv' modules. */
31 struct __gconv_step
*towc
;
33 struct __gconv_step
*tomb
;
37 /* Set of currently active conversion functions. */
38 extern struct gconv_fcts __wcsmbs_gconv_fcts attribute_hidden
;
41 /* Last loaded locale for LC_CTYPE. */
42 extern const struct locale_data
*__wcsmbs_last_locale attribute_hidden
;
45 /* Load conversion functions for the currently selected locale. */
46 extern void __wcsmbs_load_conv (const struct locale_data
*new_category
)
49 /* Clone the current `__wcsmbs_load_conv' value. */
50 extern void __wcsmbs_clone_conv (struct gconv_fcts
*copy
)
53 /* Find the conversion functions for converting to and from NAME. */
54 extern int __wcsmbs_named_conv (struct gconv_fcts
*copy
, const char *name
)
58 #include <iconv/gconv_int.h>
61 /* Variable for conversion from ASCII to wchar_t. */
62 extern struct __gconv_step __wcsmbs_to_wc attribute_hidden
;
65 /* Load the function implementation if necessary. */
66 extern struct __gconv_step
*__wcsmbs_getfct (const char *to
, const char *from
,
71 /* Check whether the LC_CTYPE locale changed since the last call.
72 Update the pointers appropriately. */
74 update_conversion_ptrs (void)
76 if (__wcsmbs_last_locale
!= _NL_CURRENT_DATA (LC_CTYPE
))
77 __wcsmbs_load_conv (_NL_CURRENT_DATA (LC_CTYPE
));
80 #endif /* wcsmbsload.h */