Home | History | Annotate | Download | only in libedit

Lines Matching defs:matches

472 	size_t matches;
474 matches = 0;
476 while ((retstr = (*genfunc) (text, (int)matches)) != NULL) {
478 if (matches + 3 >= match_list_len) {
480 while (matches + 3 >= match_list_len)
491 match_list[++matches] = retstr;
501 for (; which <= matches; which++) {
517 match_list[matches + 1] = NULL;
536 * 'matches' is list of strings, 'num' is number of strings in 'matches',
537 * 'width' is maximum length of string in 'matches'.
539 * matches[0] is not one of the match strings, but it is counted in
540 * num, so the strings are matches[1] *through* matches[num-1].
543 fn_display_match_list(EditLine * el, char **matches, size_t num, size_t width,
551 /* Ignore matches[0]. Avoid 1-based array logic below. */
552 matches++;
567 qsort(matches, num, sizeof(char *), _fn_qsort_string_compare);
578 col == 0 ? "" : " ", matches[thisguy],
579 (*app_func)(matches[thisguy]));
581 (int) (width - strlen(matches[thisguy])), "");
670 char **matches;
704 matches = (*attempted_completion_function)(
708 matches = NULL;
710 (over != NULL && !*over && !matches))
711 matches = completion_matches(
717 if (matches == NULL) {
722 int single_match = matches[2] == NULL &&
723 (matches[1] == NULL || strcmp(matches[0], matches[1]) == 0);
727 if (matches[0][0] != '\0') {
730 completion = escape_filename(el, matches[0],
733 completion = strdup(matches[0]);
739 * all possible matches if there is a possible completion.
763 * matches.
766 for(i = 1, maxlen = 0; matches[i]; i++) {
767 match_len = strlen(matches[i]);
771 /* matches[1] through matches[i-1] are available */
794 * strings be matches[1..num-1] for compat.
796 * the prefix in matches[0], so we need to
799 fn_display_match_list(el, matches,
803 } else if (matches[0][0]) {
819 for (i = 0; matches[i]; i++)
820 el_free(matches[i]);
821 el_free(matches);
822 matches = NULL;