public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 00/14] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 2)
@ 2021-02-28  0:48 Alejandro Colomar
  2021-02-28  0:48 ` [PATCH 01/14] getaddrinfo.3: SYNOPSIS: Use 'restrict' in prototypes Alejandro Colomar
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: Alejandro Colomar @ 2021-02-28  0:48 UTC (permalink / raw)
  To: mtk.manpages
  Cc: Alejandro Colomar, linux-man, libc-alpha, Heinrich Schuchardt

Hey Michael,

This is the second batch of pages in man3 that use 'restrict'.

I have already checked until getrpcport.3.

---

A few functions to automate the commit messages:

For functions that are restrict in POSIX and glibc:

function gitcommit_rp()
{
	local commafuncs="$(echo $@ |sed -e 's/\> \</(), /g' -e 's/$/()/')";
	local msg="\
$(man_gitstaged): SYNOPSIS: Use 'restrict' in prototypes

Both POSIX and glibc use 'restrict' in ${commafuncs}.
Let's use it here too.

$(echo "$@" \
  |xargs -n1 bash -c \
    'echo ".../glibc$ grep_glibc_prototype $@"; \
     echo "$(cd ~/src/gnu/glibc && grep_glibc_prototype $@)"' _)
.../glibc$";

	git commit -sm "$msg";
}

For functions that are restrict in glibc:

function gitcommit_rg()
{
	local commafuncs="$(echo $@ |sed -e 's/\> \</(), /g' -e 's/$/()/')";
	local msg="\
$(man_gitstaged): SYNOPSIS: Use 'restrict' in prototypes

glibc uses 'restrict' in ${commafuncs}.
Let's use it here too.

$(echo "$@" \
  |xargs -n1 bash -c \
    'echo ".../glibc$ grep_glibc_prototype $@"; \
     echo "$(cd ~/src/gnu/glibc && grep_glibc_prototype $@)"' _)
.../glibc$";

	git commit -sm "$msg";
}

---
Alejandro Colomar (14):
  getaddrinfo.3: SYNOPSIS: Use 'restrict' in prototypes
  getaddrinfo_a.3: SYNOPSIS: Use 'restrict' in prototypes
  getdate.3: SYNOPSIS: Use 'restrict' in prototypes
  getdirentries.3: SYNOPSIS: Use 'restrict' in prototypes
  getgrent_r.3: SYNOPSIS: Use 'restrict' in prototypes
  getgrnam.3: SYNOPSIS: Use 'restrict' in prototypes
  gethostbyname.3: SYNOPSIS: Use 'restrict' in prototypes
  getline.3: SYNOPSIS: Use 'restrict' in prototypes
  getmntent.3: SYNOPSIS: Use 'restrict' in prototypes
  getnameinfo.3: SYNOPSIS: Use 'restrict' in prototypes
  getnetent_r.3: SYNOPSIS: Use 'restrict' in prototypes
  getprotoent_r.3: SYNOPSIS: Use 'restrict' in prototypes
  getpwent_r.3: SYNOPSIS: Use 'restrict' in prototypes
  getpwnam.3: SYNOPSIS: Use 'restrict' in prototypes

 man3/getaddrinfo.3   | 11 ++++++-----
 man3/getaddrinfo_a.3 | 12 ++++++------
 man3/getdate.3       |  2 +-
 man3/getdirentries.3 |  4 ++--
 man3/getgrent_r.3    | 10 ++++++----
 man3/getgrnam.3      | 11 +++++++----
 man3/gethostbyname.3 | 31 ++++++++++++++++++++-----------
 man3/getline.3       |  7 ++++---
 man3/getmntent.3     |  8 +++++---
 man3/getnameinfo.3   |  8 +++++---
 man3/getnetent_r.3   | 23 +++++++++++++----------
 man3/getprotoent_r.3 | 17 ++++++++++-------
 man3/getpwent_r.3    | 11 +++++++----
 man3/getpwnam.3      | 11 +++++++----
 14 files changed, 99 insertions(+), 67 deletions(-)

-- 
2.30.1.721.g45526154a5


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2021-03-03 22:25 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-28  0:48 [PATCH 00/14] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 2) Alejandro Colomar
2021-02-28  0:48 ` [PATCH 01/14] getaddrinfo.3: SYNOPSIS: Use 'restrict' in prototypes Alejandro Colomar
2021-02-28  0:48 ` [PATCH 02/14] getaddrinfo_a.3: " Alejandro Colomar
2021-02-28  0:48 ` [PATCH 03/14] getdate.3: " Alejandro Colomar
2021-02-28  0:48 ` [PATCH 04/14] getdirentries.3: " Alejandro Colomar
2021-02-28  0:48 ` [PATCH 05/14] getgrent_r.3: " Alejandro Colomar
2021-02-28  0:48 ` [PATCH 06/14] getgrnam.3: " Alejandro Colomar
2021-02-28  0:48 ` [PATCH 07/14] gethostbyname.3: " Alejandro Colomar
2021-02-28  0:48 ` [PATCH 08/14] getline.3: " Alejandro Colomar
2021-02-28  0:48 ` [PATCH 09/14] getmntent.3: " Alejandro Colomar
2021-02-28  0:48 ` [PATCH 10/14] getnameinfo.3: " Alejandro Colomar
2021-02-28  0:48 ` [PATCH 11/14] getnetent_r.3: " Alejandro Colomar
2021-02-28  0:48 ` [PATCH 12/14] getprotoent_r.3: " Alejandro Colomar
2021-02-28  0:48 ` [PATCH 13/14] getpwent_r.3: " Alejandro Colomar
2021-02-28  0:48 ` [PATCH 14/14] getpwnam.3: " Alejandro Colomar
2021-03-03 22:25 ` [PATCH 00/14] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 2) Michael Kerrisk (man-pages)

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).