Lines Matching refs:list
43 char **list; member
51 static errcode_t init_list(struct profile_string_list *list) in init_list() argument
53 list->num = 0; in init_list()
54 list->max = 10; in init_list()
55 list->list = malloc(list->max * sizeof(char *)); in init_list()
56 if (list->list == 0) in init_list()
58 list->list[0] = 0; in init_list()
66 static void end_list(struct profile_string_list *list, char ***ret_list) in end_list() argument
70 if (list == 0) in end_list()
74 *ret_list = list->list; in end_list()
77 for (cp = list->list; *cp; cp++) in end_list()
79 free(list->list); in end_list()
81 list->num = list->max = 0; in end_list()
82 list->list = 0; in end_list()
88 static errcode_t add_to_list(struct profile_string_list *list, char *str) in add_to_list() argument
93 if (list->num+1 >= list->max) { in add_to_list()
94 newmax = list->max + 10; in add_to_list()
95 newlist = realloc(list->list, newmax * sizeof(char *)); in add_to_list()
98 list->max = newmax; in add_to_list()
99 list->list = newlist; in add_to_list()
102 list->list[list->num++] = str; in add_to_list()
103 list->list[list->num] = 0; in add_to_list()
110 static int is_list_member(struct profile_string_list *list, const char *str) in is_list_member() argument
114 if (!list->list) in is_list_member()
117 for (cpp = list->list; *cpp; cpp++) { in is_list_member()
128 void profile_free_list(char **list) in profile_free_list() argument
132 if (list == 0) in profile_free_list()
135 for (cp = list; *cp; cp++) in profile_free_list()
137 free(list); in profile_free_list()