1 /*
2 * Copyright (c) 1988, 1989, 1990, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Adam de Boor.
7 *
8 * %sccs.include.redist.c%
9 */
10
11 #ifndef lint
12 static char sccsid[] = "@(#)lstFind.c 8.2 (Berkeley) 04/28/95";
13 #endif /* not lint */
14
15 /*-
16 * LstFind.c --
17 * Find a node on a list.
18 */
19
20 #include "lstInt.h"
21
22 /*-
23 *-----------------------------------------------------------------------
24 * Lst_Find --
25 * Find a node on the given list using the given comparison function
26 * and the given datum.
27 *
28 * Results:
29 * The found node or NILLNODE if none matches.
30 *
31 * Side Effects:
32 * None.
33 *
34 *-----------------------------------------------------------------------
35 */
36 LstNode
Lst_Find(l,d,cProc)37 Lst_Find (l, d, cProc)
38 Lst l;
39 ClientData d;
40 int (*cProc) __P((ClientData, ClientData));
41 {
42 return (Lst_FindFrom (l, Lst_First(l), d, cProc));
43 }
44
45