Lines Matching defs:words
70 * Otherwise, list choices. words is assumed to be filtered
75 * words stringlist containing possible matches
79 complete_ambiguous(char *word, int list, StringList *words)
87 if (words->sl_cur == 0)
90 if (words->sl_cur == 1) { /* only once choice available */
91 p = words->sl_str[0] + wordlen;
102 lastmatch = words->sl_str[0];
104 for (i = 1 ; i < words->sl_cur ; i++) {
105 for (j = wordlen; j < strlen(words->sl_str[i]); j++)
106 if (lastmatch[j] != words->sl_str[i][j])
122 qsort(words->sl_str, words->sl_cur, sizeof(char *), comparstr);
123 list_vertical(words);
134 StringList *words;
138 words = ftp_sl_init();
145 ftp_sl_add(words, ftp_strdup(c->c_name));
148 rv = complete_ambiguous(word, list, words);
153 sl_free(words, 1);
163 StringList *words;
195 words = ftp_sl_init();
213 ftp_sl_add(words, tcp);
218 rv = complete_ambiguous(file, list, words);
225 (void)strlcat(path, words->sl_str[0], sizeof(path));
236 sl_free(words, 1);
246 StringList *words;
250 words = ftp_sl_init();
257 ftp_sl_add(words, ftp_strdup(o->name));
260 rv = complete_ambiguous(word, list, words);
265 sl_free(words, 1);
277 StringList *words;
335 words = ftp_sl_init();
341 ftp_sl_add(words, cp);
343 rv = complete_ambiguous(file, list, words);
344 sl_free(words, 0);