Lines Matching +full:num +full:- +full:strings
3 /*-
58 * does tilde expansion of strings of type ``~user/foo''
86 len = (size_t)(pos - txt + 1); in fn_tilde_expand()
90 (void)strlcpy(temp, txt + 1, len - 1); in fn_tilde_expand()
120 len = strlen(pass->pw_dir) + 1 + strlen(txt) + 1; in fn_tilde_expand()
124 (void)snprintf(temp, len, "%s/%s", pass->pw_dir, txt); in fn_tilde_expand()
207 wchar_t *temp = el->el_line.buffer; in escape_filename()
213 while (temp != el->el_line.cursor) { in escape_filename()
219 (temp == el->el_line.buffer || temp[-1] != '\\')) in escape_filename()
349 len = (size_t)(pos - text); /* including last slash */ in fn_filename_completion_function()
405 if (entry->d_name[0] == '.' && (!entry->d_name[1] in fn_filename_completion_function()
406 || (entry->d_name[1] == '.' && !entry->d_name[2]))) in fn_filename_completion_function()
412 if (entry->d_name[0] == filename[0] in fn_filename_completion_function()
414 && entry->d_namlen >= filename_len in fn_filename_completion_function()
416 && strlen(entry->d_name) >= filename_len in fn_filename_completion_function()
418 && strncmp(entry->d_name, filename, in fn_filename_completion_function()
426 len = entry->d_namlen; in fn_filename_completion_function()
428 len = strlen(entry->d_name); in fn_filename_completion_function()
435 (void)snprintf(temp, len, "%s%s", dirname, entry->d_name); in fn_filename_completion_function()
453 if (stat(expname ? expname : name, &stbuf) == -1) in append_char_function()
464 * non-static for readline.
535 * Display list of strings in columnar format on readline's output stream.
536 * 'matches' is list of strings, 'num' is number of strings 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
547 int screenwidth = el->el_terminal.t_size.h; in fn_display_match_list()
551 /* Ignore matches[0]. Avoid 1-based array logic below. */ in fn_display_match_list()
553 num--; in fn_display_match_list()
557 * with one space between strings the same way it's printed. in fn_display_match_list()
564 lines = (num + cols - 1) / cols; in fn_display_match_list()
567 qsort(matches, num, sizeof(char *), _fn_qsort_string_compare); in fn_display_match_list()
575 if (thisguy >= num) in fn_display_match_list()
577 (void)fprintf(el->el_outfile, "%s%s%s", in fn_display_match_list()
580 (void)fprintf(el->el_outfile, "%-*s", in fn_display_match_list()
581 (int) (width - strlen(matches[thisguy])), ""); in fn_display_match_list()
583 (void)fprintf(el->el_outfile, "\n"); in fn_display_match_list()
601 switch (ctemp[-1]) { in find_word_to_complete()
605 ctemp--; in find_word_to_complete()
615 if (ctemp - buffer >= 2 && ctemp[-2] == '\\' && in find_word_to_complete()
616 needs_escaping(ctemp[-1])) { in find_word_to_complete()
617 ctemp -= 2; in find_word_to_complete()
620 if (wcschr(word_break, ctemp[-1])) in find_word_to_complete()
622 if (special_prefixes && wcschr(special_prefixes, ctemp[-1])) in find_word_to_complete()
624 ctemp--; in find_word_to_complete()
627 len = (size_t) (cursor - ctemp); in find_word_to_complete()
677 if (el->el_state.lastcmd == el->el_state.thiscmd) in fn_complete2()
690 temp = find_word_to_complete(li->cursor, in fn_complete2()
691 li->buffer, word_break, special_prefixes, &len, do_unescape); in fn_complete2()
698 *point = (int)(li->cursor - li->buffer); in fn_complete2()
700 *end = (int)(li->lastchar - li->buffer); in fn_complete2()
703 int cur_off = (int)(li->cursor - li->buffer); in fn_complete2()
705 ct_encode_string(temp, &el->el_scratch), in fn_complete2()
706 cur_off - (int)len, cur_off); in fn_complete2()
712 ct_encode_string(temp, &el->el_scratch), complete_func); in fn_complete2()
742 ct_decode_string(completion, &el->el_scratch)); in fn_complete2()
754 (*app_func)(completion), &el->el_scratch)); in fn_complete2()
771 /* matches[1] through matches[i-1] are available */ in fn_complete2()
772 matches_num = (size_t)(i - 1); in fn_complete2()
775 (void)fprintf(el->el_outfile, "\n"); in fn_complete2()
782 (void)fprintf(el->el_outfile, in fn_complete2()
785 (void)fflush(el->el_outfile); in fn_complete2()
788 (void)fprintf(el->el_outfile, "\n"); in fn_complete2()
794 * strings be matches[1..num-1] for compat. in fn_complete2()
795 * We have matches_num strings not counting in fn_complete2()
811 /* lcd is not a valid object - further specification */ in fn_complete2()
844 * el-compatible wrapper around rl_complete; needed for key binding
856 * el-compatible wrapper around rl_complete; needed for key binding