mbstowcs.3: SYNOPSIS: Use 'restrict' in prototypes

Both POSIX and glibc use 'restrict' in mbstowcs().
Let's use it here too.

.../glibc$ grep_glibc_prototype mbstowcs
stdlib/stdlib.h:933:
extern size_t mbstowcs (wchar_t *__restrict  __pwcs,
			const char *__restrict __s, size_t __n) __THROW
    __attr_access ((__read_only__, 2));
.../glibc$

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Alejandro Colomar 2021-03-06 00:50:58 +01:00 committed by Michael Kerrisk
parent b4a5b81892
commit 0634d31b54
1 changed files with 2 additions and 1 deletions

View File

@ -21,7 +21,8 @@ mbstowcs \- convert a multibyte string to a wide-character string
.nf
.B #include <stdlib.h>
.PP
.BI "size_t mbstowcs(wchar_t *" dest ", const char *" src ", size_t " n );
.BI "size_t mbstowcs(wchar_t *restrict " dest ", const char *restrict " src ,
.BI " size_t " n );
.fi
.SH DESCRIPTION
If