From: Pierre Habouzit Date: Sat, 12 Jan 2008 14:42:59 +0000 (+0100) Subject: hide yet another function X-Git-Url: http://git.madism.org/?a=commitdiff_plain;h=5a4ed6a80a95c870a3603350d2a1e99b99d99b5b;p=apps%2Fmadmutt.git hide yet another function Signed-off-by: Pierre Habouzit --- diff --git a/imap/imap.c b/imap/imap.c index ea2eb80..1bd9c95 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -1542,7 +1542,7 @@ int imap_reconnect (CONTEXT * ctx) return 0; } -int imap_is_magic (const char* path, struct stat* st __attribute__ ((unused))) { +static int imap_is_magic (const char* path, struct stat* st __attribute__ ((unused))) { url_scheme_t s; if (!path || !*path) return -1; diff --git a/imap/imap.h b/imap/imap.h index b92fb39..f56fdf9 100644 --- a/imap/imap.h +++ b/imap/imap.h @@ -25,8 +25,6 @@ typedef struct { } IMAP_MBOX; /* imap.c */ -int imap_is_magic(const char*, struct stat*); - int imap_check_mailbox (CONTEXT * ctx, int *index_hint, int force); int imap_delete_mailbox (CONTEXT * idata, IMAP_MBOX mx); int imap_open_mailbox_append (CONTEXT * ctx); diff --git a/lib-mx/mx.c b/lib-mx/mx.c index 1d0e8d7..1a7db32 100644 --- a/lib-mx/mx.c +++ b/lib-mx/mx.c @@ -516,7 +516,7 @@ static int _mx_close_mailbox (CONTEXT * ctx, int *index_hint) /* try to use server-side copy first */ i = 1; - if (ctx->magic == M_IMAP && imap_is_magic (mbox, NULL) == M_IMAP) { + if (ctx->magic == M_IMAP && imap_mx.mx_is_magic (mbox, NULL) == M_IMAP) { /* tag messages for moving, and clear old tags, if any */ for (i = 0; i < ctx->msgcount; i++) if (ctx->hdrs[i]->read && !ctx->hdrs[i]->deleted diff --git a/lib-ui/browser.c b/lib-ui/browser.c index dc8bb59..5ef937a 100644 --- a/lib-ui/browser.c +++ b/lib-ui/browser.c @@ -218,7 +218,7 @@ folder_format_str(char *dest, ssize_t destlen, char op, break; case 'N': - if (imap_is_magic (folder->ff->desc, NULL) == M_IMAP) { + if (imap_mx.mx_is_magic (folder->ff->desc, NULL) == M_IMAP) { if (!optional) { snprintf (tmp, sizeof (tmp), "%%%sd", fmt); snprintf (dest, destlen, tmp, folder->ff->new); @@ -503,7 +503,7 @@ void mutt_select_file (char *f, ssize_t flen, int flags, char ***files, if (*f) { mutt_expand_path (f, flen); - if (imap_is_magic (f, NULL) == M_IMAP) { + if (imap_mx.mx_is_magic (f, NULL) == M_IMAP) { init_state (&state, NULL); state.imap_browse = 1; if (!imap_browse (f, &state)) @@ -542,7 +542,7 @@ void mutt_select_file (char *f, ssize_t flen, int flags, char ***files, else if (!LastDir[0]) m_strcpy(LastDir, sizeof(LastDir), NONULL(Maildir)); - if (!buffy && imap_is_magic (LastDir, NULL) == M_IMAP) { + if (!buffy && imap_mx.mx_is_magic (LastDir, NULL) == M_IMAP) { init_state (&state, NULL); state.imap_browse = 1; imap_browse (LastDir, &state); @@ -833,7 +833,7 @@ void mutt_select_file (char *f, ssize_t flen, int flags, char ***files, buf[0]) { buffy = 0; mutt_expand_path (buf, sizeof (buf)); - if (imap_is_magic (buf, NULL) == M_IMAP) { + if (imap_mx.mx_is_magic (buf, NULL) == M_IMAP) { m_strcpy(LastDir, sizeof(LastDir), buf); destroy_state (&state); init_state (&state, NULL); @@ -987,7 +987,7 @@ void mutt_select_file (char *f, ssize_t flen, int flags, char ***files, if (examine_mailboxes (menu, &state) == -1) goto bail; } - else if (imap_is_magic (LastDir, NULL) == M_IMAP) { + else if (imap_mx.mx_is_magic (LastDir, NULL) == M_IMAP) { init_state (&state, NULL); state.imap_browse = 1; imap_browse (LastDir, &state); diff --git a/muttlib.c b/muttlib.c index 0d86826..dc07e8a 100644 --- a/muttlib.c +++ b/muttlib.c @@ -83,7 +83,7 @@ ssize_t _mutt_expand_path(char *buf, ssize_t len, const char *s, int rx) case '=': case '+': /* if folder = imap[s]://host/: don't append slash */ - if (imap_is_magic(NONULL(Maildir), NULL) == M_IMAP + if (imap_mx.mx_is_magic(NONULL(Maildir), NULL) == M_IMAP && Maildir[m_strlen(Maildir) - 1] == '/') { m_strcpy(p, sizeof(p), Maildir); } else { diff --git a/postpone.c b/postpone.c index b8a3b41..023b32f 100644 --- a/postpone.c +++ b/postpone.c @@ -57,7 +57,7 @@ int mutt_num_postponed (int force) return 0; /* LastModify is useless for IMAP */ - if (imap_is_magic (Postponed, NULL) == M_IMAP) { + if (imap_mx.mx_is_magic (Postponed, NULL) == M_IMAP) { if (force) { short newpc;