From 813f039a143b06523df812bf425d4bf328343112 Mon Sep 17 00:00:00 2001 From: Mehdi Abaakouk Date: Thu, 15 Nov 2018 14:50:17 +0100 Subject: [PATCH] imap: rename ImapMailboxData to ImapMboxData --- imap/browse.c | 4 ++-- imap/command.c | 2 +- imap/imap.c | 18 +++++++++--------- imap/imap_private.h | 10 +++++----- imap/message.c | 2 +- imap/util.c | 22 +++++++++++----------- 6 files changed, 29 insertions(+), 29 deletions(-) diff --git a/imap/browse.c b/imap/browse.c index 721cf4757..797c14a2f 100644 --- a/imap/browse.c +++ b/imap/browse.c @@ -367,7 +367,7 @@ fail: int imap_mailbox_create(const char *path) { struct ImapAccountData *adata = NULL; - struct ImapMailboxData *mdata = NULL; + struct ImapMboxData *mdata = NULL; char name[LONG_STRING]; short n; @@ -419,7 +419,7 @@ err: int imap_mailbox_rename(const char *path) { struct ImapAccountData *adata = NULL; - struct ImapMailboxData *mdata = NULL; + struct ImapMboxData *mdata = NULL; char buf[PATH_MAX]; char newname[PATH_MAX]; diff --git a/imap/command.c b/imap/command.c index 09a33f9eb..cf1438b5e 100644 --- a/imap/command.c +++ b/imap/command.c @@ -869,7 +869,7 @@ static void cmd_parse_status(struct ImapAccountData *adata, char *s) struct ImapAccountData *m_adata = imap_adata_get(np->m); if (imap_account_match(&adata->conn_account, &m_adata->conn_account)) { - struct ImapMailboxData *mdata = imap_mdata_get(np->m); + struct ImapMboxData *mdata = imap_mdata_get(np->m); if (mdata && imap_mxcmp(mailbox, mdata->name) == 0) { mutt_debug(3, "Found %s in mailbox list (OV: %u ON: %u U: %d)\n", diff --git a/imap/imap.c b/imap/imap.c index 3816c78fa..543087b30 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -340,7 +340,7 @@ int imap_prepare_mailbox(struct Mailbox *m) if (!m || !m->account) return -1; - struct ImapMailboxData *mdata; + struct ImapMboxData *mdata; struct ImapAccountData *adata = m->account->adata; mutt_account_hook(m->realpath); @@ -674,7 +674,7 @@ int imap_create_mailbox(struct ImapAccountData *adata, char *mailbox) int imap_access(const char *path) { struct ImapAccountData *adata = NULL; - struct ImapMailboxData *mdata = NULL; + struct ImapMboxData *mdata = NULL; int rc; if (imap_adata_find(path, &adata, &mdata) < 0) @@ -1351,7 +1351,7 @@ int imap_check(struct ImapAccountData *adata, bool force) int imap_mailbox_check(struct Mailbox *m, bool check_stats) { struct ImapAccountData *adata = NULL; - struct ImapMailboxData *mdata = NULL; + struct ImapMboxData *mdata = NULL; char command[LONG_STRING * 2]; if (imap_prepare_mailbox(m)) @@ -1421,7 +1421,7 @@ int imap_status(const char *path, bool queue) static int queued = 0; struct ImapAccountData *adata = NULL; - struct ImapMailboxData *mdata = NULL; + struct ImapMboxData *mdata = NULL; char buf[LONG_STRING * 2]; struct ImapStatus *status = NULL; @@ -1594,7 +1594,7 @@ int imap_search(struct Mailbox *m, const struct Pattern *pat) int imap_subscribe(char *path, bool subscribe) { struct ImapAccountData *adata = NULL; - struct ImapMailboxData *mdata = NULL; + struct ImapMboxData *mdata = NULL; char buf[LONG_STRING * 2]; char mbox[LONG_STRING]; char errstr[STRING]; @@ -1652,7 +1652,7 @@ int imap_subscribe(char *path, bool subscribe) int imap_complete(char *buf, size_t buflen, char *path) { struct ImapAccountData *adata = NULL; - struct ImapMailboxData *mdata = NULL; + struct ImapMboxData *mdata = NULL; char tmp[LONG_STRING * 2]; struct ImapList listresp; char completion[LONG_STRING]; @@ -1738,7 +1738,7 @@ int imap_fast_trash(struct Mailbox *m, char *dest) struct ImapAccountData *adata = imap_adata_get(m); struct ImapAccountData *dest_adata = NULL; - struct ImapMailboxData *dest_mdata = NULL; + struct ImapMboxData *dest_mdata = NULL; if (imap_adata_find(dest, &dest_adata, &dest_mdata) < 0) return -1; @@ -2176,7 +2176,7 @@ static int imap_mbox_open(struct Context *ctx) return -1; struct ImapAccountData *adata = m->account->adata; - struct ImapMailboxData *mdata = m->mdata; + struct ImapMboxData *mdata = m->mdata; FREE(&(adata->mbox_name)); adata->mbox_name = mutt_str_strdup(mdata->name); @@ -2420,7 +2420,7 @@ static int imap_mbox_open_append(struct Mailbox *m, int flags) return -1; struct ImapAccountData *adata = m->account->adata; - struct ImapMailboxData *mdata = m->mdata; + struct ImapMboxData *mdata = m->mdata; rc = imap_access2(adata, mdata->name); if (rc == 0) diff --git a/imap/imap_private.h b/imap/imap_private.h index 4beab47fc..87f4bed20 100644 --- a/imap/imap_private.h +++ b/imap/imap_private.h @@ -274,11 +274,11 @@ struct ImapAccountData }; /** - * struct ImapMailboxData - IMAP-specific Mailbox data + * struct ImapMboxData - IMAP-specific Mailbox data * * This data is specific to a Mailbox of an IMAP server */ -struct ImapMailboxData +struct ImapMboxData { char *name; char *munge_name; @@ -317,7 +317,7 @@ int imap_login(struct ImapAccountData *adata); void imap_logout(struct ImapAccountData **adata); int imap_sync_message_for_copy(struct ImapAccountData *adata, struct Email *e, struct Buffer *cmd, int *err_continue); bool imap_has_flag(struct ListHead *flag_list, const char *flag); -int imap_adata_find(const char *path, struct ImapAccountData **adata, struct ImapMailboxData **mdata); +int imap_adata_find(const char *path, struct ImapAccountData **adata, struct ImapMboxData **mdata); /* auth.c */ int imap_authenticate(struct ImapAccountData *adata); @@ -346,7 +346,7 @@ int imap_msg_commit(struct Mailbox *m, struct Message *msg); /* util.c */ struct ImapAccountData *imap_adata_get(struct Mailbox *m); -struct ImapMailboxData *imap_mdata_get(struct Mailbox *m); +struct ImapMboxData *imap_mdata_get(struct Mailbox *m); #ifdef USE_HCACHE header_cache_t *imap_hcache_open(struct ImapAccountData *adata, const char *path); void imap_hcache_close(struct ImapAccountData *adata); @@ -362,7 +362,7 @@ int imap_continue(const char *msg, const char *resp); void imap_error(const char *where, const char *msg); struct ImapAccountData *imap_adata_new(void); void imap_adata_free(void **ptr); -struct ImapMailboxData *imap_mdata_new(struct ImapAccountData *adata, const char* name); +struct ImapMboxData *imap_mdata_new(struct ImapAccountData *adata, const char* name); void imap_mdata_free(void **ptr); char *imap_fix_path(struct ImapAccountData *adata, const char *mailbox, char *path, size_t plen); void imap_cachepath(struct ImapAccountData *adata, const char *mailbox, char *dest, size_t dlen); diff --git a/imap/message.c b/imap/message.c index a080af495..4b753bd80 100644 --- a/imap/message.c +++ b/imap/message.c @@ -1391,7 +1391,7 @@ int imap_append_message(struct Mailbox *m, struct Message *msg) int rc; struct ImapAccountData *adata = imap_adata_get(m); - struct ImapMailboxData *mdata = imap_mdata_get(m); + struct ImapMboxData *mdata = imap_mdata_get(m); fp = fopen(msg->path, "r"); if (!fp) diff --git a/imap/util.c b/imap/util.c index e3a2fe0e3..316872955 100644 --- a/imap/util.c +++ b/imap/util.c @@ -127,7 +127,7 @@ struct ImapAccountData *imap_adata_get(struct Mailbox *m) * imap_adata_find - Find the Account data for this path */ int imap_adata_find(const char *path, struct ImapAccountData **adata, - struct ImapMailboxData **mdata) + struct ImapMboxData **mdata) { struct ConnAccount conn_account; struct ImapAccountData *tmp_adata; @@ -155,13 +155,13 @@ int imap_adata_find(const char *path, struct ImapAccountData **adata, } /** - * imap_mdata_new - Allocate and initialise a new ImapMailboxData structure - * @retval ptr New ImapMailboxData + * imap_mdata_new - Allocate and initialise a new ImapMboxData structure + * @retval ptr New ImapMboxData */ -struct ImapMailboxData *imap_mdata_new(struct ImapAccountData *adata, const char *name) +struct ImapMboxData *imap_mdata_new(struct ImapAccountData *adata, const char *name) { char buf[LONG_STRING]; - struct ImapMailboxData *mdata = mutt_mem_calloc(1, sizeof(struct ImapMailboxData)); + struct ImapMboxData *mdata = mutt_mem_calloc(1, sizeof(struct ImapMboxData)); mdata->real_name = mutt_str_strdup(name); @@ -177,7 +177,7 @@ struct ImapMailboxData *imap_mdata_new(struct ImapAccountData *adata, const char } /** - * imap_mdata_free - Release and clear storage in an ImapMailboxData structure + * imap_mdata_free - Release and clear storage in an ImapMboxData structure * @param ptr Imap Mailbox data */ void imap_mdata_free(void **ptr) @@ -185,7 +185,7 @@ void imap_mdata_free(void **ptr) if (!ptr || !*ptr) return; - struct ImapMailboxData *mdata = *ptr; + struct ImapMboxData *mdata = *ptr; FREE(&mdata->name); FREE(&mdata->real_name); @@ -196,7 +196,7 @@ void imap_mdata_free(void **ptr) /** * imap_mdata_get - Get the Mailbox data for this mailbox */ -struct ImapMailboxData *imap_mdata_get(struct Mailbox *m) +struct ImapMboxData *imap_mdata_get(struct Mailbox *m) { if (!m || (m->magic != MUTT_IMAP) || !m->mdata) return NULL; @@ -259,7 +259,7 @@ void imap_get_parent(const char *mbox, char delim, char *buf, size_t buflen) void imap_get_parent_path(const char *path, char *buf, size_t buflen) { struct ImapAccountData *adata = NULL; - struct ImapMailboxData *mdata = NULL; + struct ImapMboxData *mdata = NULL; char mbox[LONG_STRING]; if (imap_adata_find(path, &adata, &mdata) < 0) @@ -286,7 +286,7 @@ void imap_get_parent_path(const char *path, char *buf, size_t buflen) void imap_clean_path(char *path, size_t plen) { struct ImapAccountData *adata = NULL; - struct ImapMailboxData *mdata = NULL; + struct ImapMboxData *mdata = NULL; if (imap_adata_find(path, &adata, &mdata) < 0) return; @@ -383,7 +383,7 @@ header_cache_t *imap_hcache_open(struct ImapAccountData *adata, const char *path imap_cachepath(adata, path, mbox, sizeof(mbox)); else if (adata->mailbox) { - struct ImapMailboxData *mdata = imap_mdata_get(adata->mailbox); + struct ImapMboxData *mdata = imap_mdata_get(adata->mailbox); imap_cachepath(adata, mdata->name, mbox, sizeof(mbox)); } else -- 2.49.0