summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/lsearch.3
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/libc/stdlib/lsearch.312
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/libc/stdlib/lsearch.3 b/src/lib/libc/stdlib/lsearch.3
index 051b1ef4c1..eda2aeb599 100644
--- a/src/lib/libc/stdlib/lsearch.3
+++ b/src/lib/libc/stdlib/lsearch.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: lsearch.3,v 1.5 2005/07/07 07:50:38 jmc Exp $ 1.\" $OpenBSD: lsearch.3,v 1.6 2005/07/26 04:20:23 jaredy Exp $
2.\" 2.\"
3.\" Copyright (c) 1989, 1991, 1993 3.\" Copyright (c) 1989, 1991, 1993
4.\" The Regents of the University of California. All rights reserved. 4.\" The Regents of the University of California. All rights reserved.
@@ -38,12 +38,14 @@
38.Nd linear searching routines 38.Nd linear searching routines
39.Sh SYNOPSIS 39.Sh SYNOPSIS
40.Ft char * 40.Ft char *
41.Fn lsearch "const void *key" "const void *base" "size_t *nelp" "size_t width" "int (*compar)(void *, void *)" 41.Fn lsearch "const void *key" "const void *base" "size_t *nelp" \
42 "size_t width" "int (*compar)(void *, void *)"
42.Ft char * 43.Ft char *
43.Fn lfind "const void *key" "const void *base" "size_t *nelp" "size_t width" "int (*compar)(void *, void *)" 44.Fn lfind "const void *key" "const void *base" "size_t *nelp" \
45 "size_t width" "int (*compar)(void *, void *)"
44.Sh DESCRIPTION 46.Sh DESCRIPTION
45The functions 47The functions
46.Fn lsearch , 48.Fn lsearch
47and 49and
48.Fn lfind 50.Fn lfind
49provide basic linear searching functionality. 51provide basic linear searching functionality.
@@ -86,7 +88,7 @@ will return a null pointer and
86.Fn lsearch 88.Fn lsearch
87will add it to the array. 89will add it to the array.
88When an element is added to the array by 90When an element is added to the array by
89.Fn lsearch 91.Fn lsearch ,
90the location referenced by the argument 92the location referenced by the argument
91.Fa nelp 93.Fa nelp
92is incremented by one. 94is incremented by one.