Changeset 1111:53998cee3e2d for complete.c
- Timestamp:
- 1999-07-20 01:05:32 (9 years ago)
- Branch:
- HEAD
- Files:
-
- 1 modified
-
complete.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
complete.c
r842 r1111 18 18 19 19 #include "mutt.h" 20 #ifdef USE_IMAP 21 #include "mailbox.h" 22 #include "imap.h" 23 #endif 20 24 21 25 #include <dirent.h> … … 39 43 char dirpart[_POSIX_PATH_MAX], exp_dirpart[_POSIX_PATH_MAX]; 40 44 char filepart[_POSIX_PATH_MAX]; 45 #ifdef USE_IMAP 46 char imap_path[LONG_STRING]; 47 48 dprint (2, (debugfile, "mutt_complete: completing %s\n", s)); 49 50 /* we can use '/' as a delimiter, imap_complete rewrites it */ 51 if (*s == '=' || *s == '+') 52 { 53 if (s[1]) 54 snprintf (imap_path, sizeof(imap_path), "%s/%s", NONULL(Maildir), 55 s+1); 56 else 57 strfcpy (imap_path, NONULL(Maildir), sizeof(imap_path)); 58 } 59 else 60 { 61 strfcpy (imap_path, s, sizeof(imap_path)); 62 } 63 64 if (mx_is_imap (imap_path)) 65 { 66 return imap_complete (s, imap_path); 67 } 68 #endif 41 69 42 70 if (*s == '=' || *s == '+') … … 86 114 dirpart[0] = 0; 87 115 strfcpy (filepart, s, sizeof (filepart)); 88 #ifdef USE_IMAP 89 if (s[0] != '{') 90 #endif 91 dirp = opendir ("."); 116 dirp = opendir ("."); 92 117 } 93 118 } … … 95 120 if (dirp == NULL) 96 121 { 97 #ifdef USE_IMAP98 /* If we are trying to complete an IMAP folder, it will start with {99 * in which case, we just return 0 at this point. Eventually, we100 * might complete the actually folder name from the server101 */102 if ((s[0] == '{') || (exp_dirpart[0] == '{'))103 return 0;104 #endif105 122 dprint (1, (debugfile, "mutt_complete(): %s: %s (errno %d).\n", exp_dirpart, strerror (errno), errno)); 106 123 return (-1);
