FOSSology  4.4.0
Open Source License Compliance by Open Source Software
list.h
1 /*
2  SPDX-FileCopyrightText: © 2006-2009 Hewlett-Packard Development Company, L.P.
3 
4  SPDX-License-Identifier: GPL-2.0-only
5 */
6 
7 #ifndef _LIST_H
8 #define _LIST_H
9 #include "nomos.h"
10 void listInit(list_t *l, int size, char *label);
11 void listClear(list_t *l, int deallocFlag);
12 item_t *listGetItem(list_t *l, char *s);
13 item_t *listAppend(list_t *l, char *s);
14 
15 #ifdef notdef
16 item_t *listLookupName(list_t *l, char *s);
17 item_t *listLookupAlias(list_t *l, char *s);
18 #endif /* notdef */
19 
21 void listIterationReset(list_t *l);
22 int listDelete(list_t *l, item_t *p);
23 void listSort(list_t *l, int sortType);
24 int listCount(list_t *l);
25 void listDump(list_t *l, int verbose);
26 
27 #define DEALLOC_LIST 1
28 #define NOTOUCH_LIST 0
29 
30 #endif /* _LIST_H */
int verbose
The verbose flag for the cli.
Definition: fo_cli.c:38
int s
The socket that the CLI will use to communicate.
Definition: fo_cli.c:37
void listDump(list_t *l, int verbose)
print the passed in list
Definition: list.c:829
int listDelete(list_t *l, item_t *p)
Delete an item from list.
Definition: list.c:537
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.
Definition: list.c:246
void listIterationReset(list_t *l)
Rest list ix to -1.
Definition: list.c:513
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).
Definition: list.c:54
int listCount(list_t *l)
Definition: list.c:800
item_t * listAppend(list_t *l, char *s)
Utility list that isn't sorted - faster for unpacking archives and maintaining lists of files (we onl...
Definition: list.c:314
item_t * listIterate(list_t *l)
return a pointer to listitem, returns a NULL_ITEM when no more items to return.
Definition: list.c:477
void listSort(list_t *l, int sortType)
Sort the list as per the sortType passed.
Definition: list.c:631
void listClear(list_t *l, int deallocFlag)
Destroy list_t.
Definition: list.c:106
Nomos header file.
list_t type structure used to keep various lists. (e.g. there are multiple lists).
Definition: nomos.h:308
tricky data structure used for a list of 'items'
Definition: nomos.h:274