equal
deleted
inserted
replaced
|
1 /** |
|
2 * Simple dynamic array manipulation functions. |
|
3 */ |
|
4 |
|
5 #ifndef LIST_H_ |
|
6 #define LIST_H_ |
|
7 |
|
8 #include <stddef.h> |
|
9 |
|
10 /** |
|
11 * Insert element into the list and increase listSize. |
|
12 * Returns a pointer to the modified list on success, NULL on failure. On success, the old |
|
13 * pointer is no longer valid, and on failure the list remains unchanged (similar to realloc) |
|
14 */ |
|
15 void *flib_list_insert(void *list, int *listSizePtr, size_t elementSize, void *elementPtr, int pos); |
|
16 |
|
17 /** |
|
18 * Remove an element from the list and decrease listSize. |
|
19 * Returns a pointer to the modified list on success, NULL on failure. On success, the old |
|
20 * pointer is no longer valid, and on failure the list remains unchanged (similar to realloc) |
|
21 */ |
|
22 void *flib_list_delete(void *list, int *listSizePtr, size_t elementSize, int pos); |
|
23 |
|
24 #endif /* LIST_H_ */ |