Lines Matching defs:list

23  * publicy exported functions used to build up a null-terminated char ** list
26 * The publicly exported interface for freeing char** list is
31 * Initialize the string list abstraction.
33 errcode_t init_list(struct profile_string_list *list)
35 list->num = 0;
36 list->max = 10;
37 list->list = malloc(list->max * sizeof(char *));
38 if (list->list == 0)
40 list->list[0] = 0;
46 * built up list in *ret_list if it is non-null.
48 void end_list(struct profile_string_list *list, char ***ret_list)
52 if (list == 0)
56 *ret_list = list->list;
59 for (cp = list->list; *cp; cp++)
61 free(list->list);
63 list->num = list->max = 0;
64 list->list = 0;
68 * Add a string to the list.
70 errcode_t add_to_list(struct profile_string_list *list, const char *str)
75 if (list->num+1 >= list->max) {
76 newmax = list->max + 10;
77 newlist = realloc(list->list, newmax * sizeof(char *));
80 list->max = newmax;
81 list->list = newlist;
88 list->list[list->num++] = newstr;
89 list->list[list->num] = 0;
94 * Return TRUE if the string is already a member of the list.
96 static int is_list_member(struct profile_string_list *list, const char *str)
100 if (!list->list)
103 for (cpp = list->list; *cpp; cpp++) {
111 * This function frees a null-terminated list as returned by
114 void KRB5_CALLCONV profile_free_list(char **list)
118 if (list == 0)
121 for (cp = list; *cp; cp++)
123 free(list);
333 * This function will return the list of the names of subections in the
369 * This function will return the list of the names of relations in the