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, libc-alpha@sourceware.org
Subject: [PATCH 11/22] mbrtowc.3: SYNOPSIS: Use 'restrict' in prototypes
Date: Sat,  6 Mar 2021 00:50:55 +0100	[thread overview]
Message-ID: <20210305235105.177359-12-alx.manpages@gmail.com> (raw)
In-Reply-To: <20210305235105.177359-1-alx.manpages@gmail.com>

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

.../glibc$ grep_glibc_prototype mbrtowc
wcsmbs/wchar.h:296:
extern size_t mbrtowc (wchar_t *__restrict __pwc,
		       const char *__restrict __s, size_t __n,
		       mbstate_t *__restrict __p) __THROW;
.../glibc$

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

diff --git a/man3/mbrtowc.3 b/man3/mbrtowc.3
index c092b2d63..f3ea9d049 100644
--- a/man3/mbrtowc.3
+++ b/man3/mbrtowc.3
@@ -21,8 +21,9 @@ mbrtowc \- convert a multibyte sequence to a wide character
 .nf
 .B #include <wchar.h>
 .PP
-.BI "size_t mbrtowc(wchar_t *" pwc ", const char *" s ", size_t " n \
-", mbstate_t *" ps );
+.BI "size_t mbrtowc(wchar_t *restrict " pwc ", const char *restrict " s \
+", size_t " n ,
+.BI "               mbstate_t *restrict " ps );
 .fi
 .SH DESCRIPTION
 The main case for this function is when
-- 
2.30.1.721.g45526154a5


  parent reply	other threads:[~2021-03-05 23:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-05 23:50 [PATCH 00/22] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 3) Alejandro Colomar
2021-03-05 23:50 ` [PATCH 01/22] getservent_r.3: SYNOPSIS: Use 'restrict' in prototypes Alejandro Colomar
2021-03-05 23:50 ` [PATCH 02/22] getsubopt.3: " Alejandro Colomar
2021-03-05 23:50 ` [PATCH 03/22] glob.3: " Alejandro Colomar
2021-03-05 23:50 ` [PATCH 04/22] iconv.3: " Alejandro Colomar
2021-03-05 23:50 ` [PATCH 05/22] inet_ntop.3: " Alejandro Colomar
2021-03-05 23:50 ` [PATCH 06/22] inet_pton.3: " Alejandro Colomar
2021-03-05 23:50 ` [PATCH 07/22] lio_listio.3: " Alejandro Colomar
2021-03-05 23:50 ` [PATCH 08/22] makecontext.3: " Alejandro Colomar
2021-03-05 23:50 ` [PATCH 09/22] malloc_hook.3: SYNOPSIS: Use 'volatile' " Alejandro Colomar
2021-03-05 23:50 ` [PATCH 10/22] mbrlen.3: SYNOPSIS: Use 'restrict' " Alejandro Colomar
2021-03-05 23:50 ` Alejandro Colomar [this message]
2021-03-05 23:50 ` [PATCH 12/22] mbsnrtowcs.3: " Alejandro Colomar
2021-03-05 23:50 ` [PATCH 13/22] mbsrtowcs.3: " Alejandro Colomar
2021-03-05 23:50 ` [PATCH 14/22] mbstowcs.3: " Alejandro Colomar
2021-03-05 23:50 ` [PATCH 15/22] mbtowc.3: " Alejandro Colomar
2021-03-05 23:51 ` [PATCH 16/22] mempcpy.3: " Alejandro Colomar
2021-03-05 23:51 ` [PATCH 17/22] mq_getattr.3: " Alejandro Colomar
2021-03-05 23:51 ` [PATCH 18/22] mq_receive.3: " Alejandro Colomar
2021-03-05 23:51 ` [PATCH 19/22] posix_spawn.3: " Alejandro Colomar
2021-03-05 23:51 ` [PATCH 20/22] " Alejandro Colomar
2021-03-05 23:51 ` [PATCH 21/22] printf.3: SYNOPSIS: Use 'restrict' in prototypes; ffix too Alejandro Colomar
2021-03-05 23:51 ` [PATCH 22/22] pthread_attr_setguardsize.3: SYNOPSIS: Use 'restrict' in prototypes Alejandro Colomar
2021-03-07 10:20 ` [PATCH 00/22] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 3) 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=20210305235105.177359-12-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 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.