X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-mx%2Fmx.c;h=0ed8badf439e178f40953bbc7a74938958f890df;hp=bebaa34522898c94b218b8faf299eaecaddce194;hb=d8c2844a5a8b0fcf09158dcdd452f6e43e29b5db;hpb=193714be08fc91ae77ddd401c1273d1b0d42845d diff --git a/lib-mx/mx.c b/lib-mx/mx.c index bebaa34..0ed8bad 100644 --- a/lib-mx/mx.c +++ b/lib-mx/mx.c @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include "mutt.h" #include "crypt.h" @@ -32,9 +32,6 @@ #include #include "pop.h" -#ifdef USE_NNTP -#include "nntp.h" -#endif static mx_t const *mxfmts[] = { &mbox_mx, @@ -42,9 +39,6 @@ static mx_t const *mxfmts[] = { &maildir_mx, &imap_mx, &pop_mx, -#ifdef USE_NNTP - &nntp_mx, -#endif &compress_mx, }; @@ -145,7 +139,7 @@ int mx_lock_file (const char *path, int fd, int excl, int dot, int time_out) prev_sb = sb; mutt_message (_("Waiting for fcntl lock... %d"), ++attempt); - sleep (1); + mutt_sleep (1); } #endif /* USE_FCNTL */ @@ -180,7 +174,7 @@ int mx_lock_file (const char *path, int fd, int excl, int dot, int time_out) prev_sb = sb; mutt_message (_("Waiting for flock attempt... %d"), ++attempt); - sleep (1); + mutt_sleep (1); } #endif /* USE_FLOCK */ @@ -582,15 +576,6 @@ static int _mx_close_mailbox (CONTEXT * ctx, int *index_hint) ctx->closing = 1; -#ifdef USE_NNTP - if (ctx->magic == M_NNTP) { - int ret; - - ret = nntp_close_mailbox (ctx); - mx_fastclose_mailbox (ctx); - return ret; - } -#endif if (ctx->readonly || ctx->dontwrite) { /* mailbox is readonly or we don't want to write */ mx_fastclose_mailbox (ctx); @@ -615,14 +600,8 @@ static int _mx_close_mailbox (CONTEXT * ctx, int *index_hint) if (read_msgs && quadoption (OPT_MOVE) != M_NO) { char *p; - if ((p = mutt_find_hook (M_MBOXHOOK, ctx->path))) { - isSpool = 1; - m_strcpy(mbox, sizeof(mbox), p); - } - else { - m_strcpy(mbox, sizeof(mbox), NONULL(Inbox)); - isSpool = mutt_is_spool (ctx->path) && !mutt_is_spool (mbox); - } + m_strcpy(mbox, sizeof(mbox), NONULL(Inbox)); + isSpool = mutt_is_spool (ctx->path) && !mutt_is_spool (mbox); mutt_expand_path (mbox, sizeof (mbox)); if (isSpool) { @@ -1064,15 +1043,6 @@ MESSAGE *mx_open_message (CONTEXT * ctx, int msgno) break; } -#ifdef USE_NNTP - case M_NNTP: - { - if (nntp_fetch_message (msg, ctx, msgno) != 0) - p_delete(&msg); - break; - } -#endif /* USE_NNTP */ - default: p_delete(&msg); break; @@ -1097,12 +1067,8 @@ int mx_close_message (MESSAGE ** msg) int r = 0; if ((*msg)->magic == M_MH || (*msg)->magic == M_MAILDIR - || (*msg)->magic == M_IMAP - || (*msg)->magic == M_POP -#ifdef USE_NNTP - || (*msg)->magic == M_NNTP -#endif - ) { + || (*msg)->magic == M_IMAP || (*msg)->magic == M_POP) + { r = m_fclose(&(*msg)->fp); } else