Hash :
80ae5aa1
Author :
Date :
2020-01-05T02:32:18
mbsnrtoc32s: New module. * lib/uchar.in.h (mbsnrtoc32s): New declaration. * lib/mbsnrtowcs-impl.h: Parameterize: Use macros FUNC, DCHAR_T, INTERNAL_STATE, MBRTOWC. * lib/mbsnrtowcs.c (FUNC, DCHAR_T, INTERNAL_STATE, MBRTOWC): New macros. * lib/mbsnrtoc32s.c: New file. * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_MBSNRTOC32S. * modules/uchar (Makefile.am): Substitute GNULIB_MBSNRTOC32S. * modules/mbsnrtoc32s: New file. * tests/test-uchar-c++.cc: Test the signature of mbsnrtoc32s. * doc/posix-functions/mbsnrtowcs.texi: Mention the new module.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
/* Convert string to wide string.
Copyright (C) 2008-2020 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
/* Specification. */
#include <wchar.h>
#include <errno.h>
#include <limits.h>
#include <stdlib.h>
#include "minmax.h"
#include "strnlen1.h"
extern mbstate_t _gl_mbsrtowcs_state;
#define FUNC mbsnrtowcs
#define DCHAR_T wchar_t
#define INTERNAL_STATE _gl_mbsrtowcs_state
#define MBRTOWC mbrtowc
#include "mbsnrtowcs-impl.h"