Rocco Rutte:
authorpdmef <pdmef@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Thu, 16 Jun 2005 12:04:04 +0000 (12:04 +0000)
committerpdmef <pdmef@e385b8ad-14ed-0310-8656-cc95a2468c6d>
Thu, 16 Jun 2005 12:04:04 +0000 (12:04 +0000)
- remove pine compatible naming scheme for IMAP folders (as announced in <https://lists.berlios.de/pipermail/mutt-ng-users/2005-April/000095.html> and <https://lists.berlios.de/pipermail/mutt-ng-devel/2005-April/000536.html>)

git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@314 e385b8ad-14ed-0310-8656-cc95a2468c6d

Makefile.am
UPGRADING
doc/Makefile.in
imap/mx_imap.c
imap/util.c
muttlib.c

index 8fae87c..4868653 100644 (file)
@@ -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
index 575ef2e..fe915a3 100644 (file)
--- 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:
index c46de18..b3816ea 100644 (file)
@@ -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
 
index b44f9e1..2675dff 100644 (file)
@@ -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 == '{')     /* pain\17pine compatibility */
-    return (M_IMAP);
   s = url_check_scheme (NONULL (path));
   return ((s == U_IMAP || s == U_IMAPS) ? M_IMAP : -1);
 }
index 328a86e..2893f4f 100644 (file)
@@ -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))
index 27b73f2..0b0530a 100644 (file)
--- 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);
 }