Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

insque(3) [osx man page]

INSQUE(3)						   BSD Library Functions Manual 						 INSQUE(3)

NAME
insque, remque -- doubly-linked list management LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <search.h> void insque(void *element, void *pred); void remque(void *element); DESCRIPTION
The insque() and 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 insque() function also allows the pred argument to be a NULL pointer for the initialization of a new list's head element. STANDARDS
The insque() and remque() functions conform to IEEE Std 1003.1-2001 (``POSIX.1''). HISTORY
The insque() and remque() functions appeared in 4.2BSD. In FreeBSD 5.0, they reappeared conforming to IEEE Std 1003.1-2001 (``POSIX.1''). BSD
October 10, 2002 BSD

Check Out this Related Man Page

insque(3)						     Library Functions Manual							 insque(3)

NAME
insque, remque - Inserts or removes an element in a queue LIBRARY
Standard C Library (libc.a, libc.so) SYNOPSIS
#include <search.h> void insque( void *element, void *pred); void remque( void *element); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: insque(), remque(): XPG4-UNIX Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Points to the element in the queue immediately before the element to be inserted. Points to the element to be inserted or deleted. DESCRIPTION
The insque() and remque() functions manipulate queues built from doubly-linked lists. The queue can be either circular or linear. An application using these functions must define a structure in which the first two members are pointers to the same type of structure and any further members are application-specific. The first member of the structure is a forward pointer to the next entry in the queue. The second member is a backward pointer to the previous entry in the queue. If the queue is linear, it is terminated with null pointers. The insque() function inserts the element pointed to by element into a queue immediately after the element pointed to by pred. The remque() function removed the element pointed to by element from a queue. When using the queue as a linear list, the forward and backward pointers of element can be initialized to null pointers by invoking insque (&element, NULL); where element is the initial element of the queue. When using the queue as a circular list, the application must initialize the forward pointer and the backward pointer of the initial ele- ment of the queue to the element's own address. RETURN VALUES
The insque() and remque() functions do not return a value. RELATED INFORMATION
Standards: standards(5) delim off insque(3)
Man Page