| Bsoft 2.0.5 Bernard's software package

linked_list.h
Go to the documentation of this file.
1
9 #include <stdlib.h>
10 #include <string.h>
11
12 //Function prototypes
13 char* add_item(char** list, unsigned long size);
14 char* append_item(char** list, char* item);
15 char* copy_item(char* toitem, char* fromitem, unsigned long size);
16 char* remove_item(char** list, char* item, unsigned long size);
17 char* replace_item(char** list, char* item, char* new_item);
18 char* copy_list(char* list, unsigned long size);
19 long kill_list(char* list, unsigned long size);
20 long count_list(char* list);
21 long reverse_list(char** list);
22
copy_list
char * copy_list(char *list, unsigned long size)
Generates a complete copy of a linked list.
Definition: linked_list.cpp:185
reverse_list
long reverse_list(char **list)
Reverse the order of items in a linked list.
Definition: linked_list.cpp:252
replace_item
char * replace_item(char **list, char *item, char *new_item)
Finds the given item and replaces it with the new item.
Definition: linked_list.cpp:152
append_item
char * append_item(char **list, char *item)
Appends an item to a linked list.
Definition: linked_list.cpp:59
kill_list
long kill_list(char *list, unsigned long size)
Frees all the items in a linked list.
Definition: linked_list.cpp:214
add_item
char * add_item(char **list, unsigned long size)
Adds an item to a linked list.
Definition: linked_list.cpp:26
count_list
long count_list(char *list)
Counts the number of items in a linked list.
Definition: linked_list.cpp:235
copy_item
char * copy_item(char *toitem, char *fromitem, unsigned long size)
Copies an item to an existing item without changing the link.
Definition: linked_list.cpp:87
remove_item
char * remove_item(char **list, char *item, unsigned long size)
Finds the given item and deletes it from the linked list.
Definition: linked_list.cpp:114