Lines Matching defs:list
36 char **list;
45 * Initialize the string list abstraction.
48 init_list(struct profile_string_list *list)
50 list->num = 0;
51 list->max = 10;
52 list->list = malloc(list->max * sizeof (char *));
53 if (list->list == NULL)
55 list->list[0] = NULL;
60 * If re_list is non-NULL then pass the list header to the caller else free
61 * the previously allocated list.
64 end_list(struct profile_string_list *list, char ***ret_list)
67 if (list == NULL)
71 *ret_list = list->list;
74 profile_free_list(list->list);
75 list->num = list->max = 0;
76 list->list = NULL;
80 * Add a string to the list.
83 add_to_list(struct profile_string_list *list, const char *str)
88 if (list->num + 1 >= list->max) {
89 newmax = list->max + 10;
90 newlist = realloc(list->list, newmax * sizeof (char *));
93 list->max = newmax;
94 list->list = newlist;
100 list->list[list->num++] = newstr;
101 list->list[list->num] = NULL;
171 fprintf(stderr, gettext("Can not initialize list %d\n"), code);
179 fprintf(stderr, gettext("Can not add to list "
184 fprintf(stderr, gettext("Couldn't parse kdc list %d\n"),