]> git.saurik.com Git - apple/libc.git/blame - stdlib/FreeBSD/insque.3
Libc-1439.100.3.tar.gz
[apple/libc.git] / stdlib / FreeBSD / insque.3
CommitLineData
9385eb3d
A
1.\"
2.\" Initial implementation:
3.\" Copyright (c) 2002 Robert Drehmel
4.\" All rights reserved.
5.\"
6.\" As long as the above copyright statement and this notice remain
7.\" unchanged, you can do what ever you want with this file.
8.\"
9.\" $FreeBSD: src/lib/libc/stdlib/insque.3,v 1.3 2003/02/25 21:59:36 robert Exp $
10.\"
11.Dd October 10, 2002
12.Dt INSQUE 3
13.Os
14.Sh NAME
15.Nm insque ,
16.Nm remque
17.Nd doubly-linked list management
18.Sh LIBRARY
19.Lb libc
20.Sh SYNOPSIS
21.In search.h
22.Ft void
ad3c9f2a 23.Fn insque "void *element" "void *pred"
9385eb3d
A
24.Ft void
25.Fn remque "void *element"
26.Sh DESCRIPTION
27The
28.Fn insque
29and
30.Fn remque
31functions encapsulate the ever-repeating task of doing insertion and
32removal operations on doubly linked lists.
33The functions expect their
34arguments to point to a structure whose first and second members are
35pointers to the next and previous element, respectively.
36The
37.Fn insque
38function also allows the
39.Fa pred
40argument to be a
41.Dv NULL
42pointer for the initialization of a new list's
43head element.
44.Sh STANDARDS
45The
46.Fn insque
47and
48.Fn remque
49functions conform to
50.St -p1003.1-2001 .
51.Sh HISTORY
52The
53.Fn insque
54and
55.Fn remque
56functions appeared in
57.Bx 4.2 .
58In
59.Fx 5.0 ,
60they reappeared conforming to
61.St -p1003.1-2001 .