.\" As long as the above copyright statement and this notice remain
.\" unchanged, you can do what ever you want with this file.
.\"
-.\" $FreeBSD: src/lib/libc/stdlib/lsearch.3,v 1.4 2002/12/19 09:40:24 ru Exp $
+.\" $FreeBSD: src/lib/libc/stdlib/lsearch.3,v 1.5 2005/01/20 09:17:04 ru Exp $
.\"
.Dd October 11, 2002
.Dt LSEARCH 3
.Os
.Sh NAME
-.Nm lsearch ,
-.Nm lfind
+.Nm lfind ,
+.Nm lsearch
.Nd linear search and append
.Sh LIBRARY
.Lb libc
.Sh SYNOPSIS
.In search.h
.Ft "void *"
-.Fo lsearch
-.Fa "const void *key" "void *base" "size_t *nelp" "size_t width"
+.Fo lfind
+.Fa "const void *key" "const void *base" "size_t *nelp" "size_t width"
.Fa "int \*[lp]*compar\*[rp]\*[lp]const void *, const void *\*[rp]"
.Fc
.Ft "void *"
-.Fo lfind
-.Fa "const void *key" "const void *base" "size_t *nelp" "size_t width"
+.Fo lsearch
+.Fa "const void *key" "void *base" "size_t *nelp" "size_t width"
.Fa "int \*[lp]*compar\*[rp]\*[lp]const void *, const void *\*[rp]"
.Fc
.Sh DESCRIPTION
.Fn lsearch
and
.Fn lfind
-functions walk linearly through an array and compare each element with
-the one to be sought using a supplied comparison function.
+functions walk linearly through an array, comparing each element with
+the one to be sought, by means of a supplied comparison function.
.Pp
The
.Fa key
.Xr bsearch 3 ,
.Xr hsearch 3 ,
.Xr tsearch 3
+.Sh STANDARDS
+The
+.Fn lsearch
+and
+.Fn lfind
+functions conform to
+.St -p1003.1-2001 .
.Sh HISTORY
The
.Fn lsearch
.Fx 5.0 ,
they reappeared conforming to
.St -p1003.1-2001 .
-.Sh STANDARDS
-The
-.Fn lsearch
-and
-.Fn lfind
-functions conform to
-.St -p1003.1-2001 .