]> git.saurik.com Git - apple/libc.git/blob - stdlib/insque.3
Libc-498.tar.gz
[apple/libc.git] / stdlib / insque.3
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
23 .Fn insque "void *element" "void *pred"
24 .Ft void
25 .Fn remque "void *element"
26 .Sh DESCRIPTION
27 The
28 .Fn insque
29 and
30 .Fn remque
31 functions encapsulate the ever-repeating task of doing insertion and
32 removal operations on doubly linked lists.
33 The functions expect their
34 arguments to point to a structure whose first and second members are
35 pointers to the next and previous element, respectively.
36 The
37 .Fn insque
38 function also allows the
39 .Fa pred
40 argument to be a
41 .Dv NULL
42 pointer for the initialization of a new list's
43 head element.
44 .Sh STANDARDS
45 The
46 .Fn insque
47 and
48 .Fn remque
49 functions conform to
50 .St -p1003.1-2001 .
51 .Sh HISTORY
52 The
53 .Fn insque
54 and
55 .Fn remque
56 functions appeared in
57 .Bx 4.2 .
58 In
59 .Fx 5.0 ,
60 they reappeared conforming to
61 .St -p1003.1-2001 .