]> granicus.if.org Git - neomutt/commitdiff
imap: remove ImapMbox and imap_parse_path()
authorMehdi Abaakouk <sileht@sileht.net>
Wed, 14 Nov 2018 08:47:28 +0000 (09:47 +0100)
committerRichard Russon <rich@flatcap.org>
Thu, 15 Nov 2018 00:26:28 +0000 (00:26 +0000)
imap/imap.c
imap/imap.h
imap/imap_private.h
imap/util.c

index 7e5a00982b2541f72633324b29f83bbe1626d1d2..b0f9d926ecaa165e401592987bbf6849afe3d407 100644 (file)
@@ -2073,9 +2073,6 @@ int imap_ac_add(struct Account *a, struct Mailbox *m)
   if (m->magic != MUTT_IMAP)
     return -1;
 
-  // NOTE(sileht): The goal is to use ImapMbox and imap_parse_path() only here
-  // So we can remove it at this end.
-
   if (!a->adata)
   {
     struct ConnAccount *conn_account = mutt_mem_calloc(1, sizeof(struct ConnAccount));
index 96d37b657b38b476c93b5589e66b864a896b6a8d..4ffda85e78a68cd8eb1b0696962a1c77a8f7fcb0 100644 (file)
@@ -75,15 +75,6 @@ extern bool ImapServernoise;
 extern char *ImapDelimChars;
 extern short ImapPipelineDepth;
 
-/**
- * struct ImapMbox - An IMAP mailbox
- */
-struct ImapMbox
-{
-  struct ConnAccount account;
-  char *mbox;
-};
-
 /* imap.c */
 int imap_access(const char *path);
 int imap_check_mailbox(struct Mailbox *m, bool force);
@@ -112,7 +103,6 @@ int imap_copy_messages(struct Context *ctx, struct Email *e, char *dest, bool de
 void imap_logout_all(void);
 
 /* util.c */
-int imap_parse_path(const char *path, struct ImapMbox *mx);
 int imap_parse_path2(const char *path, struct ConnAccount *account, char *mailbox, size_t mailboxlen);
 void imap_pretty_mailbox(char *path, const char *folder);
 
index b8791a468bb4f05206634e5e2e2388be267b483e..9a61329a63646e92849a5a8c3a63efb8fc040e63 100644 (file)
@@ -37,7 +37,6 @@
 struct Context;
 struct Email;
 struct ImapEmailData;
-struct ImapMbox;
 struct Mailbox;
 struct Message;
 struct Progress;
@@ -371,7 +370,6 @@ int imap_get_literal_count(const char *buf, unsigned int *bytes);
 char *imap_get_qualifier(char *buf);
 int imap_mxcmp(const char *mx1, const char *mx2);
 char *imap_next_word(char *s);
-void imap_qualify_path(char *buf, size_t buflen, struct ImapMbox *mx, char *path);
 void imap_qualify_path2(char *buf, size_t buflen, struct ConnAccount *conn_account, char *path);
 void imap_quote_string(char *dest, size_t dlen, const char *src, bool quote_backtick);
 void imap_unquote_string(char *s);
index 13e6547761bf5a02bddd0ba04b418adf81324410..55a363c2a3a9c0858370305c4d31d70de6307991 100644 (file)
@@ -673,12 +673,6 @@ int imap_parse_path2(const char *path, struct ConnAccount *account, char *mailbo
 
   return 0;
 }
-int imap_parse_path(const char *path, struct ImapMbox *mx)
-{
-  memset(&mx->account, 0, sizeof(mx->account));
-  mx->mbox = mutt_mem_calloc(1, sizeof(char) * LONG_STRING);
-  return imap_parse_path2(path, &mx->account, mx->mbox, sizeof(char) * LONG_STRING);
-}
 
 /**
  * imap_mxcmp - Compare mailbox names, giving priority to INBOX
@@ -965,25 +959,6 @@ char *imap_next_word(char *s)
   return s;
 }
 
-/**
- * imap_qualify_path - Make an absolute IMAP folder target
- * @param buf    Buffer for the result
- * @param buflen Length of buffer
- * @param mx     Imap mailbox
- * @param path   Path relative to the mailbox
- *
- * given ImapMbox and relative path.
- */
-void imap_qualify_path(char *buf, size_t buflen, struct ImapMbox *mx, char *path)
-{
-  struct Url url;
-
-  mutt_account_tourl(&mx->account, &url);
-  url.path = path;
-
-  url_tostring(&url, buf, buflen, 0);
-}
-
 /**
  * imap_qualify_path2 - Make an absolute IMAP folder target
  * @param buf    Buffer for the result