Lines Matching refs:list
33 errcode_t init_list(struct profile_string_list *list) in init_list() argument
35 list->num = 0; in init_list()
36 list->max = 10; in init_list()
37 list->list = malloc(list->max * sizeof(char *)); in init_list()
38 if (list->list == 0) in init_list()
40 list->list[0] = 0; in init_list()
48 void end_list(struct profile_string_list *list, char ***ret_list) in end_list() argument
52 if (list == 0) in end_list()
56 *ret_list = list->list; in end_list()
59 for (cp = list->list; *cp; cp++) in end_list()
61 free(list->list); in end_list()
63 list->num = list->max = 0; in end_list()
64 list->list = 0; in end_list()
70 errcode_t add_to_list(struct profile_string_list *list, const char *str) in add_to_list() argument
75 if (list->num+1 >= list->max) { in add_to_list()
76 newmax = list->max + 10; in add_to_list()
77 newlist = realloc(list->list, newmax * sizeof(char *)); in add_to_list()
80 list->max = newmax; in add_to_list()
81 list->list = newlist; in add_to_list()
88 list->list[list->num++] = newstr; in add_to_list()
89 list->list[list->num] = 0; in add_to_list()
96 static int is_list_member(struct profile_string_list *list, const char *str) in is_list_member() argument
100 if (!list->list) in is_list_member()
103 for (cpp = list->list; *cpp; cpp++) { in is_list_member()
114 void KRB5_CALLCONV profile_free_list(char **list) in profile_free_list() argument
118 if (list == 0) in profile_free_list()
121 for (cp = list; *cp; cp++) in profile_free_list()
123 free(list); in profile_free_list()