Woolz Image Processing  Version 1.8.3
HGUDlpList.c File Reference

Data structures and functions for doubly linked lists of pointers. More...

Macros

#define HGUDLPLIST_C
 

Functions

HGUDlpListHGUDlpListCreate (HGUDlpListState(*lockFn)(void *, HGUDlpListState))
 Creates a list data structure which is required by all the other HGUDlpList functions. More...
 
HGUDlpListHGUDlpListDup (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...
 
HGUDlpListItemHGUDlpListInsert (HGUDlpList *list, HGUDlpListItem *insBefore, void *entry, void(*freeFn)(void *))
 Inserts the given entry into the list before the given item. More...
 
HGUDlpListItemHGUDlpListAppend (HGUDlpList *list, HGUDlpListItem *appAfter, void *entry, void(*freeFn)(void *))
 Appends the given entry into the list after the given item. More...
 
HGUDlpListItemHGUDlpListExchange (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...
 
HGUDlpListItemHGUDlpListDeleteAll (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...
 
HGUDlpListItemHGUDlpListDelete (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...
 
HGUDlpListItemHGUDlpListRemove (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...
 
HGUDlpListItemHGUDlpListIterate (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...
 
HGUDlpListItemHGUDlpListNth (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...
 
HGUDlpListItemHGUDlpListTail (HGUDlpList *list)
 Returns the tail list item. More...
 
HGUDlpListItemHGUDlpListHead (HGUDlpList *list)
 Returns the head list item. More...
 
HGUDlpListItemHGUDlpListNext (HGUDlpList *list, HGUDlpListItem *item)
 Returns the next list item. More...
 
HGUDlpListItemHGUDlpListPrev (HGUDlpList *list, HGUDlpListItem *item)
 Returns the prev list item. More...
 
int HGUDlpListCount (HGUDlpList *list)
 Returns the number of items in the list. More...
 

Detailed Description

Data structures and functions for doubly linked lists of pointers.

Author
Bill Hill
Date
March 1999
Version
Id
899a283922942049bec8953874616fb9f5d3c1ba
Address: MRC Human Genetics Unit, MRC Institute of Genetics and Molecular Medicine, University of Edinburgh, Western General Hospital, Edinburgh, EH4 2XU, UK.
Copyright (C), [2012], The University Court of the University of Edinburgh, Old College, Edinburgh, UK.

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.

Macro Definition Documentation

◆ HGUDLPLIST_C

#define HGUDLPLIST_C