Lines Matching +defs:values +defs:list
12 * notice, this list of conditions and the following disclaimer.
14 * notice, this list of conditions and the following disclaimer in the
58 char ** values;
84 elem_list_t list[LIST_COUNT];
101 list_push(elem_list_t *list, char *val)
103 const unsigned n = list->count;
104 char **values;
106 if ((values = calloc(n + 1, sizeof(char *))) == NULL) {
110 values[i] = list->values[i];
112 values[n] = val;
113 free(list->values);
114 list->values = values;
115 list->count++;
119 list_join_free(elem_list_t *list, const bool use_br, const char *sep)
123 if (!join(buf, sizeof(buf), list->count, list->values, sep)) {
126 easprintf(&s, (use_br && list->count > 1) ? "{ %s }" : "%s", buf);
127 for (unsigned i = 0; i < list->count; i++) {
128 free(list->values[i]);
130 free(list->values);
131 list->values = NULL;
132 list->count = 0;
399 * in into the list, merge and re-push the set into the target list.
404 target_list = mk->format ? &sublist : &ctx->list[mk->list_id];
406 /* Scan for the marks and extract the values. */
443 list_push(&ctx->list[mk->list_id], val);
462 elem_list_t *list = &ctx->list[plist];
464 if (list->count) {
465 char *elements = list_join_free(list, false, " ");
496 elem_list_t *list;
499 list = &ctx->list[refs[which].alist];
500 if (list->count != 0) {
502 elements = list_join_free(list, true, ", ");
507 list = &ctx->list[refs[which].plist];
508 if (list->count != 0) {
513 elements = list_join_free(list, true, ", ");
542 elem_list_t *list;
545 list = &ctx->list[refs[which].alist];
546 if (list->count != 0) {
548 elements = list_join_free(list, true, ", ");