View source code
Display the source code in ddmd/tk/dlist.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.


Interface to the C linked list type.

List is a complete package of functions to deal with singly linked lists of pointers or integers.


1. Uses mem package. 2. Has loop-back tests. 3. Each item in the list can have multiple predecessors, enabling different lists to 'share' a common tail.


Name Description
list_append Append ptr to *plist.
list_appenddata Append integer item to list.
list_apply Apply a function fp to each member of a list.
list_build Build a list out of the null-terminated argument list.
list_cat Concatenate two lists (l2 appended to l1).
list_cmp Compare two lists using the comparison function fp. The comparison function is the same as used for qsort().
list_copy Copy a list and return it.
list_copyinto Copy list of pointers into an array of pointers.
list_equal Compare two lists.
list_free Free list.
list_init Initialize list package.
list_inlist Search for ptr in list.
list_insert Insert item into list at nth position.
list_link Create link to existing list, that is, share the list with somebody else.
list_nitems Count up and return number of items in list.
list_pop Remove first element in list pointed to by *plist.
list_prepend Prepend ptr to *plist.
list_prependdata Prepend integer item to list.
list_reverse Reverse a list.
list_subtract Remove ptr from the list pointed to by *plist.
list_term Terminate list package.


Walter Bright


Boost License 1.0