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$ 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 *element1" "void *pred" 24.Ft void 25.Fn remque "void *element" 26.Sh DESCRIPTION 27.Pp 28The 29.Fn insque 30and 31.Fn remque 32functions encapsulate the ever-repeating task of doing insertion and 33removal operations on doubly linked lists. The 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 38functions also allows the 39.Fa pred 40argument to be a NULL pointer for the initialization of a new list's 41head element. 42.Sh HISTORY 43The 44.Fn insque 45and 46.Fn remque 47functions appeared in 48.Bx 4.2 . 49In 50.Fx 5.0 , 51they reappeared conforming to 52.St -p1003.1-2001 . 53.Sh STANDARDS 54The 55.Fn insque 56and 57.Fn remque 58functions conform to 59.St -p1003.1-2001 . 60