-/* Copyright (C) 1996-2000, 2002, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
#include <dlfcn.h>
#include <gconv.h>
#include <wchar.h>
#include <wcsmbsload.h>
-#include <sysdep.h>
+#include <pointer_guard.h>
int
-wctob (c)
- wint_t c;
+wctob (wint_t c)
{
unsigned char buf[MB_LEN_MAX];
struct __gconv_step_data data;
data.__internal_use = 1;
data.__flags = __GCONV_IS_LAST;
data.__statep = &data.__state;
- data.__trans = NULL;
/* Make sure we start in the initial state. */
memset (&data.__state, '\0', sizeof (mbstate_t));
const unsigned char *argptr = (const unsigned char *) inptr;
__gconv_fct fct = fcts->tomb->__fct;
-#ifdef PTR_DEMANGLE
if (fcts->tomb->__shlib_handle != NULL)
PTR_DEMANGLE (fct);
-#endif
status = DL_CALL_FCT (fct,
(fcts->tomb, &data, &argptr,
argptr + sizeof (inbuf[0]), NULL, &dummy, 0, 1));