dl_prev()

dl_prev()#

Returns the previous item in a doubly linked list relative to the given item.

Prototype

void *dl_prev(void *curr);

Parameters

Key

Type

Description

curr

void *

Pointer to the current item in the doubly linked list.


Return Value

Returns a pointer to the previous item in the list. If curr is NULL, or if curr is the first item in the list, returns NULL.

Notes

Ensure that curr is a valid pointer to an item in a properly initialized doubly linked list before calling dl_prev().

Prototype

// Not applicable in JS

Prototype

# Not applicable in Python
Examples
// TODO C examples
// TODO JS examples
# TODO Python examples