aboutsummaryrefslogtreecommitdiffstats
path: root/man3
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2021-02-24 15:43:08 +0100
committerMichael Kerrisk <mtk.manpages@gmail.com>2021-03-03 23:12:22 +0100
commit1ac0a9ccbc95f7be947ce53db65f90037c85173c (patch)
tree6ecf50f6ec4d284f48fe4054e337b4f83185cdad /man3
parentf61d0340cc6bdce2fb3b442e067079c27d393093 (diff)
downloadman-pages-1ac0a9ccbc95f7be947ce53db65f90037c85173c.tar.gz
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>
Diffstat (limited to 'man3')
-rw-r--r--man3/fopen.37
1 files changed, 5 insertions, 2 deletions
diff --git a/man3/fopen.3 b/man3/fopen.3
index 65ca99f758..d7af3fe96e 100644
--- a/man3/fopen.3
+++ b/man3/fopen.3
@@ -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