View source code
Display the source code in dmd/backend/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.
Module dmd.backend.dlist
Interface to the C linked list type.
List is a complete package of functions to deal with singly linked lists of pointers or integers.
Features
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.
Functions
Name | Description |
---|---|
list_append(plist, ptr)
|
Append ptr to *plist. |
list_appenddata(plist, d)
|
Append integer item to list. |
list_apply(plist, fp)
|
Apply a function fp to each member of a list. |
list_build(p)
|
Build a list out of the null-terminated argument list. |
list_cat(pl1, l2)
|
Concatenate two lists (l2 appended to l1). |
list_cmp(list1, list2, fp)
|
Compare two lists using the comparison function fp. The comparison function is the same as used for qsort(). |
list_copy(list)
|
Copy a list and return it. |
list_copyinto(l, pa)
|
Copy list of pointers into an array of pointers. |
list_data(list)
|
|
list_equal(list1, list2)
|
Compare two lists. |
list_free(plist, freeptr)
|
Free list. |
list_init()
|
Initialize list package. |
list_inlist(list, ptr)
|
Search for ptr in list. |
list_insert(pl, ptr, n)
|
Insert item into list at nth position. |
list_last(list)
|
|
list_link(list)
|
Create link to existing list, that is, share the list with somebody else. |
list_next(list)
|
|
list_nitems(list)
|
Count up and return number of items in list. |
list_nth(list, n)
|
|
list_pop(plist)
|
Remove first element in list pointed to by *plist. |
list_prepend(plist, ptr)
|
Prepend ptr to *plist. |
list_prependdata(plist, d)
|
Prepend integer item to list. |
list_prev(start, list)
|
|
list_ptr(list)
|
|
list_reverse(l)
|
Reverse a list in place. |
list_subtract(plist, ptr)
|
Remove ptr from the list pointed to by *plist. |
list_term()
|
Terminate list package. |
Structs
Name | Description |
---|---|
ListRange
|
Range for Lists. |
Authors
License
Copyright © 1999-2022 by the D Language Foundation | Page generated by ddox.