Lines Matching full:matches

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