Home | History | Annotate | Download | only in e2fsck

Lines Matching full:list

8  * list of sections or relations, or accessing multiple values from a
31 * internal functions used to build up a null-terminated char ** list
35 * purposes to build up the list, which is returned in *ret_list by
38 * The publicly exported interface for freeing char** list is
43 char **list;
49 * Initialize the string list abstraction.
51 static errcode_t init_list(struct profile_string_list *list)
53 list->num = 0;
54 list->max = 10;
55 list->list = malloc(list->max * sizeof(char *));
56 if (list->list == 0)
58 list->list[0] = 0;
64 * built up list in *ret_list if it is non-null.
66 static void end_list(struct profile_string_list *list, char ***ret_list)
70 if (list == 0)
74 *ret_list = list->list;
77 for (cp = list->list; *cp; cp++)
79 free(list->list);
81 list->num = list->max = 0;
82 list->list = 0;
86 * Add a string to the list.
88 static errcode_t add_to_list(struct profile_string_list *list, char *str)
93 if (list->num+1 >= list->max) {
94 newmax = list->max + 10;
95 newlist = realloc(list->list, newmax * sizeof(char *));
98 list->max = newmax;
99 list->list = newlist;
102 list->list[list->num++] = str;
103 list->list[list->num] = 0;
108 * Return TRUE if the string is already a member of the list.
110 static int is_list_member(struct profile_string_list *list, const char *str)
114 if (!list->list)
117 for (cpp = list->list; *cpp; cpp++) {
125 * This function frees a null-terminated list as returned by
128 void profile_free_list(char **list)
132 if (list == 0)
135 for (cp = list; *cp; cp++)
137 free(list);
178 * This function will return the list of the names of subections in the
214 * This function will return the list of the names of relations in the