aboutsummaryrefslogtreecommitdiffstats
path: root/man/man3/lsearch.3
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2024-11-17 18:47:53 +0100
committerAlejandro Colomar <alx@kernel.org>2024-11-17 21:51:23 +0100
commit18e7c4597c4e72fa5210c7887273e363c456c9ee (patch)
tree97cfd22e731a4c859ae71783d70943ff72e6cb60 /man/man3/lsearch.3
parent8fc6fdd8291d906e58a175b5e1b20da680aaeb4a (diff)
downloadman-pages-18e7c4597c4e.tar.gz
man/: Terminology consistency reforms (n, size, length)
Use 'length' for the lenght of a string. Use 'n' for the number of elements. Use 'size' for the number of bytes. (And in wide-character string functions, 'size' also refers to the number of wide characters.) The change is quite large, and I might have made some mistakes. But overall, this should improve consistency in use of these terms. Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'man/man3/lsearch.3')
-rw-r--r--man/man3/lsearch.312
1 files changed, 6 insertions, 6 deletions
diff --git a/man/man3/lsearch.3 b/man/man3/lsearch.3
index c15c072cf3..dc18d8bf85 100644
--- a/man/man3/lsearch.3
+++ b/man/man3/lsearch.3
@@ -15,13 +15,13 @@ Standard C library
.B #include <search.h>
.P
.BI "void *lfind(const void " key [. size "], \
-const void " base [*. nmemb " * ." size ],
-.BI " size_t *" nmemb ", size_t " size ,
+const void " base [*. n " * ." size ],
+.BI " size_t *" n ", size_t " size ,
.BI " int(*" compar ")(const void [." size "], \
const void [." size ]));
.BI "void *lsearch(const void " key [. size "], \
-void " base [*. nmemb " * ." size ],
-.BI " size_t *" nmemb ", size_t " size ,
+void " base [*. n " * ." size ],
+.BI " size_t *" n ", size_t " size ,
.BI " int(*" compar ")(const void [." size "], \
const void [." size ]));
.fi
@@ -34,7 +34,7 @@ perform a linear search for
in the array
.I base
which has
-.I *nmemb
+.I *n
elements of
.I size
bytes each.
@@ -53,7 +53,7 @@ If
does not find a matching element, then the
.I key
object is inserted at the end of the table, and
-.I *nmemb
+.I *n
is
incremented.
In particular, one should know that a matching element