From: pdmef Date: Tue, 26 Jul 2005 15:26:23 +0000 (+0000) Subject: Rocco Rutte: X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=commitdiff_plain;h=2c522cac0278dd774896f25048da2c5cc1d9cf99;hp=5b5275063730518006979a40a3ff9c994886ee3f Rocco Rutte: - merge in latest mutt changes git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@347 e385b8ad-14ed-0310-8656-cc95a2468c6d --- diff --git a/ChangeLog.mutt b/ChangeLog.mutt index b74b40a..005c223 100644 --- a/ChangeLog.mutt +++ b/ChangeLog.mutt @@ -1,3 +1,35 @@ +2005-07-26 06:14:34 "Brent J. Nordquist" (brendan) + + * doc/manual.sgml.head: Correct a couple of typos (and change + ‐ to -: although the text version of the manual renders + ‐, the web version does not). + +2005-07-26 05:58:29 TAKAHASHI Tamotsu (brendan) + + * pattern.c: Interpret an empty limit as a request to cancel the + current limit. (Closes #1854) + +2005-07-26 05:28:02 Brendan Cully (brendan) + + * mutt_ssl.c: Don't offer to save expired or not-yet-valid + certificates. Closes #1943 as a side-effect. + +2005-07-26 05:04:23 Brendan Cully (brendan) + + * imap/imap.c, imap/imap_private.h: Rework IMAP CLOSE handling to + avoid expunging messages when exiting without saving changes. + (closes #1899) + +2005-07-26 03:09:55 Ralf Wildenhues (brendan) + + * mbyte.c, mutt_socket.c: There are some functions without ANSI + prototypes left in mutt-owned sources. + +2005-07-25 20:07:23 Brendan Cully (brendan) + + * init.h: Update _MAKEDOC macro so that the documentation includes + all variables. + 2005-07-25 15:48:36 Thomas Roessler (roessler) * copy.c, imap/imap.c, mh.c, mutt.h, muttlib.c, thread.c: Get rid diff --git a/doc/manual.sgml.head b/doc/manual.sgml.head index f67bfe1..0f3dd6b 100644 --- a/doc/manual.sgml.head +++ b/doc/manual.sgml.head @@ -1852,10 +1852,10 @@ is a caret ``ˆ'' then it matches any character -Note that if a regular expression contains parenthesis, or a veritical bar +Note that if a regular expression contains parenthesis, or a vertical bar ("|"), you noclose = 0; - else - idata->noclose = 1; - /* This function is only called when the calling code expects the context * to be changed. */ imap_allow_reopen (ctx); @@ -1051,6 +1044,12 @@ int imap_sync_mailbox (CONTEXT * ctx, int expunge, int *index_hint) } } + if (ctx->closing) { + if (imap_exec (idata, "CLOSE", 0)) + mutt_error (_("CLOSE failed")); + idata->state = IMAP_AUTHENTICATED; + } + rc = 0; out: if (cmd.data) @@ -1062,7 +1061,7 @@ out: return rc; } -/* imap_close_mailbox: issue close command if neccessary, reset IMAP_DATA */ +/* imap_close_mailbox: clean up IMAP data in CONTEXT */ void imap_close_mailbox (CONTEXT * ctx) { IMAP_DATA *idata; @@ -1073,13 +1072,17 @@ void imap_close_mailbox (CONTEXT * ctx) if (!idata) return; - if ((idata->status != IMAP_FATAL) && - (idata->state == IMAP_SELECTED) && (ctx == idata->ctx)) { - if (!(idata->noclose) && imap_exec (idata, "CLOSE", 0)) + if (ctx == idata->ctx) { + if (idata->state = IMAP_SELECTED) { + /* mx_close_mailbox won't sync if there are no deleted messages + * and the mailbox is unchanged, so we may have to close here */ + if (idata->status != IMAP_FATAL && !ctx->deleted && + imap_exec (idata, "CLOSE", 0)) mutt_error (_("CLOSE failed")); + idata->state = IMAP_AUTHENTICATED; + } idata->reopen &= IMAP_REOPEN_ALLOW; - idata->state = IMAP_AUTHENTICATED; FREE (&(idata->mailbox)); mutt_free_list (&idata->flags); idata->ctx = NULL; diff --git a/imap/imap_private.h b/imap/imap_private.h index dcf0c96..dd531f8 100644 --- a/imap/imap_private.h +++ b/imap/imap_private.h @@ -149,7 +149,6 @@ typedef struct { unsigned char rights[(RIGHTSMAX + 7) / 8]; unsigned int newMailCount; IMAP_CACHE cache[IMAP_CACHE_LEN]; - int noclose:1; #ifdef USE_HCACHE unsigned long uid_validity; #endif diff --git a/mbyte.c b/mbyte.c index 7940dc4..1ff911c 100644 --- a/mbyte.c +++ b/mbyte.c @@ -431,7 +431,7 @@ size_t utf8rtowc (wchar_t * pwc, const char *s, size_t n, mbstate_t * _ps) #endif /* !HAVE_WC_FUNCS */ -wchar_t replacement_char () +wchar_t replacement_char (void) { return Charset_is_utf8 ? 0xfffd : '?'; } diff --git a/mutt_ssl.c b/mutt_ssl.c index 83b735b..020cd1d 100644 --- a/mutt_ssl.c +++ b/mutt_ssl.c @@ -590,7 +590,9 @@ static int ssl_check_certificate (sslsockdata * data) snprintf (menu->dialog[row++], SHORT_STRING, _("Fingerprint: %s"), buf); menu->title = _("SSL Certificate check"); - if (SslCertFile) { + + if (SslCertFile && X509_cmp_current_time (X509_get_notAfter (data->cert)) >= 0 + && X509_cmp_current_time (X509_get_notBefore (data->cert)) < 0) { menu->prompt = _("(r)eject, accept (o)nce, (a)ccept always"); menu->keys = _("roa"); } diff --git a/pattern.c b/pattern.c index 7d70868..5b9c13a 100644 --- a/pattern.c +++ b/pattern.c @@ -1132,9 +1132,14 @@ int mutt_pattern_func (int op, char *prompt) strfcpy (buf, NONULL (Context->pattern), sizeof (buf)); if (prompt || op != M_LIMIT) - if (mutt_get_field (prompt, buf, sizeof (buf), M_PATTERN | M_CLEAR) != 0 - || !buf[0]) + if (mutt_get_field (prompt, buf, sizeof (buf), M_PATTERN | M_CLEAR) != 0) return (-1); + if (!buf[0]) { + if (op == M_LIMIT) + strncpy (buf, "~A", sizeof (buf)); + else + return (-1); + } mutt_message _("Compiling search pattern...");