1 /********************************************************************
3 string_list.c - function for handling string lists
5 Niksa Orlic, 2004-04-28
7 ********************************************************************/
11 //#include "../util/message.h"
15 #include <string.h>
16 #include <stdlib.h>
18 /*
19 Create a new empty list
20 */
22 {
32 }
35 /*
36 Delete the list and the data in the list
37 */
39 {
44 {
53 }
54 }
56 /*
57 Creates a copy of the list, the data
58 values are also copied
59 */
61 {
69 do
70 {
79 }
82 /*
83 Add an element into the list, the data is
84 copied.
85 */
87 {
92 else
93 {
102 /* move to the end of the list */
107 }
108 }
111 /*
112 Returns the number of elements in the list
113 */
115 {
121 do
122 {
124 counter ++;
128 }