27 #ifndef _HAVE_PCP_PLIST_H
28 #define _HAVE_PCP_PLIST_H
35 struct _plist_t *next;
36 struct _plist_t *first;
39 typedef struct _plist_t plist_t;
41 static inline void p_add(plist_t **lst,
char *value) {
45 newitem = (plist_t *)malloc(
sizeof(plist_t));
46 newitem->value = (
char *)malloc(strlen(value) + 1);
47 strncpy(newitem->value, value, strlen(value) + 1);
51 while (iter->next != NULL ) {
54 newitem->first = iter->first;
58 newitem->first = newitem;
63 static inline void p_clean(plist_t *lst) {
64 plist_t *iter = lst->first;
67 while (iter != NULL) {