Woolz Image Processing
Version 1.8.3
|
Data structures and functions for doubly linked lists of pointers. More...
Macros | |
#define | HGUDLPLIST_C |
Functions | |
HGUDlpList * | HGUDlpListCreate (HGUDlpListState(*lockFn)(void *, HGUDlpListState)) |
Creates a list data structure which is required by all the other HGUDlpList functions. More... | |
HGUDlpList * | HGUDlpListDup (HGUDlpList *givenList) |
Duplicates a list data structure, but NOT its items. Ie head and tail are both NULL and the item count is zero, only the lock function is common. More... | |
void | HGUDlpListDestroy (HGUDlpList *list) |
Destroys the given list list data structure and any list items. More... | |
HGUDlpListItem * | HGUDlpListInsert (HGUDlpList *list, HGUDlpListItem *insBefore, void *entry, void(*freeFn)(void *)) |
Inserts the given entry into the list before the given item. More... | |
HGUDlpListItem * | HGUDlpListAppend (HGUDlpList *list, HGUDlpListItem *appAfter, void *entry, void(*freeFn)(void *)) |
Appends the given entry into the list after the given item. More... | |
HGUDlpListItem * | HGUDlpListExchange (HGUDlpList *list, HGUDlpListItem *item0, HGUDlpListItem *item1) |
Exchanges the two given list item entries and not the items, so that head is still head and tail is still tail. More... | |
HGUDlpListItem * | HGUDlpListDeleteAll (HGUDlpList *list) |
Deletes all list items from the head on down to and including the tail. Where delete implies both the removal of items from the list and freeing the entries using the item's free functions (unless either the free function or the entry is NULL). More... | |
HGUDlpListItem * | HGUDlpListDelete (HGUDlpList *list, HGUDlpListItem *item) |
Deletes the given list item from the list with the given list. Where delete implies both the removal of an item, the freeing of the item AND (when neither the free function or the entry are NULL) it's entry too. More... | |
HGUDlpListItem * | HGUDlpListRemove (HGUDlpList *list, HGUDlpListItem *item) |
Removes the item from the list withe the given list. Where remove implies the removal of the item from the list and the freeing of the item EXCEPT for its entry. More... | |
int | HGUDlpListSort (HGUDlpList *list, int(*entryCompFn)(void *, void *)) |
Sorts the entire list using the given entry comparison function. More... | |
HGUDlpListItem * | HGUDlpListIterate (HGUDlpList *list, HGUDlpListItem *item, HGUDlpListDirection dir, int(*iterFn)(HGUDlpList *, HGUDlpListItem *, void *), void *iterData) |
Iterates the given function through the list, starting with the supplied given item. The iteration may proceed toward either the head or tail of the list. The iterated function must take the form of: More... | |
HGUDlpListItem * | HGUDlpListNth (HGUDlpList *list, HGUDlpListItem *item, HGUDlpListDirection dir, int offset) |
Finds the n'th item from the given item in the list. The n'th item from the head or tail can be found by calling the function with item == NULL, in which case the direction of approach is optimised. More... | |
int | HGUDlpListOffset (HGUDlpList *list, HGUDlpListItem *item, HGUDlpListDirection dir) |
Counts the number of items from the given item to the item with a NULL next/prev item, which is at the head or tail of list. The offset between an item and itself is defined to be zero. More... | |
int | HGUDlpListItemIsHead (HGUDlpList *list, HGUDlpListItem *item) |
Looks to see if the given item is at the head of the given list. More... | |
int | HGUDlpListItemIsTail (HGUDlpList *list, HGUDlpListItem *item) |
Looks to see if the given item is at the tail of the given list. More... | |
void * | HGUDlpListEntryGet (HGUDlpList *list, HGUDlpListItem *item) |
Returns the list items entry. More... | |
void * | HGUDlpListEntrySet (HGUDlpList *list, HGUDlpListItem *item, void *newEntry) |
Sets the given items entry and returns the previous entry. Entries are NEVER freed by this function. More... | |
HGUDlpListItem * | HGUDlpListTail (HGUDlpList *list) |
Returns the tail list item. More... | |
HGUDlpListItem * | HGUDlpListHead (HGUDlpList *list) |
Returns the head list item. More... | |
HGUDlpListItem * | HGUDlpListNext (HGUDlpList *list, HGUDlpListItem *item) |
Returns the next list item. More... | |
HGUDlpListItem * | HGUDlpListPrev (HGUDlpList *list, HGUDlpListItem *item) |
Returns the prev list item. More... | |
int | HGUDlpListCount (HGUDlpList *list) |
Returns the number of items in the list. More... | |
Data structures and functions for doubly linked lists of pointers.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#define HGUDLPLIST_C |