Skip to content

man3: SYNOPSIS: Use 'restrict' in prototypes (batch 2)

Alejandro Colomar linux-man 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14getaddrinfo.3: SYNOPSIS: Use 'restrict' in prototypesman3/getaddrinfo.3+6 -50 replies
2/14getaddrinfo_a.3: SYNOPSIS: Use 'restrict' in prototypesman3/getaddrinfo_a.3+6 -60 replies
3/14getdate.3: SYNOPSIS: Use 'restrict' in prototypesman3/getdate.3+1 -10 replies
4/14getdirentries.3: SYNOPSIS: Use 'restrict' in prototypesman3/getdirentries.3+2 -20 replies
5/14getgrent_r.3: SYNOPSIS: Use 'restrict' in prototypesman3/getgrent_r.3+6 -40 replies
6/14getgrnam.3: SYNOPSIS: Use 'restrict' in prototypesman3/getgrnam.3+7 -40 replies
7/14gethostbyname.3: SYNOPSIS: Use 'restrict' in prototypesman3/gethostbyname.3+20 -110 replies
8/14getline.3: SYNOPSIS: Use 'restrict' in prototypesman3/getline.3+4 -30 replies
9/14getmntent.3: SYNOPSIS: Use 'restrict' in prototypesman3/getmntent.3+5 -30 replies
10/14getnameinfo.3: SYNOPSIS: Use 'restrict' in prototypesman3/getnameinfo.3+5 -30 replies
11/14getnetent_r.3: SYNOPSIS: Use 'restrict' in prototypesman3/getnetent_r.3+13 -100 replies
12/14getprotoent_r.3: SYNOPSIS: Use 'restrict' in prototypesman3/getprotoent_r.3+10 -70 replies
13/14getpwent_r.3: SYNOPSIS: Use 'restrict' in prototypesman3/getpwent_r.3+7 -40 replies
14/14getpwnam.3: SYNOPSIS: Use 'restrict' in prototypesman3/getpwnam.3+7 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/14] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 2)

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(-)
Signature · 1 line
2.30.1.721.g45526154a5