Lines Matching refs:list
2399 char **list, *match, *a, *b; in rl_completion_matches() local
2403 if ((list = el_calloc(max, sizeof(*list))) == NULL) in rl_completion_matches()
2407 list[len++] = match; in rl_completion_matches()
2411 if ((nl = el_realloc(list, max * sizeof(*nl))) == NULL) in rl_completion_matches()
2413 list = nl; in rl_completion_matches()
2418 list[len] = NULL; in rl_completion_matches()
2420 if ((list[0] = strdup(list[1])) == NULL) in rl_completion_matches()
2422 return list; in rl_completion_matches()
2424 qsort(&list[1], len - 1, sizeof(*list), in rl_completion_matches()
2427 for (i = 1, a = list[i]; i < len - 1; i++, a = b) { in rl_completion_matches()
2428 b = list[i + 1]; in rl_completion_matches()
2435 if ((list[0] = strdup(str)) == NULL) in rl_completion_matches()
2438 if ((list[0] = el_calloc(min + 1, sizeof(*list[0]))) == NULL) in rl_completion_matches()
2440 (void)memcpy(list[0], list[1], min); in rl_completion_matches()
2441 list[0][min] = '\0'; in rl_completion_matches()
2443 return list; in rl_completion_matches()
2446 el_free(list); in rl_completion_matches()