1 /* Copyright (C) 1998, 1999, 2000, 2001 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
22 #include <locale/localeinfo.h>
23 #include <wcsmbsload.h>
24 #include <iconv/gconv_int.h>
27 /* These are the descriptions for the default conversion functions. */
28 static struct __gconv_step to_wc
=
30 .__shlib_handle
= NULL
,
33 .__from_name
= (char *) "MULTIBYTE",
34 .__to_name
= (char *) "WCHAR",
35 .__fct
= __gconv_transform_multibyte_wchar
,
38 .__min_needed_from
= 1,
39 .__max_needed_from
= MB_LEN_MAX
,
46 static struct __gconv_step to_mb
=
48 .__shlib_handle
= NULL
,
51 .__from_name
= (char *) "WCHAR",
52 .__to_name
= (char *) "MULTIBYTE",
53 .__fct
= __gconv_transform_wchar_multibyte
,
56 .__min_needed_from
= 4,
57 .__max_needed_from
= 4,
59 .__max_needed_to
= MB_LEN_MAX
,
65 /* For the default locale we only have to handle ANSI_X3.4-1968. */
66 struct gconv_fcts __wcsmbs_gconv_fcts
=
75 /* Clone the current conversion function set. */
78 __wcsmbs_clone_conv (struct gconv_fcts
*copy
)
81 *copy
= __wcsmbs_gconv_fcts
;