dmd.backend.dlist
Interface to the C linked list type.
Discussion
List is a complete package of functions to deal with singly linked lists of pointers or integers.
Features:
- Uses mem package.
- Has loop-back tests.
- Each item in the list can have multiple predecessors, enabling different lists to 'share' a common tail.
License
    Source:
backend/dlist.d
  
- 
  Declarationnothrow @nogc @safe list_tlist_link(list_tlist);Create link to existing list, that is, share thelistwith somebody else.Return Valuepointer to that listentry.
- 
  Declarationnothrow @nogc @safe list_tlist_next(list_tlist);Return Valuepointer to next entry in list.
- 
  Declarationnothrow @nogc @trusted inout(void)*list_ptr(inout list_tlist);Return Valueptr from listentry.
- 
  Declarationnothrow @nogc @safe intlist_data(list_tlist);Return Valueinteger item from listentry.
- 
  Declarationnothrow @nogc @safe voidlist_appenddata(list_t*plist, intd);Append integer item to list. 
- 
  Declarationnothrow @nogc @safe voidlist_prependdata(list_t*plist, intd);Prepend integer item to list. 
- 
  Declarationnothrow @nogc @trusted voidlist_init();Initialize list package. Output: list_inited = 1 
- 
  Declarationnothrow @nogc @trusted voidlist_term();Terminate list package. Output: list_inited = 0 
- 
  Declarationnothrow @nogc @trusted voidlist_free(list_t*plist, list_free_fpfreeptr);Free list. Parameterslist_t*plistPointer to list to free list_free_fpfreeptrPointer to freeing function for the data pointer (use FPNULL if none) Output: * plistisnull
- 
  Declarationnothrow @nogc @trusted void*list_subtract(list_t*plist, void*ptr);Remove ptrfrom the list pointed to by *plist.Output: * plistis updated to be the start of the new listReturn Valuenullif *plistisnullotherwiseptr
- 
  Declarationnothrow @nogc @safe void*list_pop(list_t*plist);Remove first element in list pointed to by * plist.Return ValueFirst element, nullif *plistisnull
- 
  Declarationnothrow @nogc @trusted list_tlist_append(list_t*plist, void*ptr);Append ptrto *plist.Return Valuepointer to list item created. nullif out of memory
- 
  Declarationnothrow @nogc @trusted list_tlist_prepend(list_t*plist, void*ptr);Prepend ptrto *plist.Return Valuepointer to list item created (which is also the start of the list). nullif out of memory
- 
  Declarationnothrow @nogc @safe intlist_nitems(list_tlist);Count up and return number of items in list.Return Valueof entries inlist
- 
  Declarationnothrow @nogc @safe list_tlist_nth(list_tlist, intn);Return Valuenth listentry inlist.
- 
  Declarationnothrow @nogc @safe list_tlist_last(list_tlist);Return Valuelast listentry inlist.
- 
  Declarationnothrow @nogc @safe list_tlist_prev(list_tstart, list_tlist);Return Valuepointer to previous item in list.
- 
  Declarationnothrow @nogc @trusted list_tlist_copy(list_tlist);Copy a listand return it.
- 
  Declarationnothrow @nogc @safe intlist_equal(list_tlist1, list_tlist2);Compare two lists. Return ValueIf they have the same ptrs, return 1 else 0. 
- 
  Declarationnothrow @nogc @trusted intlist_cmp(list_tlist1, list_tlist2, int function(void*, void*) nothrow @nogcfp);Compare two lists using the comparison function fp. The comparison function is the same as used for qsort().Return ValueIf they compare equal, return 0 else value returned by fp.
- 
  Declarationnothrow @nogc @trusted list_tlist_inlist(list_tlist, void*ptr);Search for ptrinlist.Return ValueIf found, return listentry that it is, elsenull.
- 
  Declarationnothrow @nogc @safe list_tlist_cat(list_t*pl1, list_tl2);Concatenate two lists ( l2appended to l1).Output: * pl1updated to be start of concatenated list.Return Value* pl1
- 
  Declarationnothrow @nogc @trusted voidlist_apply(list_t*plist, void function(void*) nothrow @nogcfp);Apply a function fpto each member of a list.
- 
  Declarationnothrow @nogc @safe list_tlist_reverse(list_tl);Reverse a list in place. 
- 
  Declarationnothrow @nogc @trusted voidlist_copyinto(list_tl, void*pa);Copy list of pointers into an array of pointers. 
- 
  Declarationnothrow @nogc @trusted list_tlist_insert(list_t*pl, void*ptr, intn);Insert item into list at nth position. 
- 
  DeclarationstructListRange;Range for Lists. 
- 
  Declarationnothrow @trusted list_tlist_build(void*p, ...);Build a list out of the null-terminated argument list.Return Valuegenerated list