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

Both POSIX and glibc use 'restrict' for some of these functions.
Let's use it here too.

glibc:
=============================  fopen
libio/stdio.h:246:
FILE *fopen (const char *restrict filename,
                    const char *restrict modes) wur;
=============================  fdopen
libio/stdio.h:279:
FILE *fdopen (int fd, const char *modes) THROW wur;
=============================  freopen
libio/stdio.h:252:
FILE *freopen (const char *restrict filename,
                      const char *restrict modes,
                      FILE *restrict stream) wur;

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-02-24 15:43:08 +01:00 committed by Michael Kerrisk
parent f61d0340cc
commit 1ac0a9ccbc
1 changed files with 5 additions and 2 deletions

View File

@ -48,9 +48,12 @@ fopen, fdopen, freopen \- stream open functions
.nf
.B #include <stdio.h>
.PP
.BI "FILE *fopen(const char *" pathname ", const char *" mode );
.BI "FILE *fopen(const char *restrict " pathname \
", const char *restrict " mode );
.BI "FILE *fdopen(int " fd ", const char *" mode );
.BI "FILE *freopen(const char *" pathname ", const char *" mode ", FILE *" stream );
.BI "FILE *freopen(const char *restrict " pathname \
", const char *restrict " mode ,
.BI " FILE *restrict " stream );
.fi
.PP
.RS -4