diff mbox series

[11/22] mbrtowc.3: SYNOPSIS: Use 'restrict' in prototypes

Message ID 20210305235105.177359-12-alx.manpages@gmail.com
State New
Headers show
Series man3: SYNOPSIS: Use 'restrict' in prototypes (batch 3) | expand

Commit Message

Alejandro Colomar March 5, 2021, 11:50 p.m. UTC
Both POSIX and glibc use 'restrict' in mbrtowc().
Let's use it here too.

.../glibc$ grep_glibc_prototype mbrtowc
wcsmbs/wchar.h:296:
extern size_t mbrtowc (wchar_t *__restrict __pwc,
		       const char *__restrict __s, size_t __n,
		       mbstate_t *__restrict __p) __THROW;
.../glibc$

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man3/mbrtowc.3 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/man3/mbrtowc.3 b/man3/mbrtowc.3
index c092b2d63..f3ea9d049 100644
--- a/man3/mbrtowc.3
+++ b/man3/mbrtowc.3
@@ -21,8 +21,9 @@  mbrtowc \- convert a multibyte sequence to a wide character
 .nf
 .B #include <wchar.h>
 .PP
-.BI "size_t mbrtowc(wchar_t *" pwc ", const char *" s ", size_t " n \
-", mbstate_t *" ps );
+.BI "size_t mbrtowc(wchar_t *restrict " pwc ", const char *restrict " s \
+", size_t " n ,
+.BI "               mbstate_t *restrict " ps );
 .fi
 .SH DESCRIPTION
 The main case for this function is when