|
static int | strCompare (item_t *, item_t *) |
|
static int | strIcaseCompare (item_t *, item_t *) |
|
static int | strCompareBasename (item_t *, item_t *) |
|
static int | valCompareDsc (item_t *, item_t *) |
|
static int | valCompareAsc (item_t *, item_t *) |
|
static int | bufCompare (item_t *, item_t *) |
|
static void | listDoubleSize (list_t *l) |
| Double the size of list. More...
|
|
static void | listValidate (list_t *l, int appendFlag) |
| Validate list. More...
|
|
void | listInit (list_t *l, int size, char *label) |
| intialize a list, if the list is not empty, empty it (initialize it to zero's). More...
|
|
void | listClear (list_t *l, int deallocFlag) |
| Destroy list_t. More...
|
|
item_t * | listGetItem (list_t *l, char *s) |
| get an item from the itemlist. If the item is not in the itemlist, then add it to the itemlist. More...
|
|
item_t * | listAppend (list_t *l, char *s) |
| Utility list that isn't sorted - faster for unpacking archives and maintaining lists of files (we only need to sort that list at the end of the unpacking process - this just appends an entry at the bottom/end of the list.
|
|
item_t * | listIterate (list_t *l) |
| return a pointer to listitem, returns a NULL_ITEM when no more items to return. More...
|
|
void | listIterationReset (list_t *l) |
| Rest list ix to -1. More...
|
|
int | listDelete (list_t *l, item_t *p) |
| Delete an item from list. More...
|
|
void | listSort (list_t *l, int sortType) |
| Sort the list as per the sortType passed. More...
|
|
int | listCount (list_t *l) |
|
void | listDump (list_t *l, int verbose) |
| print the passed in list More...
|
|
list manipulation functions and str/val Compare functions
list.c supplies all of the functions needed to manipulate the list and listitem structures defined in nomos.h. It also supplies the str*Compare* and valCompare* functions.
- Version
- "$Id: list.c 3676 2010-11-15 23:10:52Z bobgo $"
Definition in file list.c.
get an item from the itemlist. If the item is not in the itemlist, then add it to the itemlist.
This function searches the str member in the listitem structure, if found, a pointer to that item is returned. If not found, the item is added to the list of items 'in the middle' of the list.
- Parameters
-
list_t | *list the list to search/update |
*s | pointer to the string to search for. |
- Returns
- pointer to the item
- Todo:
- CDB – Change so that there is only one loop variable in the for loop
Definition at line 246 of file list.c.