All of lore.kernel.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

* [PATCH 01/14] getaddrinfo.3: SYNOPSIS: Use 'restrict' in prototypes
  2021-02-28  0:48 [PATCH 00/14] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 2) Alejandro Colomar
@ 2021-02-28  0:48 ` Alejandro Colomar
  2021-02-28  0:48 ` [PATCH 02/14] getaddrinfo_a.3: " Alejandro Colomar
                   ` (13 subsequent siblings)
  14 siblings, 0 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

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

.../glibc$ grep_glibc_prototype getaddrinfo;
resolv/netdb.h:660:
extern int getaddrinfo (const char *__restrict __name,
			const char *__restrict __service,
			const struct addrinfo *__restrict __req,
			struct addrinfo **__restrict __pai);
.../glibc$

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

diff --git a/man3/getaddrinfo.3 b/man3/getaddrinfo.3
index db397bdf8..37710c277 100644
--- a/man3/getaddrinfo.3
+++ b/man3/getaddrinfo.3
@@ -51,13 +51,14 @@ service translation
 .B #include <sys/socket.h>
 .B #include <netdb.h>
 .PP
-.BI "int getaddrinfo(const char *" "node" ", const char *" "service" ,
-.BI "                const struct addrinfo *" "hints" ,
-.BI "                struct addrinfo **" "res" );
+.BI "int getaddrinfo(const char *restrict " node ,
+.BI "                const char *restrict " service ,
+.BI "                const struct addrinfo *restrict " hints ,
+.BI "                struct addrinfo **restrict " res );
 .PP
-.BI "void freeaddrinfo(struct addrinfo *" "res" );
+.BI "void freeaddrinfo(struct addrinfo *" res );
 .PP
-.BI "const char *gai_strerror(int " "errcode" );
+.BI "const char *gai_strerror(int " errcode );
 .fi
 .PP
 .RS -4
-- 
2.30.1.721.g45526154a5


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

* [PATCH 02/14] getaddrinfo_a.3: SYNOPSIS: Use 'restrict' in prototypes
  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 ` Alejandro Colomar
  2021-02-28  0:48 ` [PATCH 03/14] getdate.3: " Alejandro Colomar
                   ` (12 subsequent siblings)
  14 siblings, 0 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

glibc uses 'restrict' in getaddrinfo_a().
Let's use it here too.

.../glibc$ grep_glibc_prototype getaddrinfo_a
resolv/netdb.h:690:
extern int getaddrinfo_a (int __mode, struct gaicb *__list[__restrict_arr],
			  int __ent, struct sigevent *__restrict __sig);
.../glibc$

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

diff --git a/man3/getaddrinfo_a.3 b/man3/getaddrinfo_a.3
index 416904437..0ddb8a76d 100644
--- a/man3/getaddrinfo_a.3
+++ b/man3/getaddrinfo_a.3
@@ -36,13 +36,13 @@ network address and service translation
 .BR "#define _GNU_SOURCE" "         /* See feature_test_macros(7) */"
 .B #include <netdb.h>
 .PP
-.BI "int getaddrinfo_a(int " "mode" ", struct gaicb *" "list[]" ,
-.BI "                  int " "nitems" ", struct sigevent *" "sevp" );
-.BI "int gai_suspend(const struct gaicb * const " "list[]" ", int " "nitems" ,
-.BI "                  const struct timespec *" "timeout" );
+.BI "int getaddrinfo_a(int " mode ", struct gaicb *" list [restrict],
+.BI "                  int " nitems ", struct sigevent *restrict " sevp );
+.BI "int gai_suspend(const struct gaicb *const " list "[], int " nitems ,
+.BI "                  const struct timespec *" timeout );
 .PP
-.BI "int gai_error(struct gaicb *" "req" );
-.BI "int gai_cancel(struct gaicb *" "req" );
+.BI "int gai_error(struct gaicb *" req );
+.BI "int gai_cancel(struct gaicb *" req );
 .PP
 Link with \fI\-lanl\fP.
 .fi
-- 
2.30.1.721.g45526154a5


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

* [PATCH 03/14] getdate.3: SYNOPSIS: Use 'restrict' in prototypes
  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 ` Alejandro Colomar
  2021-02-28  0:48 ` [PATCH 04/14] getdirentries.3: " Alejandro Colomar
                   ` (11 subsequent siblings)
  14 siblings, 0 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

glibc uses 'restrict' in getdate_r().
Let's use it here too.

.../glibc$ grep_glibc_prototype getdate_r
time/time.h:297:
extern int getdate_r (const char *__restrict __string,
		      struct tm *__restrict __resbufp);
.../glibc$

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

diff --git a/man3/getdate.3 b/man3/getdate.3
index 1f8432303..5334b4bb6 100644
--- a/man3/getdate.3
+++ b/man3/getdate.3
@@ -40,7 +40,7 @@ getdate, getdate_r \- convert a date-plus-time string to broken-down time
 .PP
 .B "#include <time.h>"
 .PP
-.BI "int getdate_r(const char *" string ", struct tm *" res );
+.BI "int getdate_r(const char *restrict " string ", struct tm *restrict " res );
 .fi
 .PP
 .RS -4
-- 
2.30.1.721.g45526154a5


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

* [PATCH 04/14] getdirentries.3: SYNOPSIS: Use 'restrict' in prototypes
  2021-02-28  0:48 [PATCH 00/14] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 2) Alejandro Colomar
                   ` (2 preceding siblings ...)
  2021-02-28  0:48 ` [PATCH 03/14] getdate.3: " Alejandro Colomar
@ 2021-02-28  0:48 ` Alejandro Colomar
  2021-02-28  0:48 ` [PATCH 05/14] getgrent_r.3: " Alejandro Colomar
                   ` (10 subsequent siblings)
  14 siblings, 0 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

glibc uses 'restrict' in getdirentries().
Let's use it here too.

.../glibc$ grep_glibc_prototype getdirentries
dirent/dirent.h:353:
extern __ssize_t getdirentries (int __fd, char *__restrict __buf,
				size_t __nbytes,
				__off_t *__restrict __basep)
     __THROW __nonnull ((2, 4));
.../glibc$

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

diff --git a/man3/getdirentries.3 b/man3/getdirentries.3
index 0deff6371..9bba3cc4b 100644
--- a/man3/getdirentries.3
+++ b/man3/getdirentries.3
@@ -31,8 +31,8 @@ getdirentries \- get directory entries in a filesystem-independent format
 .nf
 .B #include <dirent.h>
 .PP
-.BI "ssize_t getdirentries(int " fd ", char *" buf ", size_t " nbytes ,
-.BI "                      off_t *" basep );
+.BI "ssize_t getdirentries(int " fd ", char *restrict " buf ", size_t " nbytes ,
+.BI "                      off_t *restrict " basep );
 .fi
 .PP
 .RS -4
-- 
2.30.1.721.g45526154a5


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

* [PATCH 05/14] getgrent_r.3: SYNOPSIS: Use 'restrict' in prototypes
  2021-02-28  0:48 [PATCH 00/14] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 2) Alejandro Colomar
                   ` (3 preceding siblings ...)
  2021-02-28  0:48 ` [PATCH 04/14] getdirentries.3: " Alejandro Colomar
@ 2021-02-28  0:48 ` Alejandro Colomar
  2021-02-28  0:48 ` [PATCH 06/14] getgrnam.3: " Alejandro Colomar
                   ` (9 subsequent siblings)
  14 siblings, 0 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

glibc uses 'restrict' in getgrent_r(), fgetgrent_r().
Let's use it here too.

.../glibc$ grep_glibc_prototype getgrent_r
grp/grp.h:131:
extern int getgrent_r (struct group *__restrict __resultbuf,
		       char *__restrict __buffer, size_t __buflen,
		       struct group **__restrict __result);
.../glibc$ grep_glibc_prototype fgetgrent_r
grp/grp.h:161:
extern int fgetgrent_r (FILE *__restrict __stream,
			struct group *__restrict __resultbuf,
			char *__restrict __buffer, size_t __buflen,
			struct group **__restrict __result);
.../glibc$

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

diff --git a/man3/getgrent_r.3 b/man3/getgrent_r.3
index 55d9d698f..29f063a0a 100644
--- a/man3/getgrent_r.3
+++ b/man3/getgrent_r.3
@@ -28,10 +28,12 @@ getgrent_r, fgetgrent_r \- get group file entry reentrantly
 .nf
 .B #include <grp.h>
 .PP
-.BI "int getgrent_r(struct group *" gbuf ", char *" buf ,
-.BI "               size_t " buflen ", struct group **" gbufp );
-.BI "int fgetgrent_r(FILE *" stream ", struct group *" gbuf ", char *" buf ,
-.BI "               size_t " buflen ", struct group **" gbufp );
+.BI "int getgrent_r(struct group *restrict " gbuf ,
+.BI "               char *restrict " buf ", size_t " buflen ,
+.BI "               struct group **restrict " gbufp );
+.BI "int fgetgrent_r(FILE *restrict " stream ", struct group *restrict " gbuf ,
+.BI "               char *restrict " buf ", size_t " buflen ,
+.BI "               struct group **restrict " gbufp );
 .fi
 .PP
 .RS -4
-- 
2.30.1.721.g45526154a5


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

* [PATCH 06/14] getgrnam.3: SYNOPSIS: Use 'restrict' in prototypes
  2021-02-28  0:48 [PATCH 00/14] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 2) Alejandro Colomar
                   ` (4 preceding siblings ...)
  2021-02-28  0:48 ` [PATCH 05/14] getgrent_r.3: " Alejandro Colomar
@ 2021-02-28  0:48 ` Alejandro Colomar
  2021-02-28  0:48 ` [PATCH 07/14] gethostbyname.3: " Alejandro Colomar
                   ` (8 subsequent siblings)
  14 siblings, 0 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, Ulrich Drepper

POSIX does NOT specify these functions to use 'restrict'.
However, glibc uses 'restrict' in getgrnam_r(), getgrgid_r().
Users might be surprised by this!  Let's use it here too!

.../glibc$ grep_glibc_prototype getgrnam_r
grp/grp.h:148:
extern int getgrnam_r (const char *__restrict __name,
		       struct group *__restrict __resultbuf,
		       char *__restrict __buffer, size_t __buflen,
		       struct group **__restrict __result);
.../glibc$ grep_glibc_prototype getgrgid_r
grp/grp.h:140:
extern int getgrgid_r (__gid_t __gid, struct group *__restrict __resultbuf,
		       char *__restrict __buffer, size_t __buflen,
		       struct group **__restrict __result);
.../glibc$

Cc: glibc <libc-alpha@sourceware.org>
Cc: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man3/getgrnam.3 | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/man3/getgrnam.3 b/man3/getgrnam.3
index 87f61c260..1b13208ba 100644
--- a/man3/getgrnam.3
+++ b/man3/getgrnam.3
@@ -41,10 +41,13 @@ getgrnam, getgrnam_r, getgrgid, getgrgid_r \- get group file entry
 .BI "struct group *getgrnam(const char *" name );
 .BI "struct group *getgrgid(gid_t " gid );
 .PP
-.BI "int getgrnam_r(const char *" name ", struct group *" grp ,
-.BI "          char *" buf ", size_t " buflen ", struct group **" result );
-.BI "int getgrgid_r(gid_t " gid ", struct group *" grp ,
-.BI "          char *" buf ", size_t " buflen ", struct group **" result );
+.BI "int getgrnam_r(const char *restrict " name \
+", struct group *restrict " grp ,
+.BI "               char *restrict " buf ", size_t " buflen ,
+.BI "               struct group **restrict " result );
+.BI "int getgrgid_r(gid_t " gid ", struct group *restrict " grp ,
+.BI "               char *restrict " buf ", size_t " buflen ,
+.BI "               struct group **restrict " result );
 .fi
 .PP
 .RS -4
-- 
2.30.1.721.g45526154a5


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

* [PATCH 07/14] gethostbyname.3: SYNOPSIS: Use 'restrict' in prototypes
  2021-02-28  0:48 [PATCH 00/14] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 2) Alejandro Colomar
                   ` (5 preceding siblings ...)
  2021-02-28  0:48 ` [PATCH 06/14] getgrnam.3: " Alejandro Colomar
@ 2021-02-28  0:48 ` Alejandro Colomar
  2021-02-28  0:48 ` [PATCH 08/14] getline.3: " Alejandro Colomar
                   ` (7 subsequent siblings)
  14 siblings, 0 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

glibc uses 'restrict' in gethostent_r(), gethostbyaddr_r(),
gethostbyname_r(), gethostbyname2_r().
Let's use it here too.

.../glibc$ grep_glibc_prototype gethostent_r
resolv/netdb.h:165:
extern int gethostent_r (struct hostent *__restrict __result_buf,
			 char *__restrict __buf, size_t __buflen,
			 struct hostent **__restrict __result,
			 int *__restrict __h_errnop);
.../glibc$ grep_glibc_prototype gethostbyaddr_r
resolv/netdb.h:170:
extern int gethostbyaddr_r (const void *__restrict __addr, __socklen_t __len,
			    int __type,
			    struct hostent *__restrict __result_buf,
			    char *__restrict __buf, size_t __buflen,
			    struct hostent **__restrict __result,
			    int *__restrict __h_errnop);
.../glibc$ grep_glibc_prototype gethostbyname_r
resolv/netdb.h:177:
extern int gethostbyname_r (const char *__restrict __name,
			    struct hostent *__restrict __result_buf,
			    char *__restrict __buf, size_t __buflen,
			    struct hostent **__restrict __result,
			    int *__restrict __h_errnop);
.../glibc$ grep_glibc_prototype gethostbyname2_r
resolv/netdb.h:183:
extern int gethostbyname2_r (const char *__restrict __name, int __af,
			     struct hostent *__restrict __result_buf,
			     char *__restrict __buf, size_t __buflen,
			     struct hostent **__restrict __result,
			     int *__restrict __h_errnop);
.../glibc$

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

diff --git a/man3/gethostbyname.3 b/man3/gethostbyname.3
index ac1758ca0..d2c456072 100644
--- a/man3/gethostbyname.3
+++ b/man3/gethostbyname.3
@@ -65,18 +65,27 @@ gethostent_r \- get network host entry
 /* GNU extensions */
 .BI "struct hostent *gethostbyname2(const char *" name ", int " af );
 .PP
-.BI "int gethostent_r(struct hostent *" ret ", char *" buf ", size_t " buflen ,
-.BI "                 struct hostent **" result ", int *" h_errnop );
+.BI "int gethostent_r(struct hostent *restrict " ret ,
+.BI "                 char *restrict " buf ", size_t " buflen ,
+.BI "                 struct hostent **restrict " result ,
+.BI "                 int *restrict " h_errnop );
 .PP
-.BI "int gethostbyaddr_r(const void *" addr ", socklen_t " len ", int " type ,
-.BI "                 struct hostent *" ret ", char *" buf ", size_t " buflen ,
-.BI "                 struct hostent **" result ", int *" h_errnop );
-.BI "int gethostbyname_r(const char *" name ,
-.BI "                 struct hostent *" ret ", char *" buf ", size_t " buflen ,
-.BI "                 struct hostent **" result ", int *" h_errnop );
-.BI "int gethostbyname2_r(const char *" name ", int " af,
-.BI "                 struct hostent *" ret ", char *" buf ", size_t " buflen ,
-.BI "                 struct hostent **" result ", int *" h_errnop );
+.BI "int gethostbyaddr_r(const void *restrict " addr ", socklen_t " len \
+", int " type ,
+.BI "                 struct hostent *restrict " ret ,
+.BI "                 char *restrict " buf ", size_t " buflen ,
+.BI "                 struct hostent **restrict " result ,
+.BI "                 int *restrict " h_errnop );
+.BI "int gethostbyname_r(const char *restrict " name ,
+.BI "                 struct hostent *restrict " ret ,
+.BI "                 char *restrict " buf ", size_t " buflen ,
+.BI "                 struct hostent **restrict " result ,
+.BI "                 int *restrict " h_errnop );
+.BI "int gethostbyname2_r(const char *restrict " name ", int " af,
+.BI "                 struct hostent *restrict " ret ,
+.BI "                 char *restrict " buf ", size_t " buflen ,
+.BI "                 struct hostent **restrict " result ,
+.BI "                 int *restrict " h_errnop );
 .fi
 .PP
 .RS -4
-- 
2.30.1.721.g45526154a5


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

* [PATCH 08/14] getline.3: SYNOPSIS: Use 'restrict' in prototypes
  2021-02-28  0:48 [PATCH 00/14] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 2) Alejandro Colomar
                   ` (6 preceding siblings ...)
  2021-02-28  0:48 ` [PATCH 07/14] gethostbyname.3: " Alejandro Colomar
@ 2021-02-28  0:48 ` Alejandro Colomar
  2021-02-28  0:48 ` [PATCH 09/14] getmntent.3: " Alejandro Colomar
                   ` (6 subsequent siblings)
  14 siblings, 0 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

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

.../glibc$ grep_glibc_prototype getline
libio/stdio.h:621:
extern __ssize_t getline (char **__restrict __lineptr,
                          size_t *__restrict __n,
                          FILE *__restrict __stream) __wur;
.../glibc$ grep_glibc_prototype getdelim
libio/stdio.h:611:
extern __ssize_t getdelim (char **__restrict __lineptr,
                           size_t *__restrict __n, int __delimiter,
                           FILE *__restrict __stream) __wur;
.../glibc$

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

diff --git a/man3/getline.3 b/man3/getline.3
index 25930dbf9..182a8ca85 100644
--- a/man3/getline.3
+++ b/man3/getline.3
@@ -30,9 +30,10 @@ getline, getdelim \- delimited string input
 .nf
 .B #include <stdio.h>
 .PP
-.BI "ssize_t getline(char **" lineptr ", size_t *" n ", FILE *" stream );
-.BI "ssize_t getdelim(char **" lineptr ", size_t *" n ", int " delim \
-", FILE *" stream );
+.BI "ssize_t getline(char **restrict " lineptr ", size_t *restrict " n ,
+.BI "                FILE *restrict " stream );
+.BI "ssize_t getdelim(char **restrict " lineptr ", size_t *restrict " n ,
+.BI "                int " delim ", FILE *restrict " stream );
 .fi
 .PP
 .RS -4
-- 
2.30.1.721.g45526154a5


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

* [PATCH 09/14] getmntent.3: SYNOPSIS: Use 'restrict' in prototypes
  2021-02-28  0:48 [PATCH 00/14] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 2) Alejandro Colomar
                   ` (7 preceding siblings ...)
  2021-02-28  0:48 ` [PATCH 08/14] getline.3: " Alejandro Colomar
@ 2021-02-28  0:48 ` Alejandro Colomar
  2021-02-28  0:48 ` [PATCH 10/14] getnameinfo.3: " Alejandro Colomar
                   ` (5 subsequent siblings)
  14 siblings, 0 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

glibc uses 'restrict' in addmntent(), getmntent_r().
Let's use it here too.

.../glibc$ grep_glibc_prototype addmntent
misc/mntent.h:81:
extern int addmntent (FILE *__restrict __stream,
		      const struct mntent *__restrict __mnt) __THROW;
.../glibc$ grep_glibc_prototype getmntent_r
misc/mntent.h:73:
extern struct mntent *getmntent_r (FILE *__restrict __stream,
				   struct mntent *__restrict __result,
				   char *__restrict __buffer,
				   int __bufsize) __THROW;
.../glibc$

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

diff --git a/man3/getmntent.3 b/man3/getmntent.3
index 7f83ed248..96e642d18 100644
--- a/man3/getmntent.3
+++ b/man3/getmntent.3
@@ -42,7 +42,8 @@ getmntent_r \- get filesystem descriptor file entry
 .PP
 .BI "struct mntent *getmntent(FILE *" stream );
 .PP
-.BI "int addmntent(FILE *" stream ", const struct mntent *" mnt );
+.BI "int addmntent(FILE *restrict " stream ,
+.BI "              const struct mntent *restrict " mnt );
 .PP
 .BI "int endmntent(FILE *" streamp );
 .PP
@@ -51,8 +52,9 @@ getmntent_r \- get filesystem descriptor file entry
 /* GNU extension */
 .B #include <mntent.h>
 .PP
-.BI "struct mntent *getmntent_r(FILE *" streamp ", struct mntent *" mntbuf ,
-.BI "                           char *" buf ", int " buflen );
+.BI "struct mntent *getmntent_r(FILE *restrict " streamp ,
+.BI "              struct mntent *restrict " mntbuf ,
+.BI "              char *restrict " buf ", int " buflen );
 .fi
 .PP
 .RS -4
-- 
2.30.1.721.g45526154a5


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

* [PATCH 10/14] getnameinfo.3: SYNOPSIS: Use 'restrict' in prototypes
  2021-02-28  0:48 [PATCH 00/14] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 2) Alejandro Colomar
                   ` (8 preceding siblings ...)
  2021-02-28  0:48 ` [PATCH 09/14] getmntent.3: " Alejandro Colomar
@ 2021-02-28  0:48 ` Alejandro Colomar
  2021-02-28  0:48 ` [PATCH 11/14] getnetent_r.3: " Alejandro Colomar
                   ` (4 subsequent siblings)
  14 siblings, 0 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, G . Branden Robinson

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

I conciously did an exception with respect to the right margin
of the rendered page.  Instead of having the right margin at 78
as usual (per Branden's recommendation), I let it use col 79
this time, to avoid breaking the prototype in an ugly way.

.../glibc$ grep_glibc_prototype getnameinfo
resolv/netdb.h:675:
extern int getnameinfo (const struct sockaddr *__restrict __sa,
			socklen_t __salen, char *__restrict __host,
			socklen_t __hostlen, char *__restrict __serv,
			socklen_t __servlen, int __flags);
.../glibc$

Cc: G. Branden Robinson <g.branden.robinson@gmail.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man3/getnameinfo.3 | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/man3/getnameinfo.3 b/man3/getnameinfo.3
index eff8b2562..d4d3f42e5 100644
--- a/man3/getnameinfo.3
+++ b/man3/getnameinfo.3
@@ -15,9 +15,11 @@ getnameinfo \- address-to-name translation in protocol-independent manner
 .B #include <sys/socket.h>
 .B #include <netdb.h>
 .PP
-.BI "int getnameinfo(const struct sockaddr *" "addr" ", socklen_t " "addrlen" ,
-.BI "                char *" "host" ", socklen_t " "hostlen" ,
-.BI "                char *" "serv" ", socklen_t " "servlen" ", int " "flags" );
+.BI "int getnameinfo(const struct sockaddr *restrict " addr \
+", socklen_t " addrlen ,
+.BI "                char *restrict " host ", socklen_t " hostlen ,
+.BI "                char *restrict " serv ", socklen_t " servlen \
+", int " flags );
 .fi
 .PP
 .RS -4
-- 
2.30.1.721.g45526154a5


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

* [PATCH 11/14] getnetent_r.3: SYNOPSIS: Use 'restrict' in prototypes
  2021-02-28  0:48 [PATCH 00/14] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 2) Alejandro Colomar
                   ` (9 preceding siblings ...)
  2021-02-28  0:48 ` [PATCH 10/14] getnameinfo.3: " Alejandro Colomar
@ 2021-02-28  0:48 ` Alejandro Colomar
  2021-02-28  0:48 ` [PATCH 12/14] getprotoent_r.3: " Alejandro Colomar
                   ` (3 subsequent siblings)
  14 siblings, 0 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

glibc uses 'restrict' in getnetent_r(), getnetbyname_r(),
getnetbyaddr_r().
Let's use it here too.

.../glibc$ grep_glibc_prototype getnetent_r
resolv/netdb.h:235:
extern int getnetent_r (struct netent *__restrict __result_buf,
			char *__restrict __buf, size_t __buflen,
			struct netent **__restrict __result,
			int *__restrict __h_errnop);
.../glibc$ grep_glibc_prototype getnetbyname_r
resolv/netdb.h:246:
extern int getnetbyname_r (const char *__restrict __name,
			   struct netent *__restrict __result_buf,
			   char *__restrict __buf, size_t __buflen,
			   struct netent **__restrict __result,
			   int *__restrict __h_errnop);
.../glibc$ grep_glibc_prototype getnetbyaddr_r
resolv/netdb.h:240:
extern int getnetbyaddr_r (uint32_t __net, int __type,
			   struct netent *__restrict __result_buf,
			   char *__restrict __buf, size_t __buflen,
			   struct netent **__restrict __result,
			   int *__restrict __h_errnop);
.../glibc$

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

diff --git a/man3/getnetent_r.3 b/man3/getnetent_r.3
index 679391cd0..b94a67ba5 100644
--- a/man3/getnetent_r.3
+++ b/man3/getnetent_r.3
@@ -31,17 +31,20 @@ network entry (reentrant)
 .nf
 .B #include <netdb.h>
 .PP
-.BI "int getnetent_r(struct netent *" result_buf ", char *" buf ,
-.BI "                size_t " buflen ", struct netent **" result ,
-.BI "                int *" h_errnop );
-.BI "int getnetbyname_r(const char *" name ,
-.BI "                struct netent *" result_buf ", char *" buf ,
-.BI "                size_t " buflen ", struct netent **" result ,
-.BI "                int *" h_errnop );
+.BI "int getnetent_r(struct netent *restrict " result_buf ,
+.BI "                char *restrict " buf ", size_t " buflen ,
+.BI "                struct netent **restrict " result ,
+.BI "                int *restrict " h_errnop );
+.BI "int getnetbyname_r(const char *restrict " name ,
+.BI "                struct netent *restrict " result_buf ,
+.BI "                char *restrict " buf ", size_t " buflen ,
+.BI "                struct netent **restrict " result ,
+.BI "                int *restrict " h_errnop );
 .BI "int getnetbyaddr_r(uint32_t " net ", int " type ,
-.BI "                struct netent *" result_buf ", char *" buf ,
-.BI "                size_t " buflen ", struct netent **" result ,
-.BI "                int *" h_errnop );
+.BI "                struct netent *restrict " result_buf ,
+.BI "                char *restrict " buf ", size_t " buflen ,
+.BI "                struct netent **restrict " result ,
+.BI "                int *restrict " h_errnop );
 .PP
 .fi
 .RS -4
-- 
2.30.1.721.g45526154a5


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

* [PATCH 12/14] getprotoent_r.3: SYNOPSIS: Use 'restrict' in prototypes
  2021-02-28  0:48 [PATCH 00/14] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 2) Alejandro Colomar
                   ` (10 preceding siblings ...)
  2021-02-28  0:48 ` [PATCH 11/14] getnetent_r.3: " Alejandro Colomar
@ 2021-02-28  0:48 ` Alejandro Colomar
  2021-02-28  0:48 ` [PATCH 13/14] getpwent_r.3: " Alejandro Colomar
                   ` (2 subsequent siblings)
  14 siblings, 0 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

glibc uses 'restrict' in getprotoent_r(), getprotobyname_r(),
getprotobynumber_r().
Let's use it here too.

.../glibc$ grep_glibc_prototype getprotoent_r
resolv/netdb.h:372:
extern int getprotoent_r (struct protoent *__restrict __result_buf,
			  char *__restrict __buf, size_t __buflen,
			  struct protoent **__restrict __result);
.../glibc$ grep_glibc_prototype getprotobyname_r
resolv/netdb.h:376:
extern int getprotobyname_r (const char *__restrict __name,
			     struct protoent *__restrict __result_buf,
			     char *__restrict __buf, size_t __buflen,
			     struct protoent **__restrict __result);
.../glibc$ grep_glibc_prototype getprotobynumber_r
resolv/netdb.h:381:
extern int getprotobynumber_r (int __proto,
			       struct protoent *__restrict __result_buf,
			       char *__restrict __buf, size_t __buflen,
			       struct protoent **__restrict __result);
.../glibc$

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

diff --git a/man3/getprotoent_r.3 b/man3/getprotoent_r.3
index 55e37d0c9..651ec00c2 100644
--- a/man3/getprotoent_r.3
+++ b/man3/getprotoent_r.3
@@ -31,14 +31,17 @@ protocol entry (reentrant)
 .nf
 .B #include <netdb.h>
 .PP
-.BI "int getprotoent_r(struct protoent *" result_buf ", char *" buf ,
-.BI "                size_t " buflen ", struct protoent **" result );
-.BI "int getprotobyname_r(const char *" name ,
-.BI "                struct protoent *" result_buf ", char *" buf ,
-.BI "                size_t " buflen ", struct protoent **" result );
+.BI "int getprotoent_r(struct protoent *restrict " result_buf ,
+.BI "                  char *restrict " buf ", size_t " buflen ,
+.BI "                  struct protoent **restrict " result );
+.BI "int getprotobyname_r(const char *restrict " name ,
+.BI "                  struct protoent *restrict " result_buf ,
+.BI "                  char *restrict " buf ", size_t " buflen ,
+.BI "                  struct protoent **restrict " result );
 .BI "int getprotobynumber_r(int " proto ,
-.BI "                struct protoent *" result_buf ", char *" buf ,
-.BI "                size_t " buflen ", struct protoent **" result );
+.BI "                  struct protoent *restrict " result_buf ,
+.BI "                  char *restrict " buf ", size_t " buflen ,
+.BI "                  struct protoent **restrict " result );
 .PP
 .fi
 .RS -4
-- 
2.30.1.721.g45526154a5


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

* [PATCH 13/14] getpwent_r.3: SYNOPSIS: Use 'restrict' in prototypes
  2021-02-28  0:48 [PATCH 00/14] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 2) Alejandro Colomar
                   ` (11 preceding siblings ...)
  2021-02-28  0:48 ` [PATCH 12/14] getprotoent_r.3: " Alejandro Colomar
@ 2021-02-28  0:48 ` 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)
  14 siblings, 0 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

glibc uses 'restrict' in getpwent_r(), fgetpwent_r().
Let's use it here too.

.../glibc$ grep_glibc_prototype getpwent_r
pwd/pwd.h:139:
extern int getpwent_r (struct passwd *__restrict __resultbuf,
		       char *__restrict __buffer, size_t __buflen,
		       struct passwd **__restrict __result)
		       __nonnull ((1, 2, 4));
.../glibc$ grep_glibc_prototype fgetpwent_r
pwd/pwd.h:166:
extern int fgetpwent_r (FILE *__restrict __stream,
			struct passwd *__restrict __resultbuf,
			char *__restrict __buffer, size_t __buflen,
			struct passwd **__restrict __result)
			__nonnull ((1, 2, 3, 5));
.../glibc$

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

diff --git a/man3/getpwent_r.3 b/man3/getpwent_r.3
index 3414b31a8..b2c7e420a 100644
--- a/man3/getpwent_r.3
+++ b/man3/getpwent_r.3
@@ -28,10 +28,13 @@ getpwent_r, fgetpwent_r \- get passwd file entry reentrantly
 .nf
 .B #include <pwd.h>
 .PP
-.BI "int getpwent_r(struct passwd *" pwbuf ", char *" buf ,
-.BI "               size_t " buflen ", struct passwd **" pwbufp );
-.BI "int fgetpwent_r(FILE *" stream ", struct passwd *" pwbuf ", char *" buf ,
-.BI "                size_t " buflen ", struct passwd **" pwbufp );
+.BI "int getpwent_r(struct passwd *restrict " pwbuf ,
+.BI "               char *restrict " buf ", size_t " buflen ,
+.BI "               struct passwd **restrict " pwbufp );
+.BI "int fgetpwent_r(FILE *restrict " stream \
+", struct passwd *restrict " pwbuf ,
+.BI "               char *restrict " buf ", size_t " buflen ,
+.BI "               struct passwd **restrict " pwbufp );
 .fi
 .PP
 .RS -4
-- 
2.30.1.721.g45526154a5


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

* [PATCH 14/14] getpwnam.3: SYNOPSIS: Use 'restrict' in prototypes
  2021-02-28  0:48 [PATCH 00/14] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 2) Alejandro Colomar
                   ` (12 preceding siblings ...)
  2021-02-28  0:48 ` [PATCH 13/14] getpwent_r.3: " Alejandro Colomar
@ 2021-02-28  0:48 ` Alejandro Colomar
  2021-03-03 22:25 ` [PATCH 00/14] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 2) Michael Kerrisk (man-pages)
  14 siblings, 0 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, Ulrich Drepper

POSIX does NOT specify these functions to use 'restrict'.
However, glibc uses 'restrict' in getpwnam_r(), getpwuid_r().
Let's use it here too.

.../glibc$ grep_glibc_prototype getpwnam_r
pwd/pwd.h:151:
extern int getpwnam_r (const char *__restrict __name,
		       struct passwd *__restrict __resultbuf,
		       char *__restrict __buffer, size_t __buflen,
		       struct passwd **__restrict __result)
		       __nonnull ((1, 2, 3, 5));
.../glibc$ grep_glibc_prototype getpwuid_r
pwd/pwd.h:145:
extern int getpwuid_r (__uid_t __uid,
		       struct passwd *__restrict __resultbuf,
		       char *__restrict __buffer, size_t __buflen,
		       struct passwd **__restrict __result)
		       __nonnull ((2, 3, 5));
.../glibc$

Cc: glibc <libc-alpha@sourceware.org>
Cc: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man3/getpwnam.3 | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/man3/getpwnam.3 b/man3/getpwnam.3
index 45fde871d..1eed77c45 100644
--- a/man3/getpwnam.3
+++ b/man3/getpwnam.3
@@ -45,10 +45,13 @@ getpwnam, getpwnam_r, getpwuid, getpwuid_r \- get password file entry
 .BI "struct passwd *getpwnam(const char *" name );
 .BI "struct passwd *getpwuid(uid_t " uid );
 .PP
-.BI "int getpwnam_r(const char *" name ", struct passwd *" pwd ,
-.BI "               char *" buf ", size_t " buflen ", struct passwd **" result );
-.BI "int getpwuid_r(uid_t " uid ", struct passwd *" pwd ,
-.BI "               char *" buf ", size_t " buflen ", struct passwd **" result );
+.BI "int getpwnam_r(const char *restrict " name \
+", struct passwd *restrict " pwd ,
+.BI "               char *restrict " buf ", size_t " buflen ,
+.BI "               struct passwd **restrict " result );
+.BI "int getpwuid_r(uid_t " uid ", struct passwd *restrict " pwd ,
+.BI "               char *restrict " buf ", size_t " buflen ,
+.BI "               struct passwd **restrict " result );
 .fi
 .PP
 .RS -4
-- 
2.30.1.721.g45526154a5


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

* Re: [PATCH 00/14] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 2)
  2021-02-28  0:48 [PATCH 00/14] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 2) Alejandro Colomar
                   ` (13 preceding siblings ...)
  2021-02-28  0:48 ` [PATCH 14/14] getpwnam.3: " Alejandro Colomar
@ 2021-03-03 22:25 ` Michael Kerrisk (man-pages)
  14 siblings, 0 replies; 16+ messages in thread
From: Michael Kerrisk (man-pages) @ 2021-03-03 22:25 UTC (permalink / raw)
  To: Alejandro Colomar
  Cc: mtk.manpages, linux-man, libc-alpha, Heinrich Schuchardt

Hi Alex,

On 2/28/21 1:48 AM, Alejandro Colomar wrote:
> Hey Michael,
> 
> This is the second batch of pages in man3 that use 'restrict'.
> 
> I have already checked until getrpcport.3.

Thanks for doing all of this work!

I've applied all of these patches.

Cheers,

Michael

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


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

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

end of thread, other threads:[~2021-03-04  0:32 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 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.