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