X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-ui%2Fcomplete.c;h=aa51e5b3c88301623ca966e333f4c99f12d85f37;hp=e337e1e0be82d73f8d847117e8df78af93106d5d;hb=3438f31945bb94bc4f4b9603ac47fcde03d5c073;hpb=a30218f8b3d68023d354d75b7c4674ae0c528f28 diff --git a/lib-ui/complete.c b/lib-ui/complete.c index e337e1e..aa51e5b 100644 --- a/lib-ui/complete.c +++ b/lib-ui/complete.c @@ -7,15 +7,11 @@ * please see the file GPL in the top level source directory. */ -#include +#include #include #include "mutt.h" -#include "curses.h" #include -#ifdef USE_NNTP -#include "nntp.h" -#endif /* given a partial pathname, this routine fills in as much of the rest of the * path as is unique. @@ -34,50 +30,6 @@ int mutt_complete (char *s, ssize_t slen) char imap_path[LONG_STRING]; -#ifdef USE_NNTP - if (option (OPTNEWS)) { - nntp_data_t *l = CurrentNewsSrv->list; - - m_strcpy(filepart, sizeof(filepart), s); - - /* - * special case to handle when there is no filepart yet. - * find the first subscribed newsgroup - */ - if ((len = m_strlen(filepart)) == 0) { - for (; l; l = l->next) { - if (l->subscribed) { - m_strcpy(filepart, sizeof(filepart), l->group); - init++; - l = l->next; - break; - } - } - } - - for (; l; l = l->next) { - if (l->subscribed && m_strncmp(l->group, filepart, len) == 0) { - if (init) { - for (i = 0; filepart[i] && l->group[i]; i++) { - if (filepart[i] != l->group[i]) { - filepart[i] = 0; - break; - } - } - filepart[i] = 0; - } else { - m_strcpy(filepart, sizeof(filepart), l->group); - init = 1; - } - } - } - - m_strcpy(s, slen, filepart); - - return (init ? 0 : -1); - } -#endif - /* we can use '/' as a delimiter, imap_complete rewrites it */ if (*s == '=' || *s == '+' || *s == '!') { const char *q = NONULL(*s == '!' ? Spoolfile : Maildir);