public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx.manpages@gmail.com>
To: mtk.manpages@gmail.com
Cc: Alejandro Colomar <alx.manpages@gmail.com>,
	linux-man@vger.kernel.org, libc-alpha@sourceware.org
Subject: [PATCH 05/24] setbuf.3: SYNOPSIS: Use 'restrict' in prototypes
Date: Wed, 10 Mar 2021 19:31:31 +0100	[thread overview]
Message-ID: <20210310183149.194717-6-alx.manpages@gmail.com> (raw)
In-Reply-To: <20210310183149.194717-1-alx.manpages@gmail.com>

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

.../glibc$ grep_glibc_prototype setvbuf
libio/stdio.h:308:
extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
		    int __modes, size_t __n) __THROW;
.../glibc$ grep_glibc_prototype setbuf
libio/stdio.h:304:
extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __THROW;
.../glibc$

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man3/setbuf.3 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/man3/setbuf.3 b/man3/setbuf.3
index ac73bb06e..708e5c5aa 100644
--- a/man3/setbuf.3
+++ b/man3/setbuf.3
@@ -52,10 +52,10 @@ setbuf, setbuffer, setlinebuf, setvbuf \- stream buffering operations
 .nf
 .B #include <stdio.h>
 .PP
-.BI "int setvbuf(FILE *" stream ", char *" buf ", int " mode \
-", size_t " size );
+.BI "int setvbuf(FILE *restrict " stream ", char *restrict " buf ,
+.BI "            int " mode ", size_t " size );
 .PP
-.BI "void setbuf(FILE *" stream ", char *" buf );
+.BI "void setbuf(FILE *restrict " stream ", char *restrict " buf );
 .BI "void setbuffer(FILE *restrict " stream ", char *restrict " buf ,
 .BI "            size_t "  size );
 .BI "void setlinebuf(FILE *" stream );
-- 
2.30.1.721.g45526154a5


  parent reply	other threads:[~2021-03-10 18:32 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-10 18:31 [PATCH 00/24] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 5) Alejandro Colomar
2021-03-10 18:31 ` [PATCH 01/24] sem_getvalue.3: SYNOPSIS: Use 'restrict' in prototypes Alejandro Colomar
2021-03-10 18:31 ` [PATCH 02/24] sem_wait.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 03/24] setaliasent.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 04/24] setbuf.3: " Alejandro Colomar
2021-03-10 18:31 ` Alejandro Colomar [this message]
2021-03-10 18:31 ` [PATCH 06/24] setnetgrent.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 07/24] sigwait.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 08/24] statvfs.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 09/24] stpcpy.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 10/24] stpncpy.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 11/24] strcat.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 12/24] strcpy.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 13/24] strfmon.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 14/24] strftime.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 15/24] string.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 16/24] " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 17/24] strptime.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 18/24] strsep.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 19/24] strtod.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 20/24] strtoimax.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 21/24] strtok.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 22/24] strtol.3, strtoul.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 23/24] strxfrm.3: " Alejandro Colomar
2021-03-10 18:31 ` [PATCH 24/24] swab.3: " Alejandro Colomar
2021-03-14 20:51 ` [PATCH 00/24] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 5) Michael Kerrisk (man-pages)
2021-03-14 20:53   ` Michael Kerrisk (man-pages)
2021-03-19 21:08     ` Alejandro Colomar (man-pages)
2021-03-19 20:59   ` Alejandro Colomar (man-pages)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210310183149.194717-6-alx.manpages@gmail.com \
    --to=alx.manpages@gmail.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).