Skip to content

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

Alejandro Colomar linux-man 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest20 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/20argz_add.3: SYNOPSIS: Use 'restrict' in prototypesman3/argz_add.3+23 -180 replies
2/20asprintf.3: SYNOPSIS: Use 'restrict' in prototypesman3/asprintf.3+3 -20 replies
3/20memccpy.3: SYNOPSIS: Use 'restrict' in prototypesman3/memccpy.3+2 -10 replies
4/20memcpy.3: SYNOPSIS: Use 'restrict' in prototypesman3/memcpy.3+2 -10 replies
5/20crypt.3: SYNOPSIS: Use 'restrict' in prototypesman3/crypt.3+1 -10 replies
6/20ctime.3: SYNOPSIS: Use 'restrict' in prototypesman3/ctime.3+5 -30 replies
7/20ctime.3: SYNOPSIS: Use 'restrict' in prototypesman3/ctime.3+7 -10 replies
8/20dlinfo.3: SYNOPSIS: Use 'restrict' in prototypesman3/dlinfo.3+2 -10 replies
9/20dlsym.3: SYNOPSIS: Use 'restrict' in prototypes; add missing 'const' tooman3/dlsym.3+3 -20 replies
10/20drand48_r.3: SYNOPSIS: Use 'restrict' in prototypesman3/drand48_r.3+14 -80 replies
11/20ecvt_r.3: SYNOPSIS: Use 'restrict' in prototypesman3/ecvt_r.3+10 -80 replies
12/20ecvt.3: SYNOPSIS: Use 'restrict' in prototypesman3/ecvt.3+4 -20 replies
13/20envz_add.3: SYNOPSIS: Use 'restrict' in prototypesman3/envz_add.3+13 -120 replies
14/20fgetc.3: SYNOPSIS: Use 'restrict' in prototypesman3/fgetc.3+1 -10 replies
15/20fgetws.3: SYNOPSIS: Use 'restrict' in prototypesman3/fgetws.3+2 -10 replies
16/20fopencookie.3: SYNOPSIS: Use 'restrict' in prototypesman3/fopencookie.3+1 -10 replies
17/20fopen.3: SYNOPSIS: Use 'restrict' in prototypesman3/fopen.3+5 -20 replies
18/20fputws.3: SYNOPSIS: Use 'restrict' in prototypesman3/fputws.3+1 -10 replies
19/20fread.3: SYNOPSIS: Use 'restrict' in prototypesman3/fread.3+5 -40 replies
20/20fseek.3: SYNOPSIS: Use 'restrict' in prototypesman3/fseek.3+1 -10 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/20] man3: SYNOPSIS: Use 'restrict' in prototypes (batch 1)

Hi Michael,

This are the first pages of man3 with 'restrict'.
I'm sending you these already, becuase otherwise I'd accumulate too many patches in the end.

I have fixed from the first page until ftw.3.

Spin off:
I found different terms for parameters that refer to a same thing in different functions (usually a '[const] char *'):
- filename
- file
- path
- pathname
- Maybe others; I don't know

For 'FILE *' we have more or less the same, although this one is much more standard (>90% use 'stream'):
- stream
- streamp
- s
- fp
- file
- filehandle
- A few others in specific cases

What would you do about it?

Thanks,

Alex

---

I'll copy here the commands again to find them easily next time.

For reading the man_pages SYNOPSIS:

.../linux/man-pages$ man_section man2 SYNOPSIS |less;

For reading the glibc prototypes:

.../gnu/glibc$ man_lsfunc ../../linux/man-pages/man2 \
|while read -r syscall; do

          echo "=============================  ${syscall}";
          grep_glibc_prototype ${syscall};

done \
|sed -e 's/\bextern //' -e 's/\b_*//g' \
|less;

---
Alejandro Colomar (20):
argz_add.3: SYNOPSIS: Use 'restrict' in prototypes asprintf.3: SYNOPSIS: Use 'restrict' in prototypes memccpy.3: SYNOPSIS: Use 'restrict' in prototypes memcpy.3: SYNOPSIS: Use 'restrict' in prototypes
crypt.3: SYNOPSIS: Use 'restrict' in prototypes
ctime.3: SYNOPSIS: Use 'restrict' in prototypes
ctime.3: SYNOPSIS: Use 'restrict' in prototypes
dlinfo.3: SYNOPSIS: Use 'restrict' in prototypes
dlsym.3: SYNOPSIS: Use 'restrict' in prototypes; add missing 'const'
too
drand48_r.3: SYNOPSIS: Use 'restrict' in prototypes ecvt_r.3: SYNOPSIS: Use 'restrict' in prototypes
ecvt.3: SYNOPSIS: Use 'restrict' in prototypes envz_add.3: SYNOPSIS: Use 'restrict' in prototypes fgetc.3: SYNOPSIS: Use 'restrict' in prototypes
fgetws.3: SYNOPSIS: Use 'restrict' in prototypes fopencookie.3: SYNOPSIS: Use 'restrict' in prototypes fopen.3: SYNOPSIS: Use 'restrict' in prototypes
fputws.3: SYNOPSIS: Use 'restrict' in prototypes
fread.3: SYNOPSIS: Use 'restrict' in prototypes
fseek.3: SYNOPSIS: Use 'restrict' in prototypes

 man3/argz_add.3    | 41 +++++++++++++++++++++++------------------
 man3/asprintf.3    |  5 +++--
 man3/crypt.3       |  2 +-
 man3/ctime.3       | 16 ++++++++++++----
 man3/dlinfo.3      |  3 ++-
 man3/dlsym.3       |  5 +++--
 man3/drand48_r.3   | 22 ++++++++++++++--------
 man3/ecvt.3        |  6 ++++--
 man3/ecvt_r.3      | 18 ++++++++++--------
 man3/envz_add.3    | 25 +++++++++++++------------
 man3/fgetc.3       |  2 +-
 man3/fgetws.3      |  3 ++-
 man3/fopen.3       |  7 +++++--
 man3/fopencookie.3 |  2 +-
 man3/fputws.3      |  2 +-
 man3/fread.3       |  9 +++++----
 man3/fseek.3       |  2 +-
 man3/memccpy.3     |  3 ++-
 man3/memcpy.3      |  3 ++-
 19 files changed, 105 insertions(+), 71 deletions(-)
Signature · 1 line
2.30.1.721.g45526154a5