All of lore.kernel.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
Subject: [PATCH 14/20] fgetc.3: SYNOPSIS: Use 'restrict' in prototypes
Date: Wed, 24 Feb 2021 15:43:05 +0100	[thread overview]
Message-ID: <20210224144310.140649-15-alx.manpages@gmail.com> (raw)
In-Reply-To: <20210224144310.140649-1-alx.manpages@gmail.com>

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

glibc:
libio/stdio.h:568:
char *fgets (char *restrict s, int n, FILE *restrict stream)
     wur attr_access ((write_only__, 1, 2));

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man3/fgetc.3 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/man3/fgetc.3 b/man3/fgetc.3
index 5e0ded168..1aa419935 100644
--- a/man3/fgetc.3
+++ b/man3/fgetc.3
@@ -35,7 +35,7 @@ fgetc, fgets, getc, getchar, ungetc \- input of characters and strings
 .BI "int getc(FILE *" stream );
 .B "int getchar(void);"
 .PP
-.BI "char *fgets(char *" "s" ", int " "size" ", FILE *" "stream" );
+.BI "char *fgets(char *restrict " s ", int " size ", FILE *restrict " stream );
 .PP
 .BI "int ungetc(int " c ", FILE *" stream );
 .fi
-- 
2.30.1.721.g45526154a5


  parent reply	other threads:[~2021-02-24 15:44 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-24 14:42 [PATCH 00/20] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 1) Alejandro Colomar
2021-02-24 14:42 ` [PATCH 01/20] argz_add.3: SYNOPSIS: Use 'restrict' in prototypes Alejandro Colomar
2021-02-24 14:42 ` [PATCH 02/20] asprintf.3: " Alejandro Colomar
2021-02-24 14:42 ` [PATCH 03/20] memccpy.3: " Alejandro Colomar
2021-02-24 14:42 ` [PATCH 04/20] memcpy.3: " Alejandro Colomar
2021-02-24 14:42 ` [PATCH 05/20] crypt.3: " Alejandro Colomar
2021-02-24 14:42 ` [PATCH 06/20] ctime.3: " Alejandro Colomar
2021-02-24 14:42 ` [PATCH 07/20] " Alejandro Colomar
2021-02-24 14:42 ` [PATCH 08/20] dlinfo.3: " Alejandro Colomar
2021-02-24 14:43 ` [PATCH 09/20] dlsym.3: SYNOPSIS: Use 'restrict' in prototypes; add missing 'const' too Alejandro Colomar
2021-02-24 14:43 ` [PATCH 10/20] drand48_r.3: SYNOPSIS: Use 'restrict' in prototypes Alejandro Colomar
2021-02-24 14:43 ` [PATCH 11/20] ecvt_r.3: " Alejandro Colomar
2021-02-24 14:43 ` [PATCH 12/20] ecvt.3: " Alejandro Colomar
2021-02-24 14:43 ` [PATCH 13/20] envz_add.3: " Alejandro Colomar
2021-02-24 14:43 ` Alejandro Colomar [this message]
2021-02-24 14:43 ` [PATCH 15/20] fgetws.3: " Alejandro Colomar
2021-02-24 14:43 ` [PATCH 16/20] fopencookie.3: " Alejandro Colomar
2021-02-24 14:43 ` [PATCH 17/20] fopen.3: " Alejandro Colomar
2021-02-24 14:43 ` [PATCH 18/20] fputws.3: " Alejandro Colomar
2021-02-24 14:43 ` [PATCH 19/20] fread.3: " Alejandro Colomar
2021-02-24 14:43 ` [PATCH 20/20] fseek.3: " Alejandro Colomar
2021-03-03 22:14 ` [PATCH 00/20] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 1) Michael Kerrisk (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=20210224144310.140649-15-alx.manpages@gmail.com \
    --to=alx.manpages@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.