From: pdmef Date: Thu, 16 Jun 2005 12:04:04 +0000 (+0000) Subject: Rocco Rutte: X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=commitdiff_plain;h=babaee2b3c92746ec5bd6914222dd9a9eda67285 Rocco Rutte: - remove pine compatible naming scheme for IMAP folders (as announced in and ) git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@314 e385b8ad-14ed-0310-8656-cc95a2468c6d --- diff --git a/Makefile.am b/Makefile.am index 8fae87c..4868653 100644 --- a/Makefile.am +++ b/Makefile.am @@ -88,7 +88,7 @@ EXTRA_DIST = COPYRIGHT GPL OPS OPS.PGP OPS.CRYPT OPS.SMIME TODO \ mbyte.h lib.h extlib.c pgpewrap.c smime_keys.pl pgplib.h Muttngrc.head Muttngrc \ makedoc.c stamp-doc-rc README.SSL smime.h\ muttngbug pgppacket.h depcomp ascii.h BEWARE PATCHES patchlist.sh \ - ChangeLog.old mkchangelog.sh cvslog2changelog.pl mutt_idna.h \ + mkchangelog.sh cvslog2changelog.pl mutt_idna.h \ snprintf.c regex.c mutt_libesmtp.h crypt-gpgme.h muttng_dotlock_SOURCES = mutt_dotlock.c diff --git a/UPGRADING b/UPGRADING index 575ef2e..fe915a3 100644 --- a/UPGRADING +++ b/UPGRADING @@ -10,6 +10,11 @@ This document is not the place for verbose documentation; it only offers the necessary keywords to look them up in the manual, ChangeLog or other sources of information. +2005-06-16: + + Pine compatibility for naming IMAP mailboxes has been removed, only + the common imap[s]:// syntax remains. + 2005-05-17: Changes due to better integration of qdbm support w/ header caching: diff --git a/doc/Makefile.in b/doc/Makefile.in index c46de18..b3816ea 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -61,8 +61,7 @@ srcdir_DOCFILES = PGP-Notes.txt applying-patches.txt \ topsrcdir_DOCFILES = COPYRIGHT GPL INSTALL ChangeLog \ - ChangeLog.old ChangeLog.mutt-ng UPGRADING \ - README NEWS TODO TODO.mutt-ng README.SECURITY README.SSL + UPGRADING README NEWS TODO TODO.mutt-ng README.SSL all: muttrc.man try-html try-txt diff --git a/imap/mx_imap.c b/imap/mx_imap.c index b44f9e1..2675dff 100644 --- a/imap/mx_imap.c +++ b/imap/mx_imap.c @@ -24,8 +24,6 @@ int imap_is_magic (const char* path, struct stat* st) { url_scheme_t s; if (!path || !*path) return (-1); - if (*path == '{') /* painpine compatibility */ - return (M_IMAP); s = url_check_scheme (NONULL (path)); return ((s == U_IMAP || s == U_IMAPS) ? M_IMAP : -1); } diff --git a/imap/util.c b/imap/util.c index 328a86e..2893f4f 100644 --- a/imap/util.c +++ b/imap/util.c @@ -69,10 +69,8 @@ int imap_parse_path (const char *path, IMAP_MBOX * mx) static unsigned short ImapPort = 0; static unsigned short ImapsPort = 0; struct servent *service; - char tmp[128]; ciss_url_t url; char *c; - int n; if (!ImapPort) { service = getservbyname ("imap", "tcp"); @@ -98,59 +96,19 @@ int imap_parse_path (const char *path, IMAP_MBOX * mx) c = safe_strdup (path); url_parse_ciss (&url, c); - if (url.scheme == U_IMAP || url.scheme == U_IMAPS) { - if (mutt_account_fromurl (&mx->account, &url) < 0) { - FREE (&c); - return -1; - } - - mx->mbox = safe_strdup (url.path); - - if (url.scheme == U_IMAPS) - mx->account.flags |= M_ACCT_SSL; + if (!(url.scheme == U_IMAP || url.scheme == U_IMAPS) || + mutt_account_fromurl (&mx->account, &url) < 0) { FREE (&c); + return -1; } - /* old PINE-compatibility code */ - else { - FREE (&c); - if (sscanf (path, "{%127[^}]}", tmp) != 1) - return -1; - c = strchr (path, '}'); - if (!c) - return -1; - else - /* walk past closing '}' */ - mx->mbox = safe_strdup (c + 1); - - if ((c = strrchr (tmp, '@'))) { - *c = '\0'; - strfcpy (mx->account.user, tmp, sizeof (mx->account.user)); - strfcpy (tmp, c + 1, sizeof (tmp)); - mx->account.flags |= M_ACCT_USER; - } + mx->mbox = safe_strdup (url.path); - if ((n = sscanf (tmp, "%127[^:/]%127s", mx->account.host, tmp)) < 1) { - debug_print (1, ("NULL host in %s\n", path)); - FREE (&mx->mbox); - return -1; - } + if (url.scheme == U_IMAPS) + mx->account.flags |= M_ACCT_SSL; - if (n > 1) { - if (sscanf (tmp, ":%hu%127s", &(mx->account.port), tmp) >= 1) - mx->account.flags |= M_ACCT_PORT; - if (sscanf (tmp, "/%s", tmp) == 1) { - if (!ascii_strncmp (tmp, "ssl", 3)) - mx->account.flags |= M_ACCT_SSL; - else { - debug_print (1, ("Unknown connection type in %s\n", path)); - FREE (&mx->mbox); - return -1; - } - } - } - } + FREE (&c); #if defined(USE_SSL) || defined(USE_GNUTLS) if (option (OPTIMAPFORCESSL)) diff --git a/muttlib.c b/muttlib.c index 27b73f2..0b0530a 100644 --- a/muttlib.c +++ b/muttlib.c @@ -362,10 +362,9 @@ char *_mutt_expand_path (char *s, size_t slen, int rx) case '+': { #ifdef USE_IMAP - /* if folder = {host} or imap[s]://host/: don't append slash */ - if (imap_is_magic (NONULL (Maildir), NULL) == M_IMAP && - (Maildir[safe_strlen (Maildir) - 1] == '}' || - Maildir[safe_strlen (Maildir) - 1] == '/')) + /* if folder = imap[s]://host/: don't append slash */ + if (imap_is_magic (NONULL (Maildir), NULL) == M_IMAP && + Maildir[safe_strlen (Maildir) - 1] == '/') strfcpy (p, NONULL (Maildir), sizeof (p)); else #endif @@ -457,13 +456,6 @@ char *_mutt_expand_path (char *s, size_t slen, int rx) } while (recurse); -#ifdef USE_IMAP - /* Rewrite IMAP path in canonical form - aids in string comparisons of - * folders. May possibly fail, in which case s should be the same. */ - if (imap_is_magic (s, NULL) == M_IMAP) - imap_expand_path (s, slen); -#endif - return (s); }