aboutsummaryrefslogtreecommitdiffstats
path: root/man3
diff options
context:
space:
mode:
authorAlejandro Colomar <alx.manpages@gmail.com>2021-02-24 15:42:52 +0100
committerMichael Kerrisk <mtk.manpages@gmail.com>2021-03-03 23:12:22 +0100
commit62b60779611081c7da90c68fa79ac1ca02794e03 (patch)
tree1528278d4fdb4813500b05e8fda5fe23a1661c49 /man3
parent252ec2330fb84695310a63a96711f971374b8a84 (diff)
downloadman-pages-62b60779611081c7da90c68fa79ac1ca02794e03.tar.gz
argz_add.3: SYNOPSIS: Use 'restrict' in prototypes
Glibc uses 'restrict' for some of the functions in this page: ============================= argz_add string/argz.h:76: error_t argz_add (char **restrict argz, size_t *restrict argz_len, const char *restrict str) THROW; ============================= argz_add_sep string/argz.h:82: error_t argz_add_sep (char **restrict argz, size_t *restrict argz_len, const char *restrict string, int delim) THROW; ============================= argz_append string/argz.h:70: error_t argz_append (char **restrict argz, size_t *restrict argz_len, const char *restrict buf, size_t buf_len) THROW; ============================= argz_count string/argz.h:54: size_t argz_count (const char *argz, size_t len) THROW attribute_pure__; ============================= argz_create string/argz.h:40: error_t argz_create (char *const argv[], char **restrict argz, size_t *restrict len) THROW; ============================= argz_create_sep string/argz.h:47: error_t argz_create_sep (const char *restrict string, int sep, char **restrict argz, size_t *restrict len) THROW; ============================= argz_delete string/argz.h:88: void argz_delete (char **restrict argz, size_t *restrict argz_len, char *restrict entry) THROW; ============================= argz_extract string/argz.h:61: void argz_extract (const char *restrict argz, size_t len, char **restrict argv) THROW; ============================= argz_insert string/argz.h:98: error_t argz_insert (char **restrict argz, size_t *restrict argz_len, char *restrict before, const char *restrict entry) THROW; ============================= argz_next string/argz.h:128: char *argz_next (const char *restrict argz, size_t argz_len, const char *restrict entry) THROW; ============================= argz_replace string/argz.h:106: error_t argz_replace (char **restrict argz, size_t *restrict argz_len, const char *restrict str, const char *restrict with, unsigned int *restrict replace_count); ============================= argz_stringify string/argz.h:67: void argz_stringify (char *argz, size_t len, int sep) THROW; Let's use it here too. Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man3')
-rw-r--r--man3/argz_add.341
1 files changed, 23 insertions, 18 deletions
diff --git a/man3/argz_add.3 b/man3/argz_add.3
index c326f9cdb2..a6fbde95b6 100644
--- a/man3/argz_add.3
+++ b/man3/argz_add.3
@@ -16,35 +16,40 @@ argz_next, argz_replace, argz_stringify \- functions to handle an argz list
.nf
.B "#include <argz.h>"
.PP
-.BI "error_t argz_add(char **" argz ", size_t *" argz_len \
-", const char *" str );
+.BI "error_t argz_add(char **restrict " argz ", size_t *restrict " argz_len ",
+.BI " const char *restrict " str );
.PP
-.BI "error_t argz_add_sep(char **" argz ", size_t *" argz_len ,
-.BI " const char *" str ", int " delim );
+.BI "error_t argz_add_sep(char **restrict " argz \
+", size_t *restrict " argz_len ,
+.BI " const char *restrict " str ", int " delim );
.PP
-.BI "error_t argz_append(char **" argz ", size_t *" argz_len ,
-.BI " const char *" buf ", size_t " buf_len );
+.BI "error_t argz_append(char **restrict " argz ", size_t *restrict " argz_len ,
+.BI " const char *restrict " buf ", size_t " buf_len );
.PP
.BI "size_t argz_count(const char *" argz ", size_t " argz_len );
.PP
-.BI "error_t argz_create(char * const " argv "[], char **" argz ,
-.BI " size_t *" argz_len );
+.BI "error_t argz_create(char *const " argv "[], char **restrict " argz ,
+.BI " size_t *restrict " argz_len );
.PP
-.BI "error_t argz_create_sep(const char *" str ", int " sep ", char **" argz ,
-.BI " size_t *" argz_len );
+.BI "error_t argz_create_sep(const char *restrict " str ", int " sep ,
+.BI " char **restrict " argz ", size_t *restrict " argz_len );
.PP
-.BI "void argz_delete(char **" argz ", size_t *" argz_len ", char *" entry );
+.BI "void argz_delete(char **restrict " argz ", size_t *restrict " argz_len ,
+.BI " char *restrict " entry );
.PP
-.BI "void argz_extract(const char *" argz ", size_t " argz_len ", char **" argv );
+.BI "void argz_extract(const char *restrict " argz ", size_t " argz_len ,
+.BI " char **restrict " argv );
.PP
-.BI "error_t argz_insert(char **" argz ", size_t *" argz_len ", char *" before ,
-.BI " const char *" entry );
+.BI "error_t argz_insert(char **restrict " argz ", size_t *restrict " argz_len ,
+.BI " char *restrict " before ", const char *restrict " entry );
.PP
-.BI "char *argz_next(const char *" argz ", size_t " argz_len ", const char *" entry );
+.BI "char *argz_next(const char *restrict " argz ", size_t " argz_len ,
+.BI " const char *restrict " entry );
.PP
-.BI "error_t argz_replace(char **" argz ", size_t *" argz_len \
-", const char *" str ,
-.BI " const char *" with ", unsigned int *" replace_count );
+.BI "error_t argz_replace(char **restrict " argz \
+", size_t *restrict " argz_len ,
+.BI " const char *restrict " str ", const char *restrict " with ,
+.BI " unsigned int *restrict " replace_count );
.PP
.BI "void argz_stringify(char *" argz ", size_t " len ", int " sep );
.fi