From 4888a8205155e852c70f956369448001c864fc67 Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Tue, 16 May 2017 14:18:30 +0100 Subject: [PATCH] replace 'IMAP_STATUS' with 'struct ImapStatus' --- imap/command.c | 4 ++-- imap/imap.c | 16 ++++++++-------- imap/imap_private.h | 8 ++++---- imap/message.c | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/imap/command.c b/imap/command.c index 1f2a07371..6ceb96d33 100644 --- a/imap/command.c +++ b/imap/command.c @@ -487,7 +487,7 @@ static void cmd_parse_status(struct ImapData *idata, char *s) struct Buffy *inc = NULL; struct ImapMbox mx; int count; - IMAP_STATUS *status = NULL; + struct ImapStatus *status = NULL; unsigned int olduv, oldun; long litlen; short new = 0; @@ -557,7 +557,7 @@ static void cmd_parse_status(struct ImapData *idata, char *s) /* caller is prepared to handle the result herself */ if (idata->cmddata && idata->cmdtype == IMAP_CT_STATUS) { - memcpy(idata->cmddata, status, sizeof(IMAP_STATUS)); + memcpy(idata->cmddata, status, sizeof(struct ImapStatus)); return; } diff --git a/imap/imap.c b/imap/imap.c index 3e7be3d71..974257296 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -552,7 +552,7 @@ static char *imap_get_flags(struct List **hflags, char *s) static int imap_open_mailbox(struct Context *ctx) { struct ImapData *idata = NULL; - IMAP_STATUS *status = NULL; + struct ImapStatus *status = NULL; char buf[LONG_STRING]; char bufout[LONG_STRING]; int count = 0; @@ -1594,7 +1594,7 @@ int imap_status(char *path, int queue) struct ImapData *idata = NULL; char buf[LONG_STRING]; char mbox[LONG_STRING]; - IMAP_STATUS *status = NULL; + struct ImapStatus *status = NULL; if (imap_get_mailbox(path, &idata, buf, sizeof(buf)) < 0) return -1; @@ -1631,11 +1631,11 @@ int imap_status(char *path, int queue) } /* return cached mailbox stats or NULL if create is 0 */ -IMAP_STATUS *imap_mboxcache_get(struct ImapData *idata, const char *mbox, int create) +struct ImapStatus *imap_mboxcache_get(struct ImapData *idata, const char *mbox, int create) { struct List *cur = NULL; - IMAP_STATUS *status = NULL; - IMAP_STATUS scache; + struct ImapStatus *status = NULL; + struct ImapStatus scache; #ifdef USE_HCACHE header_cache_t *hc = NULL; void *uidvalidity = NULL; @@ -1644,7 +1644,7 @@ IMAP_STATUS *imap_mboxcache_get(struct ImapData *idata, const char *mbox, int cr for (cur = idata->mboxcache; cur; cur = cur->next) { - status = (IMAP_STATUS *) cur->data; + status = (struct ImapStatus *) cur->data; if (imap_mxcmp(mbox, status->name) == 0) return status; @@ -1693,11 +1693,11 @@ IMAP_STATUS *imap_mboxcache_get(struct ImapData *idata, const char *mbox, int cr void imap_mboxcache_free(struct ImapData *idata) { struct List *cur = NULL; - IMAP_STATUS *status = NULL; + struct ImapStatus *status = NULL; for (cur = idata->mboxcache; cur; cur = cur->next) { - status = (IMAP_STATUS *) cur->data; + status = (struct ImapStatus *) cur->data; FREE(&status->name); } diff --git a/imap/imap_private.h b/imap/imap_private.h index d2092558c..e77c9c0f6 100644 --- a/imap/imap_private.h +++ b/imap/imap_private.h @@ -131,7 +131,7 @@ struct ImapCache char *path; }; -typedef struct +struct ImapStatus { char *name; @@ -140,7 +140,7 @@ typedef struct unsigned int uidnext; unsigned int uidvalidity; unsigned int unseen; -} IMAP_STATUS; +}; struct ImapList { @@ -203,7 +203,7 @@ struct ImapData int lastcmd; struct Buffer *cmdbuf; - /* cache IMAP_STATUS of visited mailboxes */ + /* cache ImapStatus of visited mailboxes */ struct List *mboxcache; /* The following data is all specific to the currently SELECTED mbox */ @@ -232,7 +232,7 @@ struct ImapData int imap_check(struct ImapData *idata, int force); int imap_create_mailbox(struct ImapData *idata, char *mailbox); int imap_rename_mailbox(struct ImapData *idata, struct ImapMbox *mx, const char *newname); -IMAP_STATUS *imap_mboxcache_get(struct ImapData *idata, const char *mbox, int create); +struct ImapStatus *imap_mboxcache_get(struct ImapData *idata, const char *mbox, int create); void imap_mboxcache_free(struct ImapData *idata); int imap_exec_msgset(struct ImapData *idata, const char *pre, const char *post, int flag, int changed, int invert); diff --git a/imap/message.c b/imap/message.c index 7d49d8bbb..e55cfde86 100644 --- a/imap/message.c +++ b/imap/message.c @@ -357,7 +357,7 @@ int imap_read_headers(struct ImapData *idata, int msgbegin, int msgend) char tempfile[_POSIX_PATH_MAX]; int msgno, idx = msgbegin - 1; struct ImapHeader h; - IMAP_STATUS *status = NULL; + struct ImapStatus *status = NULL; int rc, mfhrc, oldmsgcount; int fetchlast = 0; int maxuid = 0; -- 2.40.0