__wcrtomb_chk

Name

__wcrtomb_chk -- convert a wide character to a multibyte sequence, with buffer overflow checking

Synopsis

#include <wchar.h>

size_t __wcrtomb_chk(char * s, wchar_t wchar, mbstate_t * ps, size_t buflen);

Description

The interface __wcrtomb_chk() shall function in the same way as the interface wcrtomb(), except that __wcrtomb_chk() shall check for buffer overflow before computing a result. If an overflow is anticipated, the function shall abort and the program calling it shall exit.

The parameter buflen specifies the size of the object pointed to by s. If it is less than MB_CUR_MAX, then the function shall abort and the program calling it shall exit.

The __wcrtomb_chk() function is not in the source standard; it is only in the binary standard.