This source file includes following definitions.
- rpl_wcsrtombs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 #include <config.h>
19
20
21 #include <wchar.h>
22
23 extern mbstate_t _gl_wcsrtombs_state;
24
25 #if HAVE_WCSRTOMBS && !WCSRTOMBS_TERMINATION_BUG && !defined GNULIB_defined_mbstate_t
26
27
28 # undef wcsrtombs
29
30 size_t
31 rpl_wcsrtombs (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)
32 {
33 if (ps == NULL)
34 ps = &_gl_wcsrtombs_state;
35 # if WCSRTOMBS_NULL_ARG_BUG
36 if (dest == NULL)
37 {
38 const wchar_t *temp_src = *srcp;
39
40 return wcsrtombs (NULL, &temp_src, (size_t)-1, ps);
41 }
42 else
43 # endif
44 return wcsrtombs (dest, srcp, len, ps);
45 }
46
47 #else
48
49
50 # include <errno.h>
51 # include <stdlib.h>
52 # include <string.h>
53
54 # define FUNC wcsrtombs
55 # define SCHAR_T wchar_t
56 # define INTERNAL_STATE _gl_wcsrtombs_state
57 # define WCRTOMB wcrtomb
58 # include "wcsrtombs-impl.h"
59
60 #endif