Lines Matching full:words

77  * Otherwise, list choices. words is assumed to be filtered
82 * words stringlist containing possible matches
86 complete_ambiguous(char *word, int list, StringList *words) in complete_ambiguous() argument
94 if (words->sl_cur == 0) in complete_ambiguous()
97 if (words->sl_cur == 1) { /* only once choice available */ in complete_ambiguous()
98 p = words->sl_str[0] + wordlen; in complete_ambiguous()
110 lastmatch = words->sl_str[0]; in complete_ambiguous()
112 for (i = 1 ; i < words->sl_cur ; i++) { in complete_ambiguous()
113 for (j = wordlen ; j < strlen(words->sl_str[i]); j++) in complete_ambiguous()
114 if (lastmatch[j] != words->sl_str[i][j]) in complete_ambiguous()
130 qsort(words->sl_str, words->sl_cur, sizeof(char *), comparstr); in complete_ambiguous()
131 list_vertical(words); in complete_ambiguous()
142 StringList *words; in complete_command() local
146 words = ftp_sl_init(); in complete_command()
153 ftp_sl_add(words, ftp_strdup(c->c_name)); in complete_command()
156 rv = complete_ambiguous(word, list, words); in complete_command()
161 sl_free(words, 1); in complete_command()
171 StringList *words; in complete_local() local
203 words = ftp_sl_init(); in complete_local()
221 ftp_sl_add(words, tcp); in complete_local()
226 rv = complete_ambiguous(file, list, words); in complete_local()
233 (void)strlcat(path, words->sl_str[0], sizeof(path)); in complete_local()
244 sl_free(words, 1); in complete_local()
254 StringList *words; in complete_option() local
258 words = ftp_sl_init(); in complete_option()
265 ftp_sl_add(words, ftp_strdup(o->name)); in complete_option()
268 rv = complete_ambiguous(word, list, words); in complete_option()
273 sl_free(words, 1); in complete_option()
285 StringList *words; in complete_remote() local
343 words = ftp_sl_init(); in complete_remote()
349 ftp_sl_add(words, cp); in complete_remote()
351 rv = complete_ambiguous(file, list, words); in complete_remote()
352 sl_free(words, 0); in complete_remote()