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

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

.../glibc$ grep_glibc_prototype strtoimax
stdlib/inttypes.h:297:
extern intmax_t strtoimax (const char *__restrict __nptr,
			   char **__restrict __endptr, int __base) __THROW;
.../glibc$ grep_glibc_prototype strtoumax
stdlib/inttypes.h:301:
extern uintmax_t strtoumax (const char *__restrict __nptr,
			    char ** __restrict __endptr, int __base) __THROW;
.../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-10 19:31:46 +01:00 committed by Michael Kerrisk
parent 4e2346405d
commit 8a0684ec41
1 changed files with 4 additions and 2 deletions

View File

@ -28,8 +28,10 @@ strtoimax, strtoumax \- convert string to integer
.nf
.B #include <inttypes.h>
.PP
.BI "intmax_t strtoimax(const char *" nptr ", char **" endptr ", int " base );
.BI "uintmax_t strtoumax(const char *" nptr ", char **" endptr ", int " base );
.BI "intmax_t strtoimax(const char *restrict " nptr ", char **restrict " endptr ,
.BI " int " base );
.BI "uintmax_t strtoumax(const char *restrict " nptr ", char **restrict " endptr ,
.BI " int " base );
.fi
.SH DESCRIPTION
These functions are just like