summaryrefslogtreecommitdiff
path: root/lib/uchar.in.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2020-01-10 23:28:47 +0100
committerBruno Haible <bruno@clisp.org>2020-01-10 23:28:47 +0100
commit980b40b1d6464d3aa9e68d8a0c19009c6cdaf6fb (patch)
treef1f7b75cf983113e5e6c6a0aacce1918be65a3ea /lib/uchar.in.h
parentf5eb8cea72469348b423ae22068eeb9e1399011b (diff)
downloadgnulib-980b40b1d6464d3aa9e68d8a0c19009c6cdaf6fb.tar.gz
c32snrtombs: New module.
* lib/uchar.in.h (c32snrtombs): New declaration. * lib/wcsnrtombs-impl.h: Parameterize: Use macros FUNC, SCHAR_T, INTERNAL_STATE, WCRTOMB. * lib/wcsnrtombs.c (FUNC, SCHAR_T, INTERNAL_STATE, WCRTOMB): New macros. * lib/c32snrtombs.c: New file. * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_C32SNRTOMBS. * modules/uchar (Makefile.am): Substitute GNULIB_C32SNRTOMBS. * modules/c32snrtombs: New file. * tests/test-uchar-c++.cc: Test the signature of c32snrtombs. * doc/posix-functions/wcsnrtombs.texi: Mention the new module.
Diffstat (limited to 'lib/uchar.in.h')
-rw-r--r--lib/uchar.in.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/uchar.in.h b/lib/uchar.in.h
index 75da254596..a149f5aa30 100644
--- a/lib/uchar.in.h
+++ b/lib/uchar.in.h
@@ -94,6 +94,19 @@ _GL_WARN_ON_USE (mbrtoc32, "c32rtomb is not portable - "
/* Convert a 32-bit wide string to a string. */
+#if @GNULIB_C32SNRTOMBS@
+_GL_FUNCDECL_SYS (c32snrtombs, size_t,
+ (char *dest, const char32_t **srcp, size_t srclen, size_t len,
+ mbstate_t *ps)
+ _GL_ARG_NONNULL ((2)));
+_GL_CXXALIAS_SYS (c32snrtombs, size_t,
+ (char *dest, const char32_t **srcp, size_t srclen, size_t len,
+ mbstate_t *ps));
+_GL_CXXALIASWARN (c32snrtombs);
+#endif
+
+
+/* Convert a 32-bit wide string to a string. */
#if @GNULIB_C32SRTOMBS@
_GL_FUNCDECL_SYS (c32srtombs, size_t,
(char *dest, const char32_t **srcp, size_t len, mbstate_t *ps)