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
			a local clone.
		
	ddmd.tk.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.
Authors: 
License: 
Source: backend/tk/dlist.d
- nothrow @nogc list_tlist_link(list_tlist);
- Create link to existinglist, that is, share thelistwith somebody else.Returns:pointer to thatlistentry.
- nothrow @nogc list_tlist_next(list_tlist);
- Returns:pointer to next entry inlist.
- nothrow @nogc list_tlist_prev(list_tstart, list_tlist);
- Returns:pointer to previous item inlist.
- nothrow @nogc void*list_ptr(list_tlist);
- Returns:ptr fromlistentry.
- nothrow @nogc intlist_data(list_tlist);
- Returns:integer item fromlistentry.
- nothrow @nogc voidlist_appenddata(list_t*plist, intd);
- Append integer item to list.
- nothrow @nogc voidlist_prependdata(list_t*plist, intd);
- Prepend integer item to list.
- nothrow @nogc voidlist_init();
- Initialize list package.Output: list_inited = 1 
- nothrow @nogc voidlist_term();
- Terminate list package.Output: list_inited = 0 
- nothrow @nogc voidlist_free(list_t*plist, list_free_fpfreeptr);
- Free list.Parameters:list_t* plistPointer to list to free list_free_fp freeptrPointer to freeing function for the data pointer (use FPNULL if none) Output: * plistisnull
- nothrow @nogc void*list_subtract(list_t*plist, void*ptr);
- Removeptrfrom the list pointed to by *plist.Output: * plistis updated to be the start of the new listReturns:nullif *plistisnullotherwiseptr
- nothrow @nogc void*list_pop(list_t*plist);
- Remove first element in list pointed to by *plist.Returns:First element,nullif *plistisnull
- nothrow @nogc list_tlist_append(list_t*plist, void*ptr);
- Appendptrto *plist.Returns:pointer to list item created.nullif out of memory
- nothrow @nogc list_tlist_prepend(list_t*plist, void*ptr);
- Prependptrto *plist.Returns:pointer to list item created (which is also the start of the list).nullif out of memory
- nothrow @nogc intlist_nitems(list_tlist);
- Count up and return number of items inlist.Returns:# of entries inlist
- nothrow @nogc list_tlist_nth(list_tlist, intn);
- Returns:nthlistentry inlist.
- nothrow @nogc list_tlist_last(list_tlist);
- Returns:lastlistentry inlist.
- nothrow @nogc list_tlist_copy(list_tlist);
- Copy alistand return it.
- nothrow @nogc intlist_equal(list_tlist1, list_tlist2);
- Compare two lists.Returns:If they have the same ptrs, return 1 else 0.
- nothrow @nogc intlist_cmp(list_tlist1, list_tlist2, int function(void*, void*)fp);
- Compare two lists using the comparison functionfp. The comparison function is the same as used for qsort().Returns:If they compare equal, return 0 else value returned byfp.
- nothrow @nogc list_tlist_inlist(list_tlist, void*ptr);
- Search forptrinlist.Returns:If found, returnlistentry that it is, elsenull.
- nothrow @nogc list_tlist_cat(list_t*pl1, list_tl2);
- Concatenate two lists (l2appended to l1).Output: * pl1updated to be start of concatenated list.Returns:*pl1
- nothrow @nogc list_tlist_build(void*p, ...);
- Build a list out of thenull-terminated argument list.Returns:generated list
- nothrow @nogc voidlist_apply(list_t*plist, void function(void*)fp);
- Apply a functionfpto each member of a list.
- nothrow @nogc list_tlist_reverse(list_t);
- Reverse a list.
- nothrow @nogc voidlist_copyinto(list_t, void*);
- Copy list of pointers into an array of pointers.
- nothrow @nogc list_tlist_insert(list_t*, void*, intn);
- Insert item into list at nth position.
Copyright © 1999-2017 by the D Language Foundation | Page generated by
Ddoc on Sat Nov  4 04:02:20 2017