insque() — Insert an element into a doubly-linked list

Standards

Standards / Extensions C or C++ Dependencies

XPG4.2
Single UNIX Specification, Version 3

both  

Format

#define _XOPEN_SOURCE_EXTENDED 1
#include <search.h>

void insque(void *element, void *pred);

General description

The insque() function inserts the element pointed to by element into a doubly-linked list immediately after the element pointed to by pred. The function operates on pointers to structures which have a pointer to their successor in the list as their first element, and a pointer to their predecessor as the second. The application is free to define the remaining contents of the structure, and manages all storage itself. To insert the first element into a linear (non-circular) list, an application would call insque(element, NULL);. To insert the first element into a circular list, the application would set the element's forward and back pointers to point to the element.

Returned value

insque() returns no values.

Related information