diff options
author | Chris Rees <crees@FreeBSD.org> | 2012-07-22 09:15:04 +0000 |
---|---|---|
committer | Chris Rees <crees@FreeBSD.org> | 2012-07-22 09:15:04 +0000 |
commit | bb040dde3e08355fc3ff13644072333bff22f964 (patch) | |
tree | 48afad7ae2c1b5fd6c866fadb03127860561cb60 /mail/mutt-devel/files | |
parent | 8fd2a9684ed1385dacc6b34e1625dccd010c8e71 (diff) |
Notes
Diffstat (limited to 'mail/mutt-devel/files')
39 files changed, 0 insertions, 6985 deletions
diff --git a/mail/mutt-devel/files/extra-patch-aspell b/mail/mutt-devel/files/extra-patch-aspell deleted file mode 100644 index 05a3706764e5..000000000000 --- a/mail/mutt-devel/files/extra-patch-aspell +++ /dev/null @@ -1,11 +0,0 @@ ---- doc/Muttrc.head.orig Thu Jan 24 13:10:47 2002 -+++ doc/Muttrc.head Tue Nov 9 08:53:14 2004 -@@ -19,6 +19,8 @@ - macro index <f1> "!less @docdir@/manual.txt\n" "Show Mutt documentation" - macro pager <f1> "!less @docdir@/manual.txt\n" "Show Mutt documentation" - -+set ispell="/usr/local/bin/aspell --mode=email check" -+ - # If Mutt is unable to determine your site's domain name correctly, you can - # set the default here. - # diff --git a/mail/mutt-devel/files/extra-patch-doc-ref b/mail/mutt-devel/files/extra-patch-doc-ref deleted file mode 100644 index 9679f4c276f1..000000000000 --- a/mail/mutt-devel/files/extra-patch-doc-ref +++ /dev/null @@ -1,12 +0,0 @@ ---- doc/mutt.man.orig 2009-02-06 13:52:38.000000000 +0100 -+++ doc/mutt.man 2009-02-06 13:55:05.000000000 +0100 -@@ -69,7 +69,8 @@ - .PP - Mutt is a small but very powerful text based program for reading and sending electronic - mail under unix operating systems, including support for color terminals, MIME, --OpenPGP, and a threaded sorting mode. -+OpenPGP, and a threaded sorting mode. Details of how to use all of this is -+available in \fI${DOCSDIR}\fP. - .PP - .I Note: - .IR diff --git a/mail/mutt-devel/files/extra-patch-doc-xml b/mail/mutt-devel/files/extra-patch-doc-xml deleted file mode 100644 index 9e652c0a56f9..000000000000 --- a/mail/mutt-devel/files/extra-patch-doc-xml +++ /dev/null @@ -1,11 +0,0 @@ ---- doc/Makefile.am.orig 2010-09-17 16:23:30.000000000 +0200 -+++ doc/Makefile.am 2010-09-17 16:25:01.000000000 +0200 -@@ -47,7 +47,7 @@ - - all: makedoc-all - --makedoc-all: mutt.1 smime_keys.1 muttrc.man -+makedoc-all: mutt.1 smime_keys.1 muttrc.man manual.html stamp-doc-chunked manual.txt - - install-data-local: makedoc-all instdoc - $(top_srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man1 diff --git a/mail/mutt-devel/files/extra-patch-greeting b/mail/mutt-devel/files/extra-patch-greeting deleted file mode 100644 index a1f4bc113156..000000000000 --- a/mail/mutt-devel/files/extra-patch-greeting +++ /dev/null @@ -1,160 +0,0 @@ -diff -urN mutt-1.5.19/globals.h mutt-1.5.19-vc/globals.h ---- mutt-1.5.19/globals.h 2009-01-04 01:27:10.000000000 +0200 -+++ mutt-1.5.19-vc/globals.h 2009-02-09 19:30:31.000000000 +0200 -@@ -52,6 +52,7 @@ - WHERE char *FolderFormat; - WHERE char *ForwFmt; - WHERE char *Fqdn; -+WHERE char *Greeting; - WHERE char *HdrFmt; - WHERE char *HistFile; - WHERE char *Homedir; -diff -urN mutt-1.5.19/hdrline.c mutt-1.5.19-vc/hdrline.c ---- mutt-1.5.19/hdrline.c 2009-01-05 21:20:53.000000000 +0200 -+++ mutt-1.5.19-vc/hdrline.c 2009-02-09 19:30:31.000000000 +0200 -@@ -741,3 +741,62 @@ - { - mutt_FormatString (dst, dstlen, 0, s, hdr_format_str, (unsigned long) hfi, flags); - } -+ -+/* %n = recipient name -+ * %u = user (login) name of recipient -+ * %v = first name of recipient */ -+const char * -+greeting_string (char *dest, -+ size_t destlen, -+ size_t col, -+ char op, -+ const char *src, -+ const char *prefix, -+ const char *ifstring, -+ const char *elsestring, -+ unsigned long data, -+ format_flag flags) -+{ -+ HEADER *hdr = (HEADER *)data; -+ char *p, buf2[SHORT_STRING]; -+ -+ dest[0] = '\0'; -+ switch (op) -+ { -+ case 'n': -+ mutt_format_s (dest, destlen, prefix, mutt_get_name (hdr->env->to)); -+ break; -+ -+ case 'u': -+ if (hdr->env->to) -+ { -+ strfcpy (buf2, mutt_addr_for_display (hdr->env->to), sizeof (buf2)); -+ if ((p = strpbrk (buf2, "%@"))) -+ *p = '\0'; -+ } -+ else -+ buf2[0] = '\0'; -+ mutt_format_s (dest, destlen, prefix, buf2); -+ break; -+ -+ case 'v': -+ if (hdr->env->to) -+ mutt_format_s (buf2, sizeof (buf2), prefix, mutt_get_name (hdr->env->to)); -+ else if (hdr->env->cc) -+ mutt_format_s (buf2, sizeof (buf2), prefix, mutt_get_name (hdr->env->cc)); -+ else -+ *buf2 = '\0'; -+ if ((p = strpbrk (buf2, " %@"))) -+ *p = '\0'; -+ mutt_format_s (dest, destlen, prefix, buf2); -+ break; -+ -+ default: -+ snprintf (dest, destlen, "%%%s%c", prefix, op); -+ break; -+ } -+ if (flags & M_FORMAT_OPTIONAL) -+ mutt_FormatString (dest, destlen, col, elsestring, greeting_string, data, flags); -+ -+ return(src); -+} -diff -urN mutt-1.5.19/init.h mutt-1.5.19-vc/init.h ---- mutt-1.5.19/init.h 2009-01-05 21:20:53.000000000 +0200 -+++ mutt-1.5.19-vc/init.h 2009-02-09 19:30:31.000000000 +0200 -@@ -745,6 +745,22 @@ - ** .pp - ** This setting defaults to the contents of the environment variable \fC$$$EMAIL\fP. - */ -+ { "greeting", DT_STR, R_NONE, UL &Greeting, UL "" }, -+ /* -+ ** .pp -+ ** When set, this is the string that will precede every message as a -+ ** greeting phrase to the recipients. -+ ** .pp -+ ** ``Format strings'' are similar to the strings used in the ``C'' -+ ** function printf to format output (see the man page for more detail). -+ ** The following sequences are defined in Mutt: -+ ** .pp -+ ** .dl -+ ** .dt %n .dd recipient name -+ ** .dt %u .dd user (login) name of recipient -+ ** .dt %v .dd first name of recipient -+ ** .de -+ */ - { "gecos_mask", DT_RX, R_NONE, UL &GecosMask, UL "^[^,]*" }, - /* - ** .pp -diff -urN mutt-1.5.19/PATCHES mutt-1.5.19-vc/PATCHES ---- mutt-1.5.19/PATCHES 2008-03-19 22:07:06.000000000 +0200 -+++ mutt-1.5.19-vc/PATCHES 2009-02-09 19:30:31.000000000 +0200 -@@ -0,0 +1 @@ -+vc.greeting -diff -urN mutt-1.5.19/protos.h mutt-1.5.19-vc/protos.h ---- mutt-1.5.19/protos.h 2009-01-05 21:20:53.000000000 +0200 -+++ mutt-1.5.19-vc/protos.h 2009-02-09 19:32:15.000000000 +0200 -@@ -526,6 +526,9 @@ - void ci_bounce_message (HEADER *, int *); - int ci_send_message (int, HEADER *, char *, CONTEXT *, HEADER *); - -+const char *greeting_string (char *, size_t, size_t, char, const char *, const char *, -+ const char *, const char *, unsigned long, format_flag); -+ - /* prototypes for compatibility functions */ - - #ifndef HAVE_SETENV -diff -urN mutt-1.5.19/send.c mutt-1.5.19-vc/send.c ---- mutt-1.5.19/send.c.orig 2010-09-17 16:49:09.000000000 +0200 -+++ mutt-1.5.19-vc/send.c 2010-09-17 16:53:15.000000000 +0200 -@@ -469,6 +469,18 @@ - } - } - -+void mutt_make_greeting (HEADER *hdr, FILE *out, int flags) -+{ -+ char buffer[STRING]; -+ if (Greeting) -+ { -+ mutt_FormatString(buffer, sizeof(buffer), 0, Greeting, greeting_string, -+ (unsigned long) hdr, flags); -+ fputs(buffer, out); -+ fputc ('\n', out); -+ } -+} -+ - void mutt_make_post_indent (CONTEXT *ctx, HEADER *cur, FILE *out) - { - char buffer[STRING]; -@@ -1003,7 +1015,6 @@ - } - } - -- - /* look through the recipients of the message we are replying to, and if - we find an address that matches $alternates, we use that as the default - from field */ -@@ -1439,6 +1450,8 @@ - if (option (OPTHDRS)) - process_user_header (msg->env); - -+ mutt_make_greeting(msg, tempfp, flags); -+ - if (flags & SENDBATCH) - mutt_copy_stream (stdin, tempfp); - diff --git a/mail/mutt-devel/files/extra-patch-ifdef b/mail/mutt-devel/files/extra-patch-ifdef deleted file mode 100644 index 03f18dee9626..000000000000 --- a/mail/mutt-devel/files/extra-patch-ifdef +++ /dev/null @@ -1,79 +0,0 @@ ---- mutt-1.5.4.orig/init.c 2003-03-04 08:49:48.000000000 +0100 -+++ mutt-1.5.4/init.c 2003-07-22 20:14:47.000000000 +0200 -@@ -349,6 +349,52 @@ static void remove_from_list (LIST **l, - } - } - -+static int parse_ifdef (BUFFER *tmp, BUFFER *s, unsigned long data, BUFFER *err) -+{ -+ int i, j, res = 0; -+ BUFFER token; -+ -+ memset (&token, 0, sizeof (token)); -+ mutt_extract_token (tmp, s, 0); -+ -+ /* is the item defined as a variable or a function? */ -+ if (!(res = (mutt_option_index (tmp->data) != -1))) -+ for (i = 0; !res && i < MENU_MAX; i++) -+ { -+ struct binding_t *b = km_get_table (Menus[i].value); -+ -+ if (!b) -+ continue; -+ -+ for (j = 0; b[j].name; j++) -+ if (!ascii_strncasecmp (tmp->data, b[j].name, mutt_strlen (tmp->data)) -+ && (mutt_strlen (b[j].name) == mutt_strlen (tmp->data))) -+ { -+ res = 1; -+ break; -+ } -+ } -+ -+ if (!MoreArgs (s)) -+ { -+ snprintf (err->data, err->dsize, _("ifdef: too few arguments")); -+ return (-1); -+ } -+ mutt_extract_token (tmp, s, M_TOKEN_SPACE); -+ -+ if (res) -+ { -+ if (mutt_parse_rc_line (tmp->data, &token, err) == -1) -+ { -+ mutt_error ("Erreur: %s", err->data); -+ FREE (&token.data); -+ return (-1); -+ } -+ FREE (&token.data); -+ } -+ return 0; -+} -+ - static int parse_unignore (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err) - { - do -diff -pruN mutt-1.5.4.orig/init.h mutt-1.5.4/init.h ---- mutt-1.5.4.orig/init.h.orig 2009-06-22 15:48:16.000000000 +0200 -+++ mutt-1.5.4/init.h 2009-06-22 15:49:28.000000000 +0200 -@@ -3658,6 +3658,7 @@ - static int parse_unlists (BUFFER *, BUFFER *, unsigned long, BUFFER *); - static int parse_alias (BUFFER *, BUFFER *, unsigned long, BUFFER *); - static int parse_unalias (BUFFER *, BUFFER *, unsigned long, BUFFER *); -+static int parse_ifdef (BUFFER *, BUFFER *, unsigned long, BUFFER *); - static int parse_ignore (BUFFER *, BUFFER *, unsigned long, BUFFER *); - static int parse_unignore (BUFFER *, BUFFER *, unsigned long, BUFFER *); - static int parse_source (BUFFER *, BUFFER *, unsigned long, BUFFER *); -@@ -3715,6 +3716,7 @@ - { "hdr_order", parse_list, UL &HeaderOrderList }, - #ifdef HAVE_ICONV - { "iconv-hook", mutt_parse_hook, M_ICONVHOOK }, -+ { "ifdef", parse_ifdef, 0 }, - #endif - { "ignore", parse_ignore, 0 }, - { "lists", parse_lists, 0 }, -diff -pruN mutt-1.5.4.orig/PATCHES mutt-1.5.4/PATCHES ---- mutt-1.5.4.orig/PATCHES 2003-03-19 22:33:37.000000000 +0100 -+++ mutt-1.5.4/PATCHES 2003-07-22 20:14:47.000000000 +0200 -@@ -0,0 +1 @@ -+patch-1.5.4.cd.ifdef.1 diff --git a/mail/mutt-devel/files/extra-patch-maildir-mtime b/mail/mutt-devel/files/extra-patch-maildir-mtime deleted file mode 100644 index b5c27bc30861..000000000000 --- a/mail/mutt-devel/files/extra-patch-maildir-mtime +++ /dev/null @@ -1,52 +0,0 @@ ---- PATCHES Dec 2002 17:44:54 -0000 3.6 -+++ PATCHES Feb 2004 13:19:42 -0000 -@@ -0,0 +1 @@ -+patch-1.5.7.ust.maildir-mtime.2 ---- browser.c.orig Wed Jan 26 13:41:04 2005 -+++ browser.c Wed Feb 9 09:20:14 2005 -@@ -27,6 +27,7 @@ - #ifdef USE_IMAP - #include "imap.h" - #endif -+#include "mx.h" - - #include <stdlib.h> - #include <dirent.h> -@@ -346,6 +347,21 @@ - menu->data = state->entry; - } - -+static void check_maildir_times (BUFFY *buf, struct stat *st) -+{ -+ char buffer[_POSIX_PATH_MAX + SHORT_STRING]; -+ struct stat s; -+ -+ if(!buf || buf->magic != M_MAILDIR) -+ return; -+ -+ snprintf (buffer, sizeof (buffer), "%s/tmp", buf->path); -+ if (lstat (buffer, &s) != 0) -+ return; -+ -+ st->st_mtime = s.st_mtime; -+} -+ - static int examine_directory (MUTTMENU *menu, struct browser_state *state, - char *d, const char *prefix) - { -@@ -409,6 +425,7 @@ - tmp = Incoming; - while (tmp && mutt_strcmp (buffer, tmp->path)) - tmp = tmp->next; -+ check_maildir_times (tmp, &s); - add_folder (menu, state, de->d_name, &s, (tmp) ? tmp->new : 0); - } - closedir (dp); -@@ -454,6 +471,7 @@ - strfcpy (buffer, NONULL(tmp->path), sizeof (buffer)); - mutt_pretty_mailbox (buffer); - -+ check_maildir_times (tmp, &s); - add_folder (menu, state, buffer, &s, tmp->new); - } - while ((tmp = tmp->next)); diff --git a/mail/mutt-devel/files/extra-patch-maildir-mtime-nntp b/mail/mutt-devel/files/extra-patch-maildir-mtime-nntp deleted file mode 100644 index bc8f7fb79b31..000000000000 --- a/mail/mutt-devel/files/extra-patch-maildir-mtime-nntp +++ /dev/null @@ -1,44 +0,0 @@ ---- PATCHES Dec 2002 17:44:54 -0000 3.6 -+++ PATCHES Feb 2004 13:19:42 -0000 -@@ -0,0 +1 @@ -+patch-1.5.7.ust.maildir-mtime.2 ---- browser.c.orig Tue Feb 8 10:29:57 2005 -+++ browser.c Tue Feb 8 10:29:58 2005 -@@ -31,4 +31,5 @@ - #include "nntp.h" - #endif -+#include "mx.h" - - #include <stdlib.h> -@@ -473,4 +474,19 @@ - } - -+static void check_maildir_times (BUFFY *buf, struct stat *st) -+{ -+ char buffer[_POSIX_PATH_MAX + SHORT_STRING]; -+ struct stat s; -+ -+ if(!buf || buf->magic != M_MAILDIR) -+ return; -+ -+ snprintf (buffer, sizeof (buffer), "%s/tmp", buf->path); -+ if (lstat (buffer, &s) != 0) -+ return; -+ -+ st->st_mtime = s.st_mtime; -+} -+ - /* get list of all files/newsgroups with mask */ - static int examine_directory (MUTTMENU *menu, struct browser_state *state, -@@ -562,4 +578,5 @@ - while (tmp && mutt_strcmp (buffer, tmp->path)) - tmp = tmp->next; -+ check_maildir_times (tmp, &s); - add_folder (menu, state, de->d_name, &s, NULL, (tmp) ? tmp->new : 0); - } -@@ -637,4 +654,5 @@ - mutt_pretty_mailbox (buffer); - -+ check_maildir_times (tmp, &s); - add_folder (menu, state, buffer, &s, NULL, tmp->new); - } diff --git a/mail/mutt-devel/files/extra-patch-no-mbox-manpage b/mail/mutt-devel/files/extra-patch-no-mbox-manpage deleted file mode 100644 index 02f79155dd30..000000000000 --- a/mail/mutt-devel/files/extra-patch-no-mbox-manpage +++ /dev/null @@ -1,29 +0,0 @@ ---- doc/Makefile.am.orig 2008-05-30 08:00:04.000000000 +0100 -+++ doc/Makefile.am 2008-09-19 18:55:55.000000000 +0100 -@@ -18,8 +18,6 @@ - gen-map-doc \ - muttrc.man.head \ - muttrc.man.tail \ -- mbox.man \ -- mmdf.man \ - manual.xml.head \ - manual.xml.tail \ - instdoc.sh.in \ -@@ -57,8 +55,6 @@ - test x@DOTLOCK_TARGET@ = x || ./instdoc $(srcdir)/dotlock.man \ - $(DESTDIR)$(mandir)/man1/mutt_dotlock.1 - ./instdoc muttrc.man $(DESTDIR)$(mandir)/man5/muttrc.5 -- ./instdoc $(srcdir)/mbox.man $(DESTDIR)$(mandir)/man5/mbox.5 -- ./instdoc $(srcdir)/mmdf.man $(DESTDIR)$(mandir)/man5/mmdf.5 - $(top_srcdir)/mkinstalldirs $(DESTDIR)$(docdir) - for f in $(topsrcdir_DOCFILES) ; do \ - $(INSTALL) -m 644 $(top_srcdir)/$$f $(DESTDIR)$(docdir) ; \ -@@ -83,7 +79,7 @@ - for f in mutt.1 mutt_dotlock.1 flea.1 muttbug.1 ; do \ - rm -f $(DESTDIR)$(mandir)/man1/$$f ; \ - done -- for f in muttrc.5 mbox.5 mmdf.5 ; do \ -+ for f in muttrc.5 ; do \ - rm -f $(DESTDIR)$(mandir)/man5/$$f ; \ - done - for f in $(srcdir_DOCFILES) $(topsrcdir_DOCFILES) $(HTML_DOCFILES) ; \ diff --git a/mail/mutt-devel/files/extra-patch-nodoc-contrib b/mail/mutt-devel/files/extra-patch-nodoc-contrib deleted file mode 100644 index 3a079bb2cdeb..000000000000 --- a/mail/mutt-devel/files/extra-patch-nodoc-contrib +++ /dev/null @@ -1,28 +0,0 @@ ---- Makefile.am.orig Fri Feb 11 14:54:08 2005 -+++ Makefile.am Fri Feb 11 14:55:33 2005 -@@ -10,7 +10,7 @@ - IMAP_INCLUDES = -I$(top_srcdir)/imap - endif - --SUBDIRS = m4 po intl contrib $(IMAP_SUBDIR) . doc -+SUBDIRS = m4 po intl $(IMAP_SUBDIR) . doc - - bin_SCRIPTS = muttbug flea @SMIMEAUX_TARGET@ - ---- doc/Makefile.am.orig 2008-05-19 19:43:38.000000000 +0200 -+++ doc/Makefile.am 2008-05-19 19:45:35.000000000 +0200 -@@ -60,14 +60,6 @@ - ./instdoc muttrc.man $(DESTDIR)$(mandir)/man5/muttrc.5 - ./instdoc $(srcdir)/mbox.man $(DESTDIR)$(mandir)/man5/mbox.5 - ./instdoc $(srcdir)/mmdf.man $(DESTDIR)$(mandir)/man5/mmdf.5 -- $(top_srcdir)/mkinstalldirs $(DESTDIR)$(docdir) -- for f in $(topsrcdir_DOCFILES) ; do \ -- $(INSTALL) -m 644 $(top_srcdir)/$$f $(DESTDIR)$(docdir) ; \ -- done -- for f in $(srcdir_DOCFILES) ; do \ -- $(INSTALL) -m 644 $(srcdir)/$$f $(DESTDIR)$(docdir) ; \ -- done -- -$(INSTALL) -m 644 manual.txt $(DESTDIR)$(docdir) - $(INSTALL) -m 644 Muttrc $(DESTDIR)$(sysconfdir)/Muttrc.dist - -if [ -f $(DESTDIR)$(pkgdatadir)/Muttrc ] ; then \ - mv $(DESTDIR)$(pkgdatadir)/Muttrc* $(DESTDIR)$(sysconfdir) ; \ diff --git a/mail/mutt-devel/files/extra-patch-parent-child-match b/mail/mutt-devel/files/extra-patch-parent-child-match deleted file mode 100644 index f9e95e46742a..000000000000 --- a/mail/mutt-devel/files/extra-patch-parent-child-match +++ /dev/null @@ -1,169 +0,0 @@ ---- mutt-1.5.20/doc/manual.xml.head 2009-05-30 19:20:08.000000000 +0200 -+++ mutt-1.5.20-parentchildmatch/doc/manual.xml.head 2009-07-18 01:09:23.000000000 +0200 -@@ -3947,6 +3947,22 @@ With the <command>reset</command> comman - which allows you to reset all variables to their system defaults. - </para> - -+<para> -+<emphasis role="bold">Parent and child match</emphasis>. -+You can tell mutt that the following pattern has to be matched against -+the parent message with < or one of its childs with >. -+This example matches all mails which have at least an unread duplicate -+message: -+</para> -+ -+<para> -+ -+<screen> -+>(~= ~N) -+</screen> -+ -+</para> -+ - </sect2> - - <sect2 id="set-myvar"> -diff -urNp mutt-1.5.20/mutt.h mutt-1.5.20-parentchildmatch/mutt.h ---- mutt-1.5.20/mutt.h 2009-06-13 00:15:42.000000000 +0200 -+++ mutt-1.5.20-parentchildmatch/mutt.h 2009-07-18 01:14:21.000000000 +0200 -@@ -819,6 +819,8 @@ typedef struct pattern_t - unsigned int alladdr : 1; - unsigned int stringmatch : 1; - unsigned int groupmatch : 1; -+ unsigned int parentmatch : 1; -+ unsigned int childsmatch : 1; - unsigned int ign_case : 1; /* ignore case for local stringmatch searches */ - int min; - int max; -diff -urNp mutt-1.5.20/pattern.c mutt-1.5.20-parentchildmatch/pattern.c ---- mutt-1.5.20/pattern.c 2009-06-03 22:48:31.000000000 +0200 -+++ mutt-1.5.20-parentchildmatch/pattern.c 2009-07-18 01:09:23.000000000 +0200 -@@ -45,6 +45,7 @@ static int eat_regexp (pattern_t *pat, B - static int eat_date (pattern_t *pat, BUFFER *, BUFFER *); - static int eat_range (pattern_t *pat, BUFFER *, BUFFER *); - static int patmatch (const pattern_t *pat, const char *buf); -+static int pattern_exec (struct pattern_t *pat, pattern_exec_flag flags, CONTEXT *ctx, HEADER *h); - - static struct pattern_flags - { -@@ -769,6 +770,8 @@ pattern_t *mutt_pattern_comp (/* const * - pattern_t *last = NULL; - int not = 0; - int alladdr = 0; -+ int parentmatch = 0; -+ int childsmatch = 0; - int or = 0; - int implicit = 1; /* used to detect logical AND operator */ - struct pattern_flags *entry; -@@ -793,6 +796,24 @@ pattern_t *mutt_pattern_comp (/* const * - ps.dptr++; - not = !not; - break; -+ case '<': -+ ps.dptr++; -+ if (childsmatch) { -+ snprintf (err->data, err->dsize, _("cannot use both < and > as a pattern modifier")); -+ mutt_pattern_free (&curlist); -+ return NULL; -+ } -+ parentmatch = 1; -+ break; -+ case '>': -+ ps.dptr++; -+ if (parentmatch) { -+ snprintf (err->data, err->dsize, _("cannot use both < and > as a pattern modifier")); -+ mutt_pattern_free (&curlist); -+ return NULL; -+ } -+ childsmatch = 1; -+ break; - case '|': - if (!or) - { -@@ -818,6 +839,8 @@ pattern_t *mutt_pattern_comp (/* const * - implicit = 0; - not = 0; - alladdr = 0; -+ parentmatch = 0; -+ childsmatch = 0; - break; - case '%': - case '=': -@@ -841,8 +864,12 @@ pattern_t *mutt_pattern_comp (/* const * - last = tmp; - tmp->not ^= not; - tmp->alladdr |= alladdr; -+ tmp->parentmatch |= parentmatch; -+ tmp->childsmatch |= childsmatch; - not = 0; - alladdr = 0; -+ parentmatch = 0; -+ childsmatch = 0; - /* compile the sub-expression */ - buf = mutt_substrdup (ps.dptr + 1, p); - if ((tmp2 = mutt_pattern_comp (buf, flags, err)) == NULL) -@@ -870,10 +897,14 @@ pattern_t *mutt_pattern_comp (/* const * - tmp = new_pattern (); - tmp->not = not; - tmp->alladdr = alladdr; -+ tmp->parentmatch = parentmatch; -+ tmp->childsmatch = childsmatch; - tmp->stringmatch = (*ps.dptr == '=') ? 1 : 0; - tmp->groupmatch = (*ps.dptr == '%') ? 1 : 0; - not = 0; - alladdr = 0; -+ parentmatch = 0; -+ childsmatch = 0; - - if (last) - last->next = tmp; -@@ -939,8 +970,12 @@ pattern_t *mutt_pattern_comp (/* const * - last = tmp; - tmp->not ^= not; - tmp->alladdr |= alladdr; -+ tmp->parentmatch |= parentmatch; -+ tmp->childsmatch |= childsmatch; - not = 0; - alladdr = 0; -+ parentmatch = 0; -+ childsmatch = 0; - ps.dptr = p + 1; /* restore location */ - break; - default: -@@ -1081,6 +1116,36 @@ static int match_threadcomplete(struct p - int - mutt_pattern_exec (struct pattern_t *pat, pattern_exec_flag flags, CONTEXT *ctx, HEADER *h) - { -+ THREAD *t; -+ -+ if (pat->parentmatch) { -+ if (h->thread && h->thread->parent && h->thread->parent->message) -+ return pattern_exec (pat, flags, ctx, h->thread->parent->message); -+ else -+ return pat->not; -+ } -+ if (pat->childsmatch) { -+ if (!h->thread) -+ return pat->not; -+ if (!h->thread->child) -+ return pat->not; -+ t = h->thread->child; -+ while (t->prev) -+ t = t->prev; -+ for (; t; t = t->next) { -+ if (!t->message) -+ continue; -+ if (pattern_exec (pat, flags, ctx, t->message)) -+ return !pat->not; -+ } -+ return pat->not; -+ } -+ return pattern_exec (pat, flags, ctx, h); -+} -+ -+static int -+pattern_exec (struct pattern_t *pat, pattern_exec_flag flags, CONTEXT *ctx, HEADER *h) -+{ - switch (pat->op) - { - case M_AND: diff --git a/mail/mutt-devel/files/extra-patch-pgp-dw b/mail/mutt-devel/files/extra-patch-pgp-dw deleted file mode 100644 index e75bc51e2403..000000000000 --- a/mail/mutt-devel/files/extra-patch-pgp-dw +++ /dev/null @@ -1,1039 +0,0 @@ ---- PATCHES Dec 2002 17:44:54 -0000 3.6 -+++ PATCHES Feb 2004 06:07:13 -0000 -@@ -0,0 +1,4 @@ -+patch-1.5.6.dw.multiple-crypt-hook.2 -+patch-1.5.6.dw.confirm-crypt-hook.1 -+patch-1.5.6.dw.crypt-autoselectkey.1 -+patch-1.5.6.dw.pgp-menu-traditional.2 ---- compose.c Oct 2003 20:34:59 -0000 3.14 -+++ compose.c Feb 2004 06:07:13 -0000 -@@ -133,2 +133,9 @@ static void redraw_crypt_lines (HEADER * - addstr (_("Clear")); -+ -+ if ((WithCrypto & APPLICATION_PGP)) -+ if ((msg->security & (ENCRYPT | SIGN))) -+ if ((msg->security & INLINE)) -+ addstr (_(" (inline)")); -+ else -+ addstr (_(" (PGP/MIME)")); - clrtoeol (); -@@ -158,2 +165,3 @@ static int pgp_send_menu (HEADER *msg, i - { -+ int use_autoinline = 0; - pgp_key_t p; -@@ -164,7 +172,10 @@ static int pgp_send_menu (HEADER *msg, i - -- switch (mutt_multi_choice (_("PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? "), -- N_("esabf"))) -+ if (!(msg->security & (SIGN | ENCRYPT))) -+ use_autoinline = 1; -+ -+ switch (mutt_multi_choice (_("PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? "), -+ N_("esabif"))) - { - case 1: /* (e)ncrypt */ -- msg->security |= ENCRYPT; -+ msg->security ^= ENCRYPT; - break; -@@ -172,3 +183,3 @@ static int pgp_send_menu (HEADER *msg, i - case 2: /* (s)ign */ -- msg->security |= SIGN; -+ msg->security ^= SIGN; - break; -@@ -199,6 +210,16 @@ static int pgp_send_menu (HEADER *msg, i - case 4: /* (b)oth */ -- msg->security = ENCRYPT | SIGN; -+ if ((msg->security & (ENCRYPT | SIGN)) == (ENCRYPT | SIGN)) -+ msg->security = 0; -+ else -+ msg->security |= (ENCRYPT | SIGN); - break; - -- case 5: /* (f)orget it */ -+ case 5: /* (i)nline */ -+ if ((msg->security & (ENCRYPT | SIGN))) -+ msg->security ^= INLINE; -+ else -+ msg->security &= ~INLINE; -+ break; -+ -+ case 6: /* (f)orget it */ - msg->security = 0; -@@ -207,6 +228,16 @@ static int pgp_send_menu (HEADER *msg, i - -- if (msg->security && msg->security != APPLICATION_PGP) -- msg->security |= APPLICATION_PGP; -- else -- msg->security = 0; -+ if (msg->security) -+ { -+ if (!(msg->security & (ENCRYPT | SIGN))) -+ { -+ msg->security = 0; -+ } -+ else -+ { -+ msg->security |= APPLICATION_PGP; -+ -+ if (use_autoinline && option (OPTPGPAUTOINLINE)) -+ msg->security |= INLINE; -+ } -+ } - ---- crypt.c Jan 2004 19:59:38 -0000 3.22 -+++ crypt.c Feb 2004 06:07:13 -0000 -@@ -161,3 +161,3 @@ int crypt_valid_passphrase(int flags) - --int mutt_protect (HEADER *msg, HEADER *cur, char *keylist) -+int mutt_protect (HEADER *msg, char *keylist) - { -@@ -166,3 +166,2 @@ int mutt_protect (HEADER *msg, HEADER *c - BODY *tmp_pgp_pbody = NULL; -- int traditional = 0; - int flags = (WithCrypto & APPLICATION_PGP)? msg->security: 0; -@@ -176,29 +175,9 @@ int mutt_protect (HEADER *msg, HEADER *c - -- if ((WithCrypto & APPLICATION_PGP) && (msg->security & APPLICATION_PGP)) -+ if ((WithCrypto & APPLICATION_PGP) && ((msg->security & PGPINLINE) == PGPINLINE)) - { -- if ((msg->content->type == TYPETEXT) && -- !ascii_strcasecmp (msg->content->subtype, "plain")) -- { -- if (cur && cur->security && option (OPTPGPAUTOTRAD) -- && (option (OPTCRYPTREPLYENCRYPT) -- || option (OPTCRYPTREPLYSIGN) -- || option (OPTCRYPTREPLYSIGNENCRYPTED))) -- { -- if(mutt_is_application_pgp(cur->content)) -- traditional = 1; -- } -- else -- { -- if ((i = query_quadoption (OPT_PGPTRADITIONAL, _("Create a traditional (inline) PGP message?"))) == -1) -- return -1; -- else if (i == M_YES) -- traditional = 1; -- } -- } -- if (traditional) -+ /* they really want to send it inline... go for it */ -+ if (!isendwin ()) mutt_endwin _("Invoking PGP..."); -+ pbody = crypt_pgp_traditional_encryptsign (msg->content, flags, keylist); -+ if (pbody) - { -- if (!isendwin ()) mutt_endwin _("Invoking PGP..."); -- if (!(pbody = crypt_pgp_traditional_encryptsign (msg->content, flags, keylist))) -- return -1; -- - msg->content = pbody; -@@ -206,2 +185,8 @@ int mutt_protect (HEADER *msg, HEADER *c - } -+ -+ /* otherwise inline won't work...ask for revert */ -+ if ((i = query_quadoption (OPT_PGPMIMEASK, _("Message can't be sent inline. Revert to using PGP/MIME?"))) != M_YES) -+ return -1; -+ -+ /* go ahead with PGP/MIME */ - } -@@ -393,2 +378,5 @@ int mutt_is_application_pgp (BODY *m) - } -+ if (t) -+ t |= PGPINLINE; -+ - return t; ---- hook.c Jan 2004 09:52:55 -0000 3.8 -+++ hook.c Feb 2004 06:07:13 -0000 -@@ -119,3 +119,7 @@ int mutt_parse_hook (BUFFER *buf, BUFFER - { -+#ifdef M_CRYPTHOOK -+ if (data & (M_FOLDERHOOK | M_SENDHOOK | M_MESSAGEHOOK | M_ACCOUNTHOOK | M_REPLYHOOK | M_CRYPTHOOK)) -+#else - if (data & (M_FOLDERHOOK | M_SENDHOOK | M_MESSAGEHOOK | M_ACCOUNTHOOK | M_REPLYHOOK)) -+#endif - { -@@ -445,5 +449,21 @@ char *mutt_iconv_hook (const char *chs) - --char *mutt_crypt_hook (ADDRESS *adr) -+LIST *mutt_crypt_hook (ADDRESS *adr) - { -- return _mutt_string_hook (adr->mailbox, M_CRYPTHOOK); -+ HOOK *hook; -+ LIST *key_list = NULL; -+ -+ if (!adr && !adr->mailbox) -+ return (NULL); -+ -+ for (hook = Hooks; hook; hook = hook->next) -+ { -+ if (!hook->command) -+ continue; -+ if (!(hook->type & M_CRYPTHOOK)) -+ continue; -+ -+ if ((regexec (hook->rx.rx, adr->mailbox, 0, NULL, 0) == 0) ^ hook->rx.not) -+ key_list = mutt_add_list (key_list, hook->command); -+ } -+ return (key_list); - } ---- init.h Feb 2004 17:10:43 -0000 3.43 -+++ init.h Feb 2004 06:07:14 -0000 -@@ -1205,2 +1205,12 @@ struct option_t MuttVars[] = { - */ -+ -+ -+ { "pgp_autoselectkey", DT_SYN, R_NONE, UL "crypt_autoselectkey", 0 }, -+ { "crypt_autoselectkey", DT_BOOL, R_NONE, OPTCRYPTAUTOSELECT, 0 }, -+ /* -+ ** .pp -+ ** If set, then a list of keys is not presented for selection when only -+ ** one matching key is available. This may be useful in conjunction with -+ ** the \fIcrypt-hook\fP command. -+ */ - { "pgp_autosign", DT_SYN, R_NONE, UL "crypt_autosign", 0 }, -@@ -1230,2 +1240,11 @@ struct option_t MuttVars[] = { - */ -+ { "pgp_confirmhook", DT_SYN, R_NONE, UL "crypt_confirmhook", 1 }, -+ { "crypt_confirmhook", DT_BOOL, R_NONE, OPTCRYPTCONFIRMHOOK, 1 }, -+ /* -+ ** .pp -+ ** If set, then you will be prompted for confirmation of keys when using -+ ** the \fIcrypt-hook\fP command. If unset, no such confirmation prompt will -+ ** be presented. This is generally considered unsafe, especially where -+ ** typos are concerned. -+ */ - { "pgp_ignore_subkeys", DT_BOOL, R_NONE, OPTPGPIGNORESUB, 1}, -@@ -1374,2 +1393,44 @@ struct option_t MuttVars[] = { - */ -+ { "pgp_create_traditional", DT_SYN, R_NONE, UL "pgp_autoinline", 0 }, -+ { "pgp_autoinline", DT_BOOL, R_NONE, OPTPGPAUTOINLINE, 0 }, -+ /* -+ ** .pp -+ ** This option controls whether Mutt generates old-style inline -+ ** (traditional) PGP encrypted or signed messages under certain -+ ** circumstances. This can be overridden by use of the \fIpgp-menu\fP, -+ ** when inline is not required. -+ ** .pp -+ ** Note that Mutt might automatically use PGP/MIME for messages -+ ** which consist of more than a single MIME part. Mutt can be -+ ** configured to ask before sending PGP/MIME messages when inline -+ ** (traditional) would not work. -+ ** See also: ``$$pgp_mime_ask''. -+ ** .pp -+ ** Also note that using the old-style PGP message format is \fBstrongly\fP -+ ** \fBdeprecated\fP. -+ ** (PGP only) -+ */ -+ { "pgp_auto_traditional", DT_SYN, R_NONE, UL "pgp_replyinline", 0 }, -+ { "pgp_replyinline", DT_BOOL, R_NONE, OPTPGPREPLYINLINE, 0 }, -+ /* -+ ** .pp -+ ** Setting this variable will cause Mutt to always attempt to -+ ** create an inline (traditional) message when replying to a -+ ** message which is PGP encrypted/signed inline. This can be -+ ** overridden by use of the \fIpgp-menu\fP, when inline is not -+ ** required. This option does not automatically detect if the -+ ** (replied-to) message is inline; instead it relies on Mutt -+ ** internals for previously checked/flagged messages. -+ ** .pp -+ ** Note that Mutt might automatically use PGP/MIME for messages -+ ** which consist of more than a single MIME part. Mutt can be -+ ** configured to ask before sending PGP/MIME messages when inline -+ ** (traditional) would not work. -+ ** See also: ``$$pgp_mime_ask''. -+ ** .pp -+ ** Also note that using the old-style PGP message format is \fBstrongly\fP -+ ** \fBdeprecated\fP. -+ ** (PGP only) -+ ** -+ */ - { "pgp_show_unusable", DT_BOOL, R_NONE, OPTPGPSHOWUNUSABLE, 1 }, -@@ -1423,11 +1484,8 @@ struct option_t MuttVars[] = { - */ -- { "pgp_create_traditional", DT_QUAD, R_NONE, OPT_PGPTRADITIONAL, M_NO }, -+ { "pgp_mime_ask", DT_QUAD, R_NONE, OPT_PGPMIMEASK, M_NO }, - /* - ** .pp -- ** This option controls whether Mutt generates old-style inline PGP -- ** encrypted or signed messages. -- ** .pp -- ** Note that PGP/MIME will be used automatically for messages which have -- ** a character set different from us-ascii, or which consist of more than -- ** a single MIME part. -+ ** This option controls whether Mutt will prompt you for -+ ** automatically sending a (signed/encrypted) message using -+ ** PGP/MIME when inline (traditional) fails (for any reason). - ** .pp -@@ -1435,19 +1493,2 @@ struct option_t MuttVars[] = { - ** \fBdeprecated\fP. -- ** (PGP only) -- */ -- { "pgp_auto_traditional", DT_BOOL, R_NONE, OPTPGPAUTOTRAD, 0 }, -- /* -- ** .pp -- ** This option causes Mutt to generate an old-style inline PGP -- ** encrypted or signed message when replying to an old-style -- ** message, and a PGP/MIME message when replying to a PGP/MIME -- ** message. Note that this option is only meaningful when using -- ** ``$$crypt_replyencrypt'', ``$$crypt_replysign'', or -- ** ``$$crypt_replysignencrypted''. -- ** .pp -- ** Also note that PGP/MIME will be used automatically for messages -- ** which have a character set different from us-ascii, or which -- ** consist of more than a single MIME part. -- ** .pp -- ** This option overrides ``$$pgp_create_traditional'' - ** (PGP only) ---- mutt.h Feb 2004 17:10:43 -0000 3.23 -+++ mutt.h Feb 2004 06:07:14 -0000 -@@ -278,3 +278,2 @@ enum - OPT_MOVE, -- OPT_PGPTRADITIONAL, /* create old-style PGP messages */ - #ifdef USE_POP -@@ -284,2 +283,3 @@ enum - OPT_POSTPONE, -+ OPT_PGPMIMEASK, /* ask to revert to PGP/MIME when inline fails */ - OPT_PRINT, -@@ -431,2 +431,3 @@ enum - -+ OPTCRYPTAUTOSELECT, - OPTCRYPTAUTOSIGN, -@@ -442,2 +443,3 @@ enum - OPTSDEFAULTDECRYPTKEY, -+ OPTCRYPTCONFIRMHOOK, - OPTPGPIGNORESUB, -@@ -445,3 +447,2 @@ enum - OPTPGPLONGIDS, -- OPTPGPAUTOTRAD, - #if 0 -@@ -453,2 +454,4 @@ enum - OPTPGPSHOWUNUSABLE, -+ OPTPGPAUTOINLINE, -+ OPTPGPREPLYINLINE, - -@@ -642,4 +645,4 @@ typedef struct header - { -- unsigned int security : 9; /* bit 0-6: flags, bit 7,8: application. -- see: crypt.h pgplib.h, smime.h */ -+ unsigned int security : 10; /* bit 0-7: flags, bit 8,9: application. -+ see: mutt_crypt.h */ - ---- mutt_crypt.h Dec 2003 13:04:20 -0000 3.5 -+++ mutt_crypt.h Feb 2004 06:07:14 -0000 -@@ -38,6 +38,7 @@ - #define SIGNOPAQUE (1 << 5) --/* (1 << 6) is used by PGPKEY below. */ -+#define KEYBLOCK (1 << 6) /* KEY too generic? */ -+#define INLINE (1 << 7) - --#define APPLICATION_PGP (1 << 7) --#define APPLICATION_SMIME (1 << 8) -+#define APPLICATION_PGP (1 << 8) -+#define APPLICATION_SMIME (1 << 9) - -@@ -46,3 +47,4 @@ - #define PGPGOODSIGN (APPLICATION_PGP | GOODSIGN) --#define PGPKEY (APPLICATION_PGP | (1 << 6)) -+#define PGPKEY (APPLICATION_PGP | KEYBLOCK) -+#define PGPINLINE (APPLICATION_PGP | INLINE) - -@@ -105,3 +107,3 @@ typedef struct pgp_keyinfo *pgp_key_t; - --int mutt_protect (HEADER *, HEADER *, char *); -+int mutt_protect (HEADER *, char *); - ---- pgp.c Sep 2003 13:03:26 -0000 3.26 -+++ pgp.c Feb 2004 06:07:14 -0000 -@@ -1018,2 +1018,4 @@ char *pgp_findKeys (ADDRESS *to, ADDRESS - size_t keylist_used = 0; -+ LIST *hook_list = NULL; -+ LIST *hook = NULL; - ADDRESS *tmp = NULL, *addr = NULL; -@@ -1051,66 +1053,93 @@ char *pgp_findKeys (ADDRESS *to, ADDRESS - q = p; -- k_info = NULL; - -- if ((keyID = mutt_crypt_hook (p)) != NULL) -+ /* -+ * grab the list of matching hooks (matching on recipient address) -+ * process each entry singly so that auto key selection still works -+ */ -+ hook_list = mutt_crypt_hook (p); -+ hook = hook_list; -+ while (1) - { - int r; -- snprintf (buf, sizeof (buf), _("Use keyID = \"%s\" for %s?"), keyID, p->mailbox); -- if ((r = mutt_yesorno (buf, M_YES)) == M_YES) -+ -+ k_info = NULL; -+ key = NULL; -+ -+ if (hook) - { -- if (is_numerical_keyid (keyID)) -+ keyID = (char *)hook->data; -+ snprintf (buf, sizeof (buf), _("Use keyID = \"%s\" for %s?"), keyID, p->mailbox); -+ if (!option(OPTCRYPTCONFIRMHOOK) || (r = mutt_yesorno (buf, M_YES)) == M_YES) - { -- if (strncmp (keyID, "0x", 2) == 0) -- keyID += 2; -- goto bypass_selection; /* you don't see this. */ -+ if (is_numerical_keyid (keyID)) -+ { -+ if (strncmp (keyID, "0x", 2) == 0) -+ keyID += 2; -+ goto bypass_selection; /* you don't see this. */ -+ } -+ -+ /* check for e-mail address */ -+ if ((t = strchr (keyID, '@')) && -+ (addr = rfc822_parse_adrlist (NULL, keyID))) -+ { -+ if (fqdn) rfc822_qualify (addr, fqdn); -+ q = addr; -+ } -+ else -+ k_info = pgp_getkeybystr (keyID, KEYFLAG_CANENCRYPT, PGP_PUBRING); - } -- -- /* check for e-mail address */ -- if ((t = strchr (keyID, '@')) && -- (addr = rfc822_parse_adrlist (NULL, keyID))) -+ else if (r == -1) - { -- if (fqdn) rfc822_qualify (addr, fqdn); -- q = addr; -+ /* -+ * yes, this implies that if one key fails they all do -+ */ -+ FREE (&keylist); -+ rfc822_free_address (&tmp); -+ rfc822_free_address (&addr); -+ mutt_free_list (&hook_list); -+ return NULL; - } -- else -- k_info = pgp_getkeybystr (keyID, KEYFLAG_CANENCRYPT, PGP_PUBRING); - } -- else if (r == -1) -- { -- FREE (&keylist); -- rfc822_free_address (&tmp); -- rfc822_free_address (&addr); -- return NULL; -- } -- } - -- if (k_info == NULL) -- pgp_invoke_getkeys (q); -- -- if (k_info == NULL && (k_info = pgp_getkeybyaddr (q, KEYFLAG_CANENCRYPT, PGP_PUBRING)) == NULL) -- { -- snprintf (buf, sizeof (buf), _("Enter keyID for %s: "), q->mailbox); -+ if (k_info == NULL) -+ pgp_invoke_getkeys (q); - -- if ((key = pgp_ask_for_key (buf, q->mailbox, -- KEYFLAG_CANENCRYPT, PGP_PUBRING)) == NULL) -+ if (k_info == NULL && (k_info = pgp_getkeybyaddr (q, KEYFLAG_CANENCRYPT, PGP_PUBRING)) == NULL) - { -- FREE (&keylist); -- rfc822_free_address (&tmp); -- rfc822_free_address (&addr); -- return NULL; -+ snprintf (buf, sizeof (buf), _("Enter keyID for %s: "), q->mailbox); -+ -+ if ((key = pgp_ask_for_key (buf, q->mailbox, -+ KEYFLAG_CANENCRYPT, PGP_PUBRING)) == NULL) -+ { -+ FREE (&keylist); -+ rfc822_free_address (&tmp); -+ rfc822_free_address (&addr); -+ mutt_free_list (&hook_list); -+ return NULL; -+ } - } -- } -- else -- key = k_info; -+ else -+ key = k_info; - -- keyID = pgp_keyid (key); -+ keyID = pgp_keyid (key); - - bypass_selection: -- keylist_size += mutt_strlen (keyID) + 4; -- safe_realloc (&keylist, keylist_size); -- sprintf (keylist + keylist_used, "%s0x%s", keylist_used ? " " : "", /* __SPRINTF_CHECKED__ */ -- keyID); -- keylist_used = mutt_strlen (keylist); -+ keylist_size += mutt_strlen (keyID) + 4; -+ safe_realloc (&keylist, keylist_size); -+ sprintf (keylist + keylist_used, "%s0x%s", keylist_used ? " " : "", /* __SPRINTF_CHECKED__ */ -+ keyID); -+ keylist_used = mutt_strlen (keylist); - -- pgp_free_key (&key); -- rfc822_free_address (&addr); -+ pgp_free_key (&key); -+ rfc822_free_address (&addr); -+ -+ if (!hook_list) -+ break; -+ -+ hook = hook->next; -+ if (!hook) -+ break; -+ -+ } -+ mutt_free_list (&hook_list); - ---- pgpkey.c Oct 2003 19:55:39 -0000 3.8 -+++ pgpkey.c Feb 2004 06:07:14 -0000 -@@ -437,4 +437,9 @@ static int pgp_id_matches_addr (ADDRESS - -+ -+#define pgp_trusted_id(uid) (!option(OPTPGPCHECKTRUST) \ -+ || (pgp_id_is_valid((uid)) \ -+ && pgp_id_is_strong((uid)))) -+ - static pgp_key_t pgp_select_key (pgp_key_t keys, -- ADDRESS * p, const char *s) -+ ADDRESS * p, const char *s) - { -@@ -452,2 +457,3 @@ static pgp_key_t pgp_select_key (pgp_key - -+ int keymatch = 0; /* count matching keys */ - int unusable = 0; -@@ -481,2 +487,3 @@ static pgp_key_t pgp_select_key (pgp_key - } -+ keymatch++; - } -@@ -489,2 +496,17 @@ static pgp_key_t pgp_select_key (pgp_key - } -+ else if (keymatch == 1 && option(OPTCRYPTAUTOSELECT)) -+ { -+ /* -+ * Only one matching key...see if there's an id with enough trust to auto-select -+ */ -+ kp = KeyTable[0]->parent; -+ for (a = kp->address; a; a = a->next) -+ { -+ if (pgp_trusted_id(a)) -+ { -+ safe_free ((void **) &KeyTable); -+ return (kp); -+ } -+ } -+ } - -@@ -599,5 +621,3 @@ static pgp_key_t pgp_select_key (pgp_key - -- if (option (OPTPGPCHECKTRUST) && -- (!pgp_id_is_valid (KeyTable[menu->current]) -- || !pgp_id_is_strong (KeyTable[menu->current]))) -+ if (!pgp_trusted_id(KeyTable[menu->current])) - { ---- postpone.c Sep 2003 17:22:09 -0000 3.9 -+++ postpone.c Feb 2004 06:07:14 -0000 -@@ -486,2 +486,7 @@ int mutt_parse_crypt_hdr (char *p, int s - -+ case 'i': -+ case 'I': -+ pgp |= INLINE; -+ break; -+ - default: ---- protos.h Feb 2004 17:10:43 -0000 3.19 -+++ protos.h Feb 2004 06:07:14 -0000 -@@ -131,3 +131,3 @@ const char *mutt_get_name (ADDRESS *); - char *mutt_get_parameter (const char *, PARAMETER *); --char *mutt_crypt_hook (ADDRESS *); -+LIST *mutt_crypt_hook (ADDRESS *); - char *mutt_make_date (char *, size_t); ---- send.c Jan 2004 10:03:46 -0000 3.29 -+++ send.c Feb 2004 06:07:14 -0000 -@@ -1258,2 +1258,9 @@ ci_send_message (int flags, /* send mod - msg->security |= SIGN; -+ if ((WithCrypto & APPLICATION_PGP) && (msg->security & (ENCRYPT | SIGN))) -+ { -+ if (option (OPTPGPAUTOINLINE)) -+ msg->security |= INLINE; -+ if (option (OPTPGPREPLYINLINE) && cur && (cur->security & INLINE)) -+ msg->security |= INLINE; -+ } - } -@@ -1496,3 +1503,3 @@ main_loop: - if ((crypt_get_keys (msg, &pgpkeylist) == -1) || -- mutt_protect (msg, cur, pgpkeylist) == -1) -+ mutt_protect (msg, pgpkeylist) == -1) - { -@@ -1576,3 +1583,3 @@ main_loop: - -- if (mutt_protect (msg, cur, pgpkeylist) == -1) -+ if (mutt_protect (msg, pgpkeylist) == -1) - { ---- sendlib.c Sep 2003 13:03:26 -0000 3.24 -+++ sendlib.c Feb 2004 06:07:14 -0000 -@@ -2407,2 +2407,4 @@ int mutt_write_fcc (const char *path, HE - } -+ if (hdr->security & INLINE) -+ fputc ('I', msg->fp); - fputc ('\n', msg->fp); ---- doc/manual.sgml.head Feb 2004 17:45:33 -0000 3.26 -+++ doc/manual.sgml.head Feb 2004 06:07:15 -0000 -@@ -1450,3 +1450,5 @@ normally use. The crypt-hook command pr - specify the ID of the public key to be used when encrypting messages to --a certain recipient. -+a certain recipient. You may use multiple pgp-hook's with the same -+pattern; multiple matching pgp-hook's result in the use of multiple -+keyids for recipient. - ---- doc/muttrc.man.head Feb 2004 17:10:43 -0000 3.10 -+++ doc/muttrc.man.head Feb 2004 06:07:15 -0000 -@@ -297,3 +297,6 @@ to a certain recipient. The meaning of - broadly: This can be a different e-mail address, a numerical key ID, --or even just an arbitrary search string. -+or even just an arbitrary search string. You may use multiple -+\fBpgp-hook\fPs with the same \fIpattern\fP; multiple matching -+\fBpgp-hook\fPs result in the use of multiple \fIkey-id\fPs for -+recipient. - .TP ---- po/ca.po Feb 2004 18:26:11 -0000 3.13 -+++ po/ca.po Feb 2004 06:07:15 -0000 -@@ -603,10 +603,10 @@ msgstr "Xifra amb: " - #: compose.c:165 --msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " --msgstr "PGP: (x)ifra, (s)igna, si(g)na com a, (a)mbdós, o en (c)lar? " -+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " -+msgstr "PGP: (x)ifra, (s)igna, s(i)gna com a, (a)mbdós, en (l)ínia, o en (c)lar? " - - # ivb (2003/03/26) --# ivb (x)ifra, (s)igna, si(g)na com a, (a)mbdós, (c)lar -+# ivb (x)ifra, (s)igna, s(i)gna com a, (a)mbdós, en (l)ínia, o en (c)lar - #: compose.c:166 --msgid "esabf" --msgstr "xsgac" -+msgid "esabif" -+msgstr "xsialc" - ---- po/cs.po Feb 2004 18:26:11 -0000 3.12 -+++ po/cs.po Feb 2004 06:07:16 -0000 -@@ -683,4 +683,4 @@ msgstr "Za¹ifrovat pomocí:" - #: compose.c:165 --msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " --msgstr "PGP - (¹)ifrovat, (p)odepsat, podepsat (j)ako, (o)bojí, èi (n)ic?" -+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " -+msgstr "PGP - (¹)ifrovat, (p)odepsat, podepsat (j)ako, (o)bojí, pøí(m)ý, èi (n)ic?" - -@@ -688,4 +688,4 @@ msgstr "PGP - (¹)ifrovat, (p)odepsat, po - #: compose.c:166 --msgid "esabf" --msgstr "¹pjon" -+msgid "esabif" -+msgstr "¹pjomn" - ---- po/da.po Feb 2004 18:26:11 -0000 3.11 -+++ po/da.po Feb 2004 06:07:16 -0000 -@@ -578,8 +578,8 @@ msgstr "Kryptér" - #, fuzzy --msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " --msgstr "(k)ryptér, (u)nderskriv, underskriv (s)om, (b)egge, (i)ngen PGP" -+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " -+msgstr "(k)ryptér, (u)nderskriv, underskriv (s)om, (b)egge, i(n)tegreret, (i)ngen PGP" - - #: compose.c:166 --msgid "esabf" --msgstr "kusbi" -+msgid "esabif" -+msgstr "kusbni" - ---- po/de.po Feb 2004 18:26:11 -0000 3.15 -+++ po/de.po Feb 2004 06:07:16 -0000 -@@ -569,8 +569,8 @@ msgstr "Verschlüsseln mit: " - #: compose.c:165 --msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " --msgstr "PGP (v)erschl., (s)ign., sign. (a)ls, (b)eides, (k)ein PGP? " -+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " -+msgstr "PGP (v)erschl., (s)ign., sign. (a)ls, (b)eides, (i)nline, (k)ein PGP? " - - #: compose.c:166 --msgid "esabf" --msgstr "vsabk" -+msgid "esabif" -+msgstr "vsabik" - ---- po/el.po Feb 2004 18:26:11 -0000 3.12 -+++ po/el.po Feb 2004 06:07:17 -0000 -@@ -700,4 +700,4 @@ msgstr "ÊñõðôïãñÜöçóç ìå: " - #: compose.c:165 --msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " --msgstr "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, Þ (f)orget it? " -+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " -+msgstr "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)êåßìåíï, Þ (f)orget it? " - -@@ -706,4 +706,4 @@ msgstr "PGP (e)ncrypt, (s)ign, sign (a)s - #: compose.c:166 --msgid "esabf" --msgstr "esabf" -+msgid "esabif" -+msgstr "esabif" - ---- po/eo.po Feb 2004 18:26:11 -0000 3.13 -+++ po/eo.po Feb 2004 06:07:17 -0000 -@@ -571,8 +571,8 @@ msgstr "Æifri per: " - #: compose.c:165 --msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " --msgstr "PGP æ(i)fri, (s)ubskribi, subskribi (k)iel, (a)mbaý, aý (f)orgesi? " -+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " -+msgstr "PGP æ(i)fri, (s)ubskribi, subskribi (k)iel, (a)mbaý, \"i(n)line\", aý (f)orgesi? " - - #: compose.c:166 --msgid "esabf" --msgstr "iskaf" -+msgid "esabif" -+msgstr "iskanf" - ---- po/es.po Feb 2004 18:26:11 -0000 3.14 -+++ po/es.po Feb 2004 06:07:17 -0000 -@@ -576,4 +576,4 @@ msgstr "Cifrar" - #, fuzzy --msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " --msgstr "¿co(d)ificar, f(i)rmar (c)omo, amb(o)s o ca(n)celar? " -+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " -+msgstr "¿co(d)ificar, f(i)rmar (c)omo, amb(o)s, inc(l)uido, o ca(n)celar? " - -@@ -581,4 +581,4 @@ msgstr "¿co(d)ificar, f(i)rmar (c)omo, a - #, fuzzy --msgid "esabf" --msgstr "dicon" -+msgid "esabif" -+msgstr "dicoln" - ---- po/et.po Feb 2004 18:26:11 -0000 3.13 -+++ po/et.po Feb 2004 06:07:18 -0000 -@@ -571,8 +571,8 @@ msgstr "Krüpti kasutades: " - #: compose.c:165 --msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " --msgstr "PGP (k)rüpti, (a)llkiri, allk. ku(i), (m)õlemad või (u)nusta? " -+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " -+msgstr "PGP (k)rüpti, (a)llkiri, allk. ku(i), (m)õlemad, k(e)hasse, või (u)nusta? " - - #: compose.c:166 --msgid "esabf" --msgstr "kaimu" -+msgid "esabif" -+msgstr "kaimeu" - ---- po/fr.po Feb 2004 18:26:11 -0000 3.23 -+++ po/fr.po Feb 2004 06:07:18 -0000 -@@ -596,8 +596,8 @@ msgstr "Chiffrer avec : " - #: compose.c:165 --msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " --msgstr "(c)hiffrer PGP, (s)igner, (e)n tant que, les (d)eux, ou (o)ublier ? " -+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " -+msgstr "(c)hiffrer PGP, (s)igner, (e)n tant que, les (d)eux, en (l)igne, ou (o)ublier ? " - - #: compose.c:166 --msgid "esabf" --msgstr "csedo" -+msgid "esabif" -+msgstr "csedlo" - ---- po/gl.po Feb 2004 18:26:11 -0000 3.11 -+++ po/gl.po Feb 2004 06:07:18 -0000 -@@ -580,8 +580,8 @@ msgstr "Encriptar" - #, fuzzy --msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " --msgstr "¿(e)ncriptar, (f)irmar, firmar (c)omo, (a)mbas ou (o)lvidar? " -+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " -+msgstr "¿(e)ncriptar, (f)irmar, firmar (c)omo, (a)mbas, (i)nterior, ou (o)lvidar? " - - #: compose.c:166 --msgid "esabf" --msgstr "efcao" -+msgid "esabif" -+msgstr "efcaio" - ---- po/hu.po Feb 2004 18:26:11 -0000 3.12 -+++ po/hu.po Feb 2004 06:07:19 -0000 -@@ -571,8 +571,8 @@ msgstr "Titkosítás: " - #: compose.c:165 --msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " --msgstr "PGP (t)itkosít, (a)láír, aláír (m)int, titkosít é(s) aláír, mé(g)se? " -+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " -+msgstr "PGP (t)itkosít, (a)láír, aláír (m)int, titkosít é(s) aláír, (b)eágyazott, mé(g)se? " - - #: compose.c:166 --msgid "esabf" --msgstr "tamsg" -+msgid "esabif" -+msgstr "tamsbg" - ---- po/id.po Feb 2004 18:26:12 -0000 3.14 -+++ po/id.po Feb 2004 06:07:19 -0000 -@@ -572,8 +572,8 @@ msgstr "Enkrip dengan: " - #: compose.c:165 --msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " --msgstr "PGP (e)nkrip, (t)andatangan, tandatangan (s)bg, ke(d)uanya, (b)atal? " -+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " -+msgstr "PGP (e)nkrip, (t)andatangan, tandatangan (s)bg, ke(d)uanya, (i)nline, (b)atal? " - - #: compose.c:166 --msgid "esabf" --msgstr "etsdb" -+msgid "esabif" -+msgstr "etsdib" - ---- po/it.po Feb 2004 18:26:12 -0000 3.11 -+++ po/it.po Feb 2004 06:07:19 -0000 -@@ -582,8 +582,8 @@ msgstr "Crittografa" - #, fuzzy --msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " --msgstr "cifra(e), firma(s), firma come(a), entrambi(b), annulla(f) " -+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " -+msgstr "cifra(e), firma(s), firma come(a), entrambi(b), in l(i)nea , annulla(f) " - - #: compose.c:166 --msgid "esabf" --msgstr "esabf" -+msgid "esabif" -+msgstr "esabif" - ---- po/ja.po Feb 2004 18:26:12 -0000 3.21 -+++ po/ja.po Feb 2004 06:07:20 -0000 -@@ -569,8 +569,8 @@ msgstr " °Å¹æ²½Êý¼°: " - #: compose.c:165 --msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " --msgstr "PGP (e)°Å¹æ²½,(s)½ð̾,(a)..¤È¤·¤Æ½ð̾,(b)ξ¼Ô,(f)²ò½ü?" -+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " -+msgstr "PGP (e)°Å¹æ²½,(s)½ð̾,(a)..¤È¤·¤Æ½ð̾,(b)ξ¼Ô,(i)nline,(f)²ò½ü?" - - #: compose.c:166 --msgid "esabf" --msgstr "esabf" -+msgid "esabif" -+msgstr "esabif" - ---- po/ko.po Feb 2004 18:26:12 -0000 3.15 -+++ po/ko.po Feb 2004 06:07:20 -0000 -@@ -570,8 +570,8 @@ msgstr "¾ÏÈ£È ¹æ½Ä: " - #: compose.c:165 --msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " --msgstr "PGP ¾ÏÈ£È(e), ¼¸í(s), »ç¿ë ¼¸í(a), µÑ ´Ù(b), Ãë¼Ò(f)? " -+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " -+msgstr "PGP ¾ÏÈ£È(e), ¼¸í(s), »ç¿ë ¼¸í(a), µÑ ´Ù(b), (i)nline, Ãë¼Ò(f)? " - - #: compose.c:166 --msgid "esabf" --msgstr "esabf" -+msgid "esabif" -+msgstr "esabif" - ---- po/lt.po Feb 2004 18:26:12 -0000 3.11 -+++ po/lt.po Feb 2004 06:07:20 -0000 -@@ -578,5 +578,5 @@ msgstr "Uþðifruoti" - #, fuzzy --msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " -+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " - msgstr "" --"(u)þðifruot, pa(s)iraðyt, pasiraðyt k(a)ip, a(b)u, rinktis (m)ic algoritmà, " -+"(u)þðifruot, pa(s)iraðyt, pasiraðyt k(a)ip, a(b)u, (l)aiðke, " - "ar (p)amirðti?" -@@ -585,4 +585,4 @@ msgstr "" - #, fuzzy --msgid "esabf" --msgstr "usabmp" -+msgid "esabif" -+msgstr "usablp" - -@@ -598,4 +598,3 @@ msgid "" - msgstr "" --"(u)þðifruot, pa(s)iraðyt, pasiraðyt k(a)ip, a(b)u, rinktis (m)ic algoritmà, " --"ar (p)amirðti?" -+"(u)þðifruot, pa(s)iraðyt, uþðifruo(t) su, pasiraðyt k(a)ip, a(b)u, ar (p)amirðti?" - -@@ -604,3 +603,3 @@ msgstr "" - msgid "eswabf" --msgstr "usabmp" -+msgstr "ustabp" - ---- po/nl.po Feb 2004 18:26:12 -0000 3.16 -+++ po/nl.po Feb 2004 06:07:21 -0000 -@@ -568,8 +568,8 @@ msgstr "Versleutelen met: " - #: compose.c:165 --msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " --msgstr "PGP (v)ersleutel, (o)ndertekenen, ondert. (a)ls, (b)eiden, (g)een? " -+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " -+msgstr "PGP (v)ersleutel, (o)ndertekenen, ondert. (a)ls, (b)eiden, ber(i)cht, (g)een? " - - #: compose.c:166 --msgid "esabf" --msgstr "voabg" -+msgid "esabif" -+msgstr "voabig" - ---- po/pl.po Feb 2004 18:26:12 -0000 3.17 -+++ po/pl.po Feb 2004 06:07:21 -0000 -@@ -571,8 +571,8 @@ msgstr "Zaszyfruj u¿ywaj±c: " - #: compose.c:165 --msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " --msgstr "PGP: (z)aszyfruj, podpi(s)z, podpisz j(a)ko, o(b)a, b(e)z PGP? " -+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " -+msgstr "PGP: (z)aszyfruj, podpi(s)z, podpisz j(a)ko, o(b)a, (i)nline, b(e)z PGP? " - - #: compose.c:166 --msgid "esabf" --msgstr "zsabe" -+msgid "esabif" -+msgstr "zsabie" - ---- po/pt_BR.po Feb 2004 18:26:13 -0000 3.12 -+++ po/pt_BR.po Feb 2004 06:07:21 -0000 -@@ -581,5 +581,5 @@ msgstr "Encriptar" - #, fuzzy --msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " -+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " - msgstr "" --"(e)ncripa, a(s)sina, assina (c)omo, (a)mbos, escolhe (m)ic, ou es(q)uece? " -+"(e)ncripa, a(s)sina, assina (c)omo, (a)mbos, em l(i)nha, ou es(q)uece? " - -@@ -587,4 +587,4 @@ msgstr "" - #, fuzzy --msgid "esabf" --msgstr "escamq" -+msgid "esabif" -+msgstr "escaiq" - -@@ -600,3 +600,3 @@ msgid "" - msgstr "" --"(e)ncripa, a(s)sina, assina (c)omo, (a)mbos, escolhe (m)ic, ou es(q)uece? " -+"(e)ncripa, a(s)sina, e(n)cripa com, assina (c)omo, (a)mbos, ou es(q)uece? " - -@@ -605,3 +605,3 @@ msgstr "" - msgid "eswabf" --msgstr "escamq" -+msgstr "esncaq" - ---- po/ru.po Feb 2004 18:26:13 -0000 3.19 -+++ po/ru.po Feb 2004 06:07:22 -0000 -@@ -577,8 +577,8 @@ msgstr "úÁÛÉÆÒÏ×ÁÔØ: " - #: compose.c:165 --msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " --msgstr "PGP (e)ÛÉÆÒ, (s)ÐÏÄÐÉÓØ, (a)ÐÏÄÐÉÓØ ËÁË, (b)ÏÂÁ, (f)ÏÔËÁÚÁÔØÓÑ? " -+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " -+msgstr "PGP (e)ÛÉÆÒ, (s)ÐÏÄÐÉÓØ, (a)ÐÏÄÐÉÓØ ËÁË, (b)ÏÂÁ, (i)nline, (f)ÏÔËÁÚÁÔØÓÑ? " - - #: compose.c:166 --msgid "esabf" --msgstr "esabf" -+msgid "esabif" -+msgstr "esabif" - ---- po/sk.po Feb 2004 18:26:13 -0000 3.11 -+++ po/sk.po Feb 2004 06:07:22 -0000 -@@ -586,5 +586,5 @@ msgstr "Za¹ifruj" - #, fuzzy --msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " -+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " - msgstr "" --"(e)-¹ifr, (s)-podp, podp (a)ko, o(b)e, oznaè alg. mi(c), alebo (f)-zabudnú» " -+"(e)-¹ifr, (s)-podp, podp (a)ko, o(b)e, (i)nline, alebo (f)-zabudnú» " - "na to? " -@@ -593,4 +593,4 @@ msgstr "" - #, fuzzy --msgid "esabf" --msgstr "esabmf" -+msgid "esabif" -+msgstr "esabif" - -@@ -606,4 +606,3 @@ msgid "" - msgstr "" --"(e)-¹ifr, (s)-podp, podp (a)ko, o(b)e, oznaè alg. mi(c), alebo (f)-zabudnú» " --"na to? " -+"(e)-¹ifr, (s)-podp, (w)-¹ifr s, podp (a)ko, o(b)e, alebo (f)-zabudnú» na to? " - -@@ -612,3 +611,3 @@ msgstr "" - msgid "eswabf" --msgstr "esabmf" -+msgstr "eswabf" - ---- po/sv.po Feb 2004 18:26:13 -0000 3.12 -+++ po/sv.po Feb 2004 06:07:22 -0000 -@@ -568,8 +568,8 @@ msgstr "Kryptera med: " - #: compose.c:165 --msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " --msgstr "PGP: (k)ryptera, (s)ignera, signera s(o)m, (b)åda, eller sk(i)ppa det?" -+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " -+msgstr "PGP: (k)ryptera, (s)ignera, signera s(o)m, (b)åda, i(n)fogat, eller sk(i)ppa det?" - - #: compose.c:166 --msgid "esabf" --msgstr "ksobi" -+msgid "esabif" -+msgstr "ksobni" - ---- po/tr.po Feb 2004 18:26:13 -0000 3.11 -+++ po/tr.po Feb 2004 06:07:22 -0000 -@@ -577,5 +577,5 @@ msgstr "Þifrele" - #, fuzzy --msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " -+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " - msgstr "" --"þ(i)frele, i(m)zala, (f)arklý imzala, i(k)isi de, mi(c) algoritmini seç " -+"þ(i)frele, i(m)zala, (f)arklý imzala, i(k)isi de, (i)nline, " - "yoksa i(p)talmý? " -@@ -583,4 +583,4 @@ msgstr "" - #: compose.c:166 --msgid "esabf" --msgstr "imfkcp" -+msgid "esabif" -+msgstr "imfkip" - ---- po/uk.po Feb 2004 18:26:13 -0000 3.12 -+++ po/uk.po Feb 2004 06:07:23 -0000 -@@ -572,8 +572,8 @@ msgstr "ûÉÆÒÕ×ÁÎÎÑ" - #, fuzzy --msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " --msgstr "ÛÉÆÒ.(e), ЦÄÐ.(s), ЦÄÐ. ÑË(a), ÕÓÅ(b) ÞÉ ×¦ÄͦÎÁ(f)? " -+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " -+msgstr "ÛÉÆÒ.(e), ЦÄÐ.(s), ЦÄÐ. ÑË(a), ÕÓÅ(b), (i)nline ÞÉ ×¦ÄͦÎÁ(f)? " - - #: compose.c:166 --msgid "esabf" --msgstr "" -+msgid "esabif" -+msgstr "esabif" - ---- po/zh_CN.po Feb 2004 18:26:13 -0000 3.11 -+++ po/zh_CN.po Feb 2004 06:07:23 -0000 -@@ -585,5 +585,5 @@ msgstr "¼ÓÃÜ" - #, fuzzy --msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " -+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " - msgstr "" --"(e)¼ÓÃÜ, (s)Ç©Ãû, (a)ÓñðµÄÉí·ÝÇ©, (b)Á½Õß½ÔÒª, Ñ¡Ôñ (m)ic ÑÝËã·¨ »ò (f)·Å" -+"(e)¼ÓÃÜ, (s)Ç©Ãû, (a)ÓñðµÄÉí·ÝÇ©, (b)Á½Õß½ÔÒª, (i)nline, »ò (f)·Å" - "Æú£¿" -@@ -591,4 +591,4 @@ msgstr "" - #: compose.c:166 --msgid "esabf" --msgstr "" -+msgid "esabif" -+msgstr "esabif" - ---- po/zh_TW.po Feb 2004 18:26:13 -0000 3.11 -+++ po/zh_TW.po Feb 2004 06:07:24 -0000 -@@ -577,3 +577,3 @@ msgstr "åŠ å¯†" - #, fuzzy --msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it? " -+msgid "PGP (e)ncrypt, (s)ign, sign (a)s, (b)oth, (i)nline, or (f)orget it? " - msgstr "(1)åŠ å¯†, (2)ç°½å, (3)用別的身份簽, (4)兩者皆è¦, 或 (5)放棄?" -@@ -581,4 +581,4 @@ msgstr "(1)åŠ å¯†, (2)ç°½å, (3)用別ç - #: compose.c:166 --msgid "esabf" --msgstr "12345" -+msgid "esabif" -+msgstr "1234i5" - diff --git a/mail/mutt-devel/files/extra-patch-reverse_reply b/mail/mutt-devel/files/extra-patch-reverse_reply deleted file mode 100644 index 4605f77de67d..000000000000 --- a/mail/mutt-devel/files/extra-patch-reverse_reply +++ /dev/null @@ -1,92 +0,0 @@ -diff -u PATCHES PATCHES ---- PATCHES -+++ PATCHES -@@ -0,0 +1 @@ -+patch-1.5.6.cb.reverse_reply.2 ---- init.h.orig 2005-03-01 16:56:02.000000000 +0100 -+++ init.h 2005-05-25 18:20:57.000000000 +0200 -@@ -2257,6 +2257,13 @@ - ** possibly including eventual real names. When it is unset, mutt will - ** override any such real names with the setting of the $realname variable. - */ -+ { "reverse_reply", DT_BOOL, R_NONE, OPTREVREPLY, 0 }, -+ /* -+ ** .pp -+ ** When set, this variable uses the name from your aliases in the To and Cc -+ ** headers of reply mails you send, like $reverse_alias does in the index. -+ ** When unset, the headers taken from the original mail are left unchanged. -+ */ - { "rfc2047_parameters", DT_BOOL, R_NONE, OPTRFC2047PARAMS, 0 }, - /* - ** .pp ---- mutt.h.orig 2005-02-28 16:13:57.000000000 +0100 -+++ mutt.h 2005-05-25 18:20:57.000000000 +0200 -@@ -410,6 +410,7 @@ - OPTREVALIAS, - OPTREVNAME, - OPTREVREAL, -+ OPTREVREPLY, - OPTRFC2047PARAMS, - OPTSAVEADDRESS, - OPTSAVEEMPTY, ---- protos.h.orig Wed Jul 12 01:32:28 2006 -+++ protos.h Mon Jul 17 16:14:16 2006 -@@ -92,6 +92,7 @@ - ADDRESS *mutt_lookup_alias (const char *s); - ADDRESS *mutt_remove_duplicates (ADDRESS *); - ADDRESS *mutt_remove_xrefs (ADDRESS *, ADDRESS *); -+ADDRESS *mutt_reverse_address (ADDRESS *); - ADDRESS *mutt_expand_aliases (ADDRESS *); - ADDRESS *mutt_parse_adrlist (ADDRESS *, const char *); - ---- send.c.orig 2005-02-03 19:47:53.000000000 +0100 -+++ send.c 2005-05-25 18:20:57.000000000 +0200 -@@ -588,6 +588,10 @@ - /* the CC field can get cluttered, especially with lists */ - env->to = mutt_remove_duplicates (env->to); - env->cc = mutt_remove_duplicates (env->cc); -+ if (option (OPTREVREPLY)){ -+ env->to = mutt_reverse_address (env->to); -+ env->cc = mutt_reverse_address (env->cc); -+ } - env->cc = mutt_remove_xrefs (env->to, env->cc); - } - ---- sendlib.c.orig 2005-02-21 05:45:57.000000000 +0100 -+++ sendlib.c 2005-05-25 18:20:57.000000000 +0200 -@@ -2341,6 +2341,35 @@ - } - } - -+/* given a list of addresses, return a list of reverse_alias'ed addresses */ -+ADDRESS *mutt_reverse_address (ADDRESS *addr) -+{ -+ ADDRESS *top,*tmp,*alias; -+ -+ if (addr == NULL) -+ return NULL; -+ -+ if ((alias = alias_reverse_lookup (addr)) && alias->personal) { -+ tmp = rfc822_cpy_adr_real(alias); -+ tmp->next = addr->next; -+ addr->next = NULL; -+ rfc822_free_address(&addr); -+ addr = tmp; -+ } -+ -+ for (top = addr; top->next != NULL; top = tmp) { -+ tmp = top->next; -+ if ((alias = alias_reverse_lookup (tmp)) && alias->personal) { -+ top->next = rfc822_cpy_adr_real(alias); -+ top->next->next = tmp->next; -+ tmp->next = NULL; -+ rfc822_free_address(&tmp); -+ tmp = top->next; -+ } -+ } -+ return addr; -+} -+ - int mutt_write_fcc (const char *path, HEADER *hdr, const char *msgid, int post, char *fcc) - { - CONTEXT f; diff --git a/mail/mutt-devel/files/extra-patch-sidebar b/mail/mutt-devel/files/extra-patch-sidebar deleted file mode 100644 index eeb4a4940bc3..000000000000 --- a/mail/mutt-devel/files/extra-patch-sidebar +++ /dev/null @@ -1,1603 +0,0 @@ ---- orig/buffy.c.orig 2010-09-18 14:12:40.000000000 +0200 -+++ new/buffy.c 2010-09-18 14:17:36.000000000 +0200 -@@ -161,6 +161,49 @@ - } - } - -+static int buffy_compare_name(const void *a, const void *b) { -+ const BUFFY *b1 = * (BUFFY * const *) a; -+ const BUFFY *b2 = * (BUFFY * const *) b; -+ -+ return mutt_strcoll(b1->path, b2->path); -+} -+ -+static BUFFY *buffy_sort(BUFFY *b) -+{ -+ BUFFY *tmp = b; -+ int buffycount = 0; -+ BUFFY **ary; -+ int i; -+ -+ if (!option(OPTSIDEBARSORT)) -+ return b; -+ -+ for (; tmp != NULL; tmp = tmp->next) -+ buffycount++; -+ -+ ary = (BUFFY **) safe_calloc(buffycount, sizeof (*ary)); -+ -+ tmp = b; -+ for (i = 0; tmp != NULL; tmp = tmp->next, i++) { -+ ary[i] = tmp; -+ } -+ -+ qsort(ary, buffycount, sizeof(*ary), buffy_compare_name); -+ -+ for (i = 0; i < buffycount - 1; i++) { -+ ary[i]->next = ary[i+1]; -+ } -+ ary[buffycount - 1]->next = NULL; -+ for (i = 1; i < buffycount; i++) { -+ ary[i]->prev = ary[i-1]; -+ } -+ ary[0]->prev = NULL; -+ -+ tmp = ary[0]; -+ free(ary); -+ return tmp; -+} -+ - BUFFY *mutt_find_mailbox (const char *path) - { - BUFFY *tmp = NULL; -@@ -282,6 +325,7 @@ - else - (*tmp)->size = 0; - } -+ Incoming = buffy_sort(Incoming); - return 0; - } - -@@ -371,12 +415,17 @@ - return rc; - } - -+#define STAT_CHECK_SIZE (sb.st_size > tmp->size) -+#define STAT_CHECK_TIME (sb.st_mtime > sb.st_atime || (tmp->newly_created && sb.st_ctime == sb.st_mtime && sb.st_ctime == sb.st_atime)) -+#define STAT_CHECK (option(OPTCHECKMBOXSIZE) ? STAT_CHECK_SIZE : STAT_CHECK_TIME) -+ - int mutt_buffy_check (int force) - { - BUFFY *tmp; - struct stat sb; - struct stat contex_sb; - time_t t; -+ CONTEXT *ctx; - - sb.st_size=0; - contex_sb.st_dev=0; -@@ -416,6 +465,8 @@ - - for (tmp = Incoming; tmp; tmp = tmp->next) - { -+ if ( tmp->new == 1 ) -+ tmp->has_new = 1; - if (tmp->magic != M_IMAP) - { - tmp->new = 0; -@@ -455,18 +506,122 @@ - { - case M_MBOX: - case M_MMDF: -- if (buffy_mbox_hasnew (tmp, &sb) > 0) -- BuffyCount++; -- break; -+ { -+ if (STAT_CHECK || tmp->msgcount == 0) -+ { -+ BUFFY b = *tmp; -+ int msgcount = 0; -+ int msg_unread = 0; -+ /* parse the mailbox, to see how much mail there is */ -+ ctx = mx_open_mailbox( tmp->path, M_READONLY | M_QUIET | M_NOSORT | M_PEEK, NULL); -+ if(ctx) -+ { -+ msgcount = ctx->msgcount; -+ msg_unread = ctx->unread; -+ mx_close_mailbox(ctx, 0); -+ } -+ *tmp = b; -+ tmp->msgcount = msgcount; -+ tmp->msg_unread = msg_unread; -+ if(STAT_CHECK) { -+ tmp->has_new = tmp->new = 1; -+ BuffyCount++; -+ } -+ } -+ else if (option(OPTCHECKMBOXSIZE)) -+ { -+ /* some other program has deleted mail from the folder */ -+ tmp->size = (off_t) sb.st_size; -+ } -+ if (tmp->newly_created && -+ (sb.st_ctime != sb.st_mtime || sb.st_ctime != sb.st_atime)) -+ tmp->newly_created = 0; -+ } -+ break; -+ - - case M_MAILDIR: -- if (buffy_maildir_hasnew (tmp) > 0) -- BuffyCount++; -+ { -+ char path[_POSIX_PATH_MAX]; -+ DIR *dirp; -+ struct dirent *de; -+ /* count new message */ -+ snprintf (path, sizeof (path), "%s/new", tmp->path); -+ if ((dirp = opendir (path)) == NULL) -+ { -+ tmp->magic = 0; -+ break; -+ } -+ tmp->msgcount = 0; -+ tmp->msg_unread = 0; -+ tmp->msg_flagged = 0; -+ while ((de = readdir (dirp)) != NULL) -+ { -+ char *p; -+ if (*de->d_name != '.' && -+ (!(p = strstr (de->d_name, ":2,")) || !strchr (p + 3, 'T'))) -+ { -+ tmp->has_new = tmp->new = 1; -+ tmp->msgcount++; -+ tmp->msg_unread++; -+ } -+ } -+ if(tmp->msg_unread) -+ BuffyCount++; -+ -+ closedir (dirp); -+ -+ /* -+ * count read messages (for folderlist (sidebar) we also need to count -+ * messages in cur so that we the total number of messages -+ */ -+ snprintf (path, sizeof (path), "%s/cur", tmp->path); -+ if ((dirp = opendir (path)) == NULL) -+ { -+ tmp->magic = 0; -+ break; -+ } -+ while ((de = readdir (dirp)) != NULL) -+ { -+ char *p; -+ if (*de->d_name != '.') { -+ if ((p = strstr (de->d_name, ":2,"))) { -+ if (!strchr (p + 3, 'T')) { -+ tmp->msgcount++; -+ if ( !strchr (p + 3, 'S')) -+ tmp->msg_unread++; -+ if (strchr(p + 3, 'F')) -+ tmp->msg_flagged++; -+ } -+ } else -+ tmp->msgcount++; -+ } -+ } -+ closedir (dirp); -+ } - break; - - case M_MH: -- if ((tmp->new = mh_buffy (tmp->path)) > 0) -- BuffyCount++; -+ { -+ DIR *dp; -+ char path[_POSIX_PATH_MAX]; -+ struct dirent *de; -+ if ((tmp->new = mh_buffy (tmp->path)) > 0) -+ BuffyCount++; -+ -+ if ((dp = opendir (path)) == NULL) -+ break; -+ tmp->msgcount = 0; -+ while ((de = readdir (dp))) -+ { -+ if (mh_valid_message (de->d_name)) -+ { -+ tmp->msgcount++; -+ tmp->has_new = tmp->new = 1; -+ } -+ } -+ closedir (dp); -+ } - break; - } - } -*** mutt-1.5.20-orig/buffy.h 2009-04-30 00:36:16.000000000 -0500 ---- mutt-1.5.20-patched/buffy.h 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 25,31 **** ---- 25,36 ---- - char path[_POSIX_PATH_MAX]; - off_t size; - struct buffy_t *next; -+ struct buffy_t *prev; - short new; /* mailbox has new mail */ -+ short has_new; /* set it new if new and not read */ -+ int msgcount; /* total number of messages */ -+ int msg_unread; /* number of unread messages */ -+ int msg_flagged; /* number of flagged messages */ - short notified; /* user has been notified */ - short magic; /* mailbox type */ - short newly_created; /* mbox or mmdf just popped into existence */ -*** mutt-1.5.20-orig/color.c 2009-05-18 19:11:35.000000000 -0500 ---- mutt-1.5.20-patched/color.c 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 93,98 **** ---- 93,100 ---- - { "bold", MT_COLOR_BOLD }, - { "underline", MT_COLOR_UNDERLINE }, - { "index", MT_COLOR_INDEX }, -+ { "sidebar_new", MT_COLOR_NEW }, -+ { "sidebar_flagged", MT_COLOR_FLAGGED }, - { NULL, 0 } - }; - -*** mutt-1.5.20-orig/curs_main.c 2009-06-13 21:48:36.000000000 -0500 ---- mutt-1.5.20-patched/curs_main.c 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 26,32 **** ---- 26,34 ---- - #include "mailbox.h" - #include "mapping.h" - #include "sort.h" -+ #include "buffy.h" - #include "mx.h" -+ #include "sidebar.h" - - #ifdef USE_POP - #include "pop.h" -*************** -*** 523,530 **** - menu->redraw |= REDRAW_STATUS; - if (do_buffy_notify) - { -! if (mutt_buffy_notify () && option (OPTBEEPNEW)) -! beep (); - } - else - do_buffy_notify = 1; ---- 525,536 ---- - menu->redraw |= REDRAW_STATUS; - if (do_buffy_notify) - { -! if (mutt_buffy_notify ()) -! { -! menu->redraw |= REDRAW_FULL; -! if (option (OPTBEEPNEW)) -! beep (); -! } - } - else - do_buffy_notify = 1; -*************** -*** 536,541 **** ---- 542,548 ---- - if (menu->redraw & REDRAW_FULL) - { - menu_redraw_full (menu); -+ draw_sidebar(menu->menu); - mutt_show_error (); - } - -*************** -*** 558,567 **** ---- 565,577 ---- - - if (menu->redraw & REDRAW_STATUS) - { -+ DrawFullLine = 1; - menu_status_line (buf, sizeof (buf), menu, NONULL (Status)); -+ DrawFullLine = 0; - CLEARLINE (option (OPTSTATUSONTOP) ? 0 : LINES-2); - SETCOLOR (MT_COLOR_STATUS); - BKGDSET (MT_COLOR_STATUS); -+ set_buffystats(Context); - mutt_paddstr (COLS, buf); - SETCOLOR (MT_COLOR_NORMAL); - BKGDSET (MT_COLOR_NORMAL); -*************** -*** 575,581 **** - menu->oldcurrent = -1; - - if (option (OPTARROWCURSOR)) -! move (menu->current - menu->top + menu->offset, 2); - else if (option (OPTBRAILLEFRIENDLY)) - move (menu->current - menu->top + menu->offset, 0); - else ---- 585,591 ---- - menu->oldcurrent = -1; - - if (option (OPTARROWCURSOR)) -! move (menu->current - menu->top + menu->offset, SidebarWidth + 2); - else if (option (OPTBRAILLEFRIENDLY)) - move (menu->current - menu->top + menu->offset, 0); - else -*************** -*** 1055,1060 **** ---- 1065,1071 ---- - menu->redraw = REDRAW_FULL; - break; - -+ case OP_SIDEBAR_OPEN: - case OP_MAIN_CHANGE_FOLDER: - case OP_MAIN_NEXT_UNREAD_MAILBOX: - -*************** -*** 1086,1092 **** - { - mutt_buffy (buf, sizeof (buf)); - -! if (mutt_enter_fname (cp, buf, sizeof (buf), &menu->redraw, 1) == -1) - { - if (menu->menu == MENU_PAGER) - { ---- 1097,1107 ---- - { - mutt_buffy (buf, sizeof (buf)); - -! if ( op == OP_SIDEBAR_OPEN ) { -! if(!CurBuffy) -! break; -! strncpy( buf, CurBuffy->path, sizeof(buf) ); -! } else if (mutt_enter_fname (cp, buf, sizeof (buf), &menu->redraw, 1) == -1) - { - if (menu->menu == MENU_PAGER) - { -*************** -*** 1104,1109 **** ---- 1119,1125 ---- - } - - mutt_expand_path (buf, sizeof (buf)); -+ set_curbuffy(buf); - if (mx_get_magic (buf) <= 0) - { - mutt_error (_("%s is not a mailbox."), buf); -*************** -*** 2183,2188 **** ---- 2199,2210 ---- - mutt_what_key(); - break; - -+ case OP_SIDEBAR_SCROLL_UP: -+ case OP_SIDEBAR_SCROLL_DOWN: -+ case OP_SIDEBAR_NEXT: -+ case OP_SIDEBAR_PREV: -+ scroll_sidebar(op, menu->menu); -+ break; - default: - if (menu->menu == MENU_MAIN) - km_error_key (MENU_MAIN); -*** mutt-1.5.20-orig/flags.c 2008-12-16 21:50:09.000000000 -0600 ---- mutt-1.5.20-patched/flags.c 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 22,29 **** ---- 22,31 ---- - - #include "mutt.h" - #include "mutt_curses.h" -+ #include "mutt_menu.h" - #include "sort.h" - #include "mx.h" -+ #include "sidebar.h" - - void _mutt_set_flag (CONTEXT *ctx, HEADER *h, int flag, int bf, int upd_ctx) - { -*************** -*** 263,268 **** ---- 265,271 ---- - */ - if (h->searched && (changed != h->changed || deleted != ctx->deleted || tagged != ctx->tagged || flagged != ctx->flagged)) - h->searched = 0; -+ draw_sidebar(0); - } - - void mutt_tag_set_flag (int flag, int bf) -*** mutt-1.5.20-orig/functions.h 2009-04-30 00:36:17.000000000 -0500 ---- mutt-1.5.20-patched/functions.h 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 168,173 **** ---- 168,178 ---- - { "decrypt-save", OP_DECRYPT_SAVE, NULL }, - - -+ { "sidebar-scroll-up", OP_SIDEBAR_SCROLL_UP, NULL }, -+ { "sidebar-scroll-down", OP_SIDEBAR_SCROLL_DOWN, NULL }, -+ { "sidebar-next", OP_SIDEBAR_NEXT, NULL }, -+ { "sidebar-prev", OP_SIDEBAR_PREV, NULL }, -+ { "sidebar-open", OP_SIDEBAR_OPEN, NULL }, - { NULL, 0, NULL } - }; - -*************** -*** 268,273 **** ---- 273,283 ---- - - { "what-key", OP_WHAT_KEY, NULL }, - -+ { "sidebar-scroll-up", OP_SIDEBAR_SCROLL_UP, NULL }, -+ { "sidebar-scroll-down", OP_SIDEBAR_SCROLL_DOWN, NULL }, -+ { "sidebar-next", OP_SIDEBAR_NEXT, NULL }, -+ { "sidebar-prev", OP_SIDEBAR_PREV, NULL }, -+ { "sidebar-open", OP_SIDEBAR_OPEN, NULL }, - { NULL, 0, NULL } - }; - -*** mutt-1.5.20-orig/globals.h 2009-06-03 15:48:31.000000000 -0500 ---- mutt-1.5.20-patched/globals.h 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 117,122 **** ---- 117,123 ---- - WHERE char *SendCharset; - WHERE char *Sendmail; - WHERE char *Shell; -+ WHERE char *SidebarDelim; - WHERE char *Signature; - WHERE char *SimpleSearch; - #if USE_SMTP -*************** -*** 206,211 **** ---- 207,215 ---- - WHERE short ScoreThresholdRead; - WHERE short ScoreThresholdFlag; - -+ WHERE struct buffy_t *CurBuffy INITVAL(0); -+ WHERE short DrawFullLine INITVAL(0); -+ WHERE short SidebarWidth; - #ifdef USE_IMAP - WHERE short ImapKeepalive; - WHERE short ImapPipelineDepth; -*** mutt-1.5.20-orig/init.h 2009-06-13 16:35:21.000000000 -0500 ---- mutt-1.5.20-patched/init.h 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 1941,1946 **** ---- 1941,1967 ---- - ** not used. - ** (PGP only) - */ -+ {"sidebar_delim", DT_STR, R_BOTH, UL &SidebarDelim, "|"}, -+ /* -+ ** .pp -+ ** This specifies the delimiter between the sidebar (if visible) and -+ ** other screens. -+ */ -+ { "sidebar_visible", DT_BOOL, R_BOTH, OPTSIDEBAR, 0 }, -+ /* -+ ** .pp -+ ** This specifies whether or not to show sidebar (left-side list of folders). -+ */ -+ { "sidebar_sort", DT_BOOL, R_BOTH, OPTSIDEBARSORT, 0 }, -+ /* -+ ** .pp -+ ** This specifies whether or not to sort the sidebar alphabetically. -+ */ -+ { "sidebar_width", DT_NUM, R_BOTH, UL &SidebarWidth, 0 }, -+ /* -+ ** .pp -+ ** The width of the sidebar. -+ */ - { "pgp_use_gpg_agent", DT_BOOL, R_NONE, OPTUSEGPGAGENT, 0}, - /* - ** .pp -*** mutt-1.5.20-orig/mailbox.h 2009-04-30 00:36:17.000000000 -0500 ---- mutt-1.5.20-patched/mailbox.h 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 27,32 **** ---- 27,33 ---- - #define M_NEWFOLDER (1<<4) /* create a new folder - same as M_APPEND, but uses - * safe_fopen() for mbox-style folders. - */ -+ #define M_PEEK (1<<5) /* revert atime back after taking a look (if applicable) */ - - /* mx_open_new_message() */ - #define M_ADD_FROM 1 /* add a From_ line */ ---- orig/Makefile.am.orig 2010-09-18 13:23:19.000000000 +0200 -+++ new/Makefile.am 2010-09-18 13:25:19.000000000 +0200 -@@ -34,7 +34,7 @@ - score.c send.c sendlib.c signal.c sort.c \ - status.c system.c thread.c charset.c history.c lib.c \ - muttlib.c editmsg.c mbyte.c \ -- url.c ascii.c crypt-mod.c crypt-mod.h safe_asprintf.c -+ url.c ascii.c crypt-mod.c crypt-mod.h safe_asprintf.c sidebar.c - - nodist_mutt_SOURCES = $(BUILT_SOURCES) - ---- orig/Makefile.in.orig 2010-09-18 13:23:19.000000000 +0200 -+++ new/Makefile.in 2010-09-18 13:27:19.000000000 +0200 -@@ -89,7 +89,7 @@ - system.$(OBJEXT) thread.$(OBJEXT) charset.$(OBJEXT) \ - history.$(OBJEXT) lib.$(OBJEXT) muttlib.$(OBJEXT) \ - editmsg.$(OBJEXT) mbyte.$(OBJEXT) url.$(OBJEXT) \ -- ascii.$(OBJEXT) crypt-mod.$(OBJEXT) safe_asprintf.$(OBJEXT) -+ ascii.$(OBJEXT) crypt-mod.$(OBJEXT) safe_asprintf.$(OBJEXT) sidebar.$(OBJEXT) - am__objects_1 = - am__objects_2 = patchlist.$(OBJEXT) $(am__objects_1) - nodist_mutt_OBJECTS = $(am__objects_2) -@@ -363,7 +363,7 @@ - score.c send.c sendlib.c signal.c sort.c \ - status.c system.c thread.c charset.c history.c lib.c \ - muttlib.c editmsg.c mbyte.c \ -- url.c ascii.c crypt-mod.c crypt-mod.h safe_asprintf.c -+ url.c ascii.c crypt-mod.c crypt-mod.h safe_asprintf.c sidebar.c - - nodist_mutt_SOURCES = $(BUILT_SOURCES) - mutt_LDADD = @MUTT_LIB_OBJECTS@ @LIBOBJS@ $(LIBIMAP) $(MUTTLIBS) \ -@@ -397,7 +397,7 @@ - README.SSL smime.h group.h \ - muttbug pgppacket.h depcomp ascii.h BEWARE PATCHES patchlist.sh \ - ChangeLog mkchangelog.sh mutt_idna.h \ -- snprintf.c regex.c crypt-gpgme.h hcachever.sh.in -+ snprintf.c regex.c crypt-gpgme.h sidebar.h hcachever.sh.in - - EXTRA_SCRIPTS = smime_keys - mutt_dotlock_SOURCES = mutt_dotlock.c -*** mutt-1.5.20-orig/mbox.c 2009-06-10 23:29:41.000000000 -0500 ---- mutt-1.5.20-patched/mbox.c 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 100,105 **** ---- 100,106 ---- - mutt_perror (ctx->path); - return (-1); - } -+ ctx->atime = sb.st_atime; - ctx->mtime = sb.st_mtime; - ctx->size = sb.st_size; - -*************** -*** 255,260 **** ---- 256,262 ---- - - ctx->size = sb.st_size; - ctx->mtime = sb.st_mtime; -+ ctx->atime = sb.st_atime; - - #ifdef NFS_ATTRIBUTE_HACK - if (sb.st_mtime > sb.st_atime) -*** mutt-1.5.20-orig/menu.c 2009-06-01 11:29:32.000000000 -0500 ---- mutt-1.5.20-patched/menu.c 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 24,29 **** ---- 24,30 ---- - #include "mutt_curses.h" - #include "mutt_menu.h" - #include "mbyte.h" -+ #include "sidebar.h" - - #include <string.h> - #include <stdlib.h> -*************** -*** 156,162 **** - { - char *scratch = safe_strdup (s); - int shift = option (OPTARROWCURSOR) ? 3 : 0; -! int cols = COLS - shift; - - mutt_format_string (s, n, cols, cols, FMT_LEFT, ' ', scratch, mutt_strlen (scratch), 1); - s[n - 1] = 0; ---- 157,163 ---- - { - char *scratch = safe_strdup (s); - int shift = option (OPTARROWCURSOR) ? 3 : 0; -! int cols = COLS - shift - SidebarWidth; - - mutt_format_string (s, n, cols, cols, FMT_LEFT, ' ', scratch, mutt_strlen (scratch), 1); - s[n - 1] = 0; -*************** -*** 207,212 **** ---- 208,214 ---- - char buf[LONG_STRING]; - int i; - -+ draw_sidebar(1); - for (i = menu->top; i < menu->top + menu->pagelen; i++) - { - if (i < menu->max) -*************** -*** 217,223 **** - if (option (OPTARROWCURSOR)) - { - attrset (menu->color (i)); -! CLEARLINE (i - menu->top + menu->offset); - - if (i == menu->current) - { ---- 219,225 ---- - if (option (OPTARROWCURSOR)) - { - attrset (menu->color (i)); -! CLEARLINE_WIN (i - menu->top + menu->offset); - - if (i == menu->current) - { -*************** -*** 246,259 **** - BKGDSET (MT_COLOR_INDICATOR); - } - -! CLEARLINE (i - menu->top + menu->offset); - print_enriched_string (menu->color(i), (unsigned char *) buf, i != menu->current); - SETCOLOR (MT_COLOR_NORMAL); - BKGDSET (MT_COLOR_NORMAL); - } - } - else -! CLEARLINE (i - menu->top + menu->offset); - } - menu->redraw = 0; - } ---- 248,261 ---- - BKGDSET (MT_COLOR_INDICATOR); - } - -! CLEARLINE_WIN (i - menu->top + menu->offset); - print_enriched_string (menu->color(i), (unsigned char *) buf, i != menu->current); - SETCOLOR (MT_COLOR_NORMAL); - BKGDSET (MT_COLOR_NORMAL); - } - } - else -! CLEARLINE_WIN (i - menu->top + menu->offset); - } - menu->redraw = 0; - } -*************** -*** 268,274 **** - return; - } - -! move (menu->oldcurrent + menu->offset - menu->top, 0); - SETCOLOR (MT_COLOR_NORMAL); - BKGDSET (MT_COLOR_NORMAL); - ---- 270,276 ---- - return; - } - -! move (menu->oldcurrent + menu->offset - menu->top, SidebarWidth); - SETCOLOR (MT_COLOR_NORMAL); - BKGDSET (MT_COLOR_NORMAL); - -*************** -*** 283,295 **** - clrtoeol (); - menu_make_entry (buf, sizeof (buf), menu, menu->oldcurrent); - menu_pad_string (buf, sizeof (buf)); -! move (menu->oldcurrent + menu->offset - menu->top, 3); - print_enriched_string (menu->color(menu->oldcurrent), (unsigned char *) buf, 1); - SETCOLOR (MT_COLOR_NORMAL); - } - - /* now draw it in the new location */ -! move (menu->current + menu->offset - menu->top, 0); - attrset (menu->color (menu->current)); - ADDCOLOR (MT_COLOR_INDICATOR); - addstr ("->"); ---- 285,297 ---- - clrtoeol (); - menu_make_entry (buf, sizeof (buf), menu, menu->oldcurrent); - menu_pad_string (buf, sizeof (buf)); -! move (menu->oldcurrent + menu->offset - menu->top, SidebarWidth + 3); - print_enriched_string (menu->color(menu->oldcurrent), (unsigned char *) buf, 1); - SETCOLOR (MT_COLOR_NORMAL); - } - - /* now draw it in the new location */ -! move (menu->current + menu->offset - menu->top, SidebarWidth); - attrset (menu->color (menu->current)); - ADDCOLOR (MT_COLOR_INDICATOR); - addstr ("->"); -*************** -*** 310,316 **** - attrset (menu->color (menu->current)); - ADDCOLOR (MT_COLOR_INDICATOR); - BKGDSET (MT_COLOR_INDICATOR); -! CLEARLINE (menu->current - menu->top + menu->offset); - print_enriched_string (menu->color(menu->current), (unsigned char *) buf, 0); - SETCOLOR (MT_COLOR_NORMAL); - BKGDSET (MT_COLOR_NORMAL); ---- 312,318 ---- - attrset (menu->color (menu->current)); - ADDCOLOR (MT_COLOR_INDICATOR); - BKGDSET (MT_COLOR_INDICATOR); -! CLEARLINE_WIN (menu->current - menu->top + menu->offset); - print_enriched_string (menu->color(menu->current), (unsigned char *) buf, 0); - SETCOLOR (MT_COLOR_NORMAL); - BKGDSET (MT_COLOR_NORMAL); -*************** -*** 322,328 **** - { - char buf[LONG_STRING]; - -! move (menu->current + menu->offset - menu->top, 0); - menu_make_entry (buf, sizeof (buf), menu, menu->current); - menu_pad_string (buf, sizeof (buf)); - ---- 324,330 ---- - { - char buf[LONG_STRING]; - -! move (menu->current + menu->offset - menu->top, SidebarWidth); - menu_make_entry (buf, sizeof (buf), menu, menu->current); - menu_pad_string (buf, sizeof (buf)); - -*************** -*** 876,882 **** - - - if (option (OPTARROWCURSOR)) -! move (menu->current - menu->top + menu->offset, 2); - else if (option (OPTBRAILLEFRIENDLY)) - move (menu->current - menu->top + menu->offset, 0); - else ---- 878,884 ---- - - - if (option (OPTARROWCURSOR)) -! move (menu->current - menu->top + menu->offset, SidebarWidth + 2); - else if (option (OPTBRAILLEFRIENDLY)) - move (menu->current - menu->top + menu->offset, 0); - else -*** mutt-1.5.20-orig/mutt_curses.h 2008-11-11 13:55:47.000000000 -0600 ---- mutt-1.5.20-patched/mutt_curses.h 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 64,69 **** ---- 64,70 ---- - #undef lines - #endif /* lines */ - -+ #define CLEARLINE_WIN(x) move(x,SidebarWidth), clrtoeol() - #define CLEARLINE(x) move(x,0), clrtoeol() - #define CENTERLINE(x,y) move(y, (COLS-strlen(x))/2), addstr(x) - #define BEEP() do { if (option (OPTBEEP)) beep(); } while (0) -*************** -*** 126,131 **** ---- 127,134 ---- - MT_COLOR_BOLD, - MT_COLOR_UNDERLINE, - MT_COLOR_INDEX, -+ MT_COLOR_NEW, -+ MT_COLOR_FLAGGED, - MT_COLOR_MAX - }; - -*** mutt-1.5.20-orig/mutt.h 2009-06-12 17:15:42.000000000 -0500 ---- mutt-1.5.20-patched/mutt.h 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 418,423 **** ---- 418,425 ---- - OPTSAVEEMPTY, - OPTSAVENAME, - OPTSCORE, -+ OPTSIDEBAR, -+ OPTSIDEBARSORT, - OPTSIGDASHES, - OPTSIGONTOP, - OPTSORTRE, -*************** -*** 854,859 **** ---- 856,862 ---- - { - char *path; - FILE *fp; -+ time_t atime; - time_t mtime; - off_t size; - off_t vsize; -*************** -*** 888,893 **** ---- 891,897 ---- - unsigned int quiet : 1; /* inhibit status messages? */ - unsigned int collapsed : 1; /* are all threads collapsed? */ - unsigned int closing : 1; /* mailbox is being closed */ -+ unsigned int peekonly : 1; /* just taking a glance, revert atime */ - - /* driver hooks */ - void *data; /* driver specific data */ -*** mutt-1.5.20-orig/muttlib.c 2009-05-18 19:11:35.000000000 -0500 ---- mutt-1.5.20-patched/muttlib.c 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 1232,1237 **** ---- 1232,1239 ---- - pl = pw = 1; - - /* see if there's room to add content, else ignore */ -+ if ( DrawFullLine ) -+ { - if ((col < COLS && wlen < destlen) || soft) - { - int pad; -*************** -*** 1274,1279 **** ---- 1276,1327 ---- - col += wid; - src += pl; - } -+ } -+ else -+ { -+ if ((col < COLS-SidebarWidth && wlen < destlen) || soft) -+ { -+ int pad; -+ -+ /* get contents after padding */ -+ mutt_FormatString (buf, sizeof (buf), 0, src + pl, callback, data, flags); -+ len = mutt_strlen (buf); -+ wid = mutt_strwidth (buf); -+ -+ /* try to consume as many columns as we can, if we don't have -+ * memory for that, use as much memory as possible */ -+ pad = (COLS - SidebarWidth - col - wid) / pw; -+ if (pad > 0 && wlen + (pad * pl) + len > destlen) -+ pad = ((signed)(destlen - wlen - len)) / pl; -+ if (pad > 0) -+ { -+ while (pad--) -+ { -+ memcpy (wptr, src, pl); -+ wptr += pl; -+ wlen += pl; -+ col += pw; -+ } -+ } -+ else if (soft && pad < 0) -+ { -+ /* \0-terminate dest for length computation in mutt_wstr_trunc() */ -+ *wptr = 0; -+ /* make sure right part is at most as wide as display */ -+ len = mutt_wstr_trunc (buf, destlen, COLS, &wid); -+ /* truncate left so that right part fits completely in */ -+ wlen = mutt_wstr_trunc (dest, destlen - len, col + pad, &col); -+ wptr = dest + wlen; -+ } -+ if (len + wlen > destlen) -+ len = mutt_wstr_trunc (buf, destlen - wlen, COLS - SidebarWidth - col, NULL); -+ memcpy (wptr, buf, len); -+ wptr += len; -+ wlen += len; -+ col += wid; -+ src += pl; -+ } -+ } - break; /* skip rest of input */ - } - else if (ch == '|') -*** mutt-1.5.20-orig/mx.c 2009-06-10 23:29:41.000000000 -0500 ---- mutt-1.5.20-patched/mx.c 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 581,586 **** ---- 581,587 ---- - * M_APPEND open mailbox for appending - * M_READONLY open mailbox in read-only mode - * M_QUIET only print error messages -+ * M_PEEK revert atime where applicable - * ctx if non-null, context struct to use - */ - CONTEXT *mx_open_mailbox (const char *path, int flags, CONTEXT *pctx) -*************** -*** 603,608 **** ---- 604,611 ---- - ctx->quiet = 1; - if (flags & M_READONLY) - ctx->readonly = 1; -+ if (flags & M_PEEK) -+ ctx->peekonly = 1; - - if (flags & (M_APPEND|M_NEWFOLDER)) - { -*************** -*** 702,710 **** ---- 705,725 ---- - void mx_fastclose_mailbox (CONTEXT *ctx) - { - int i; -+ #ifndef BUFFY_SIZE -+ struct utimbuf ut; -+ #endif - - if(!ctx) - return; -+ #ifndef BUFFY_SIZE -+ /* fix up the times so buffy won't get confused */ -+ if (ctx->peekonly && ctx->path && ctx->mtime > ctx->atime) -+ { -+ ut.actime = ctx->atime; -+ ut.modtime = ctx->mtime; -+ utime (ctx->path, &ut); -+ } -+ #endif - - if (ctx->mx_close) - ctx->mx_close (ctx); -*** mutt-1.5.20-orig/OPS 2009-05-13 00:01:13.000000000 -0500 ---- mutt-1.5.20-patched/OPS 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 178,180 **** ---- 178,185 ---- - OP_MAIN_SHOW_LIMIT "show currently active limit pattern" - OP_MAIN_COLLAPSE_THREAD "collapse/uncollapse current thread" - OP_MAIN_COLLAPSE_ALL "collapse/uncollapse all threads" -+ OP_SIDEBAR_SCROLL_UP "scroll the mailbox pane up 1 page" -+ OP_SIDEBAR_SCROLL_DOWN "scroll the mailbox pane down 1 page" -+ OP_SIDEBAR_NEXT "go down to next mailbox" -+ OP_SIDEBAR_PREV "go to previous mailbox" -+ OP_SIDEBAR_OPEN "open hilighted mailbox" ---- orig/pager.c.orig 2010-09-18 13:23:19.000000000 +0200 -+++ new/pager.c 2010-09-18 14:03:08.000000000 +0200 -@@ -29,6 +29,7 @@ - #include "pager.h" - #include "attach.h" - #include "mbyte.h" -+#include "sidebar.h" - - #include "mutt_crypt.h" - -@@ -1104,6 +1105,7 @@ - if (check_attachment_marker ((char *)buf) == 0) - wrap_cols = COLS; - -+ wrap_cols -= SidebarWidth; - /* FIXME: this should come from lineInfo */ - memset(&mbstate, 0, sizeof(mbstate)); - -@@ -1778,7 +1780,7 @@ - if ((redraw & REDRAW_BODY) || topline != oldtopline) - { - do { -- move (bodyoffset, 0); -+ move (bodyoffset, SidebarWidth); - curline = oldtopline = topline; - lines = 0; - force_redraw = 0; -@@ -1791,6 +1793,7 @@ - &QuoteList, &q_level, &force_redraw, &SearchRE) > 0) - lines++; - curline++; -+ move(lines + bodyoffset, SidebarWidth); - } - last_offset = lineInfo[curline].offset; - } while (force_redraw); -@@ -1804,6 +1807,7 @@ - addch ('~'); - addch ('\n'); - lines++; -+ move(lines + bodyoffset, SidebarWidth); - } - /* We are going to update the pager status bar, so it isn't - * necessary to reset to normal color now. */ -@@ -1827,21 +1831,21 @@ - /* print out the pager status bar */ - SETCOLOR (MT_COLOR_STATUS); - BKGDSET (MT_COLOR_STATUS); -- CLEARLINE (statusoffset); -+ CLEARLINE_WIN (statusoffset); - - if (IsHeader (extra) || IsMsgAttach (extra)) - { -- size_t l1 = COLS * MB_LEN_MAX; -+ size_t l1 = (COLS-SidebarWidth) * MB_LEN_MAX; - size_t l2 = sizeof (buffer); - hfi.hdr = (IsHeader (extra)) ? extra->hdr : extra->bdy->hdr; - mutt_make_string_info (buffer, l1 < l2 ? l1 : l2, NONULL (PagerFmt), &hfi, M_FORMAT_MAKEPRINT); -- mutt_paddstr (COLS, buffer); -+ mutt_paddstr (COLS-SidebarWidth, buffer); - } - else - { - char bn[STRING]; - snprintf (bn, sizeof (bn), "%s (%s)", banner, pager_progress_str); -- mutt_paddstr (COLS, bn); -+ mutt_paddstr (COLS-SidebarWidth, bn); - } - BKGDSET (MT_COLOR_NORMAL); - SETCOLOR (MT_COLOR_NORMAL); -@@ -1852,18 +1856,23 @@ - /* redraw the pager_index indicator, because the - * flags for this message might have changed. */ - menu_redraw_current (index); -+ draw_sidebar(MENU_PAGER); - - /* print out the index status bar */ - menu_status_line (buffer, sizeof (buffer), index, NONULL(Status)); - -- move (indexoffset + (option (OPTSTATUSONTOP) ? 0 : (indexlen - 1)), 0); -+ move (indexoffset + (option (OPTSTATUSONTOP) ? 0 : (indexlen - 1)), SidebarWidth); - SETCOLOR (MT_COLOR_STATUS); - BKGDSET (MT_COLOR_STATUS); -- mutt_paddstr (COLS, buffer); -+ mutt_paddstr (COLS-SidebarWidth, buffer); - SETCOLOR (MT_COLOR_NORMAL); - BKGDSET (MT_COLOR_NORMAL); - } - -+ /* if we're not using the index, update every time */ -+ if ( index == 0 ) -+ draw_sidebar(MENU_PAGER); -+ - redraw = 0; - - if (option(OPTBRAILLEFRIENDLY)) { -@@ -2852,6 +2861,13 @@ - mutt_what_key (); - break; - -+ case OP_SIDEBAR_SCROLL_UP: -+ case OP_SIDEBAR_SCROLL_DOWN: -+ case OP_SIDEBAR_NEXT: -+ case OP_SIDEBAR_PREV: -+ scroll_sidebar(ch, MENU_PAGER); -+ break; -+ - default: - ch = -1; - break; -*** mutt-1.5.20-orig/PATCHES 2008-11-11 13:55:46.000000000 -0600 ---- mutt-1.5.20-patched/PATCHES 2009-06-19 22:20:31.000000000 -0500 -*************** -*** 0 **** ---- 1 ---- -+ patch-1.5.20.sidebar.20090619.txt -*** mutt-1.5.20-orig/sidebar.c 1969-12-31 18:00:00.000000000 -0600 ---- mutt-1.5.20-patched/sidebar.c 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 0 **** ---- 1,333 ---- -+ /* -+ * Copyright (C) ????-2004 Justin Hibbits <jrh29@po.cwru.edu> -+ * Copyright (C) 2004 Thomer M. Gil <mutt@thomer.com> -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. -+ */ -+ -+ -+ #if HAVE_CONFIG_H -+ # include "config.h" -+ #endif -+ -+ #include "mutt.h" -+ #include "mutt_menu.h" -+ #include "mutt_curses.h" -+ #include "sidebar.h" -+ #include "buffy.h" -+ #include <libgen.h> -+ #include "keymap.h" -+ #include <stdbool.h> -+ -+ /*BUFFY *CurBuffy = 0;*/ -+ static BUFFY *TopBuffy = 0; -+ static BUFFY *BottomBuffy = 0; -+ static int known_lines = 0; -+ -+ static int quick_log10(int n) -+ { -+ char string[32]; -+ sprintf(string, "%d", n); -+ return strlen(string); -+ } -+ -+ void calc_boundaries (int menu) -+ { -+ BUFFY *tmp = Incoming; -+ -+ if ( known_lines != LINES ) { -+ TopBuffy = BottomBuffy = 0; -+ known_lines = LINES; -+ } -+ for ( ; tmp->next != 0; tmp = tmp->next ) -+ tmp->next->prev = tmp; -+ -+ if ( TopBuffy == 0 && BottomBuffy == 0 ) -+ TopBuffy = Incoming; -+ if ( BottomBuffy == 0 ) { -+ int count = LINES - 2 - (menu != MENU_PAGER || option(OPTSTATUSONTOP)); -+ BottomBuffy = TopBuffy; -+ while ( --count && BottomBuffy->next ) -+ BottomBuffy = BottomBuffy->next; -+ } -+ else if ( TopBuffy == CurBuffy->next ) { -+ int count = LINES - 2 - (menu != MENU_PAGER); -+ BottomBuffy = CurBuffy; -+ tmp = BottomBuffy; -+ while ( --count && tmp->prev) -+ tmp = tmp->prev; -+ TopBuffy = tmp; -+ } -+ else if ( BottomBuffy == CurBuffy->prev ) { -+ int count = LINES - 2 - (menu != MENU_PAGER); -+ TopBuffy = CurBuffy; -+ tmp = TopBuffy; -+ while ( --count && tmp->next ) -+ tmp = tmp->next; -+ BottomBuffy = tmp; -+ } -+ } -+ -+ char *make_sidebar_entry(char *box, int size, int new, int flagged) -+ { -+ static char *entry = 0; -+ char *c; -+ int i = 0; -+ int delim_len = strlen(SidebarDelim); -+ -+ c = realloc(entry, SidebarWidth - delim_len + 2); -+ if ( c ) entry = c; -+ entry[SidebarWidth - delim_len + 1] = 0; -+ for (; i < SidebarWidth - delim_len + 1; entry[i++] = ' ' ); -+ i = strlen(box); -+ strncpy( entry, box, i < (SidebarWidth - delim_len + 1) ? i : (SidebarWidth - delim_len + 1) ); -+ -+ if (size == -1) -+ sprintf(entry + SidebarWidth - delim_len - 3, "?"); -+ else if ( new ) { -+ if (flagged > 0) { -+ sprintf( -+ entry + SidebarWidth - delim_len - 5 - quick_log10(size) - quick_log10(new) - quick_log10(flagged), -+ "% d(%d)[%d]", size, new, flagged); -+ } else { -+ sprintf( -+ entry + SidebarWidth - delim_len - 3 - quick_log10(size) - quick_log10(new), -+ "% d(%d)", size, new); -+ } -+ } else if (flagged > 0) { -+ sprintf( entry + SidebarWidth - delim_len - 3 - quick_log10(size) - quick_log10(flagged), "% d[%d]", size, flagged); -+ } else { -+ sprintf( entry + SidebarWidth - delim_len - 1 - quick_log10(size), "% d", size); -+ } -+ return entry; -+ } -+ -+ void set_curbuffy(char buf[LONG_STRING]) -+ { -+ BUFFY* tmp = CurBuffy = Incoming; -+ -+ if (!Incoming) -+ return; -+ -+ while(1) { -+ if(!strcmp(tmp->path, buf)) { -+ CurBuffy = tmp; -+ break; -+ } -+ -+ if(tmp->next) -+ tmp = tmp->next; -+ else -+ break; -+ } -+ } -+ -+ int draw_sidebar(int menu) { -+ -+ int lines = option(OPTHELP) ? 1 : 0; -+ BUFFY *tmp; -+ #ifndef USE_SLANG_CURSES -+ attr_t attrs; -+ #endif -+ short delim_len = strlen(SidebarDelim); -+ short color_pair; -+ -+ static bool initialized = false; -+ static int prev_show_value; -+ static short saveSidebarWidth; -+ -+ /* initialize first time */ -+ if(!initialized) { -+ prev_show_value = option(OPTSIDEBAR); -+ saveSidebarWidth = SidebarWidth; -+ if(!option(OPTSIDEBAR)) SidebarWidth = 0; -+ initialized = true; -+ } -+ -+ /* save or restore the value SidebarWidth */ -+ if(prev_show_value != option(OPTSIDEBAR)) { -+ if(prev_show_value && !option(OPTSIDEBAR)) { -+ saveSidebarWidth = SidebarWidth; -+ SidebarWidth = 0; -+ } else if(!prev_show_value && option(OPTSIDEBAR)) { -+ SidebarWidth = saveSidebarWidth; -+ } -+ prev_show_value = option(OPTSIDEBAR); -+ } -+ -+ -+ // if ( SidebarWidth == 0 ) return 0; -+ if (SidebarWidth > 0 && option (OPTSIDEBAR) -+ && delim_len >= SidebarWidth) { -+ unset_option (OPTSIDEBAR); -+ /* saveSidebarWidth = SidebarWidth; */ -+ if (saveSidebarWidth > delim_len) { -+ SidebarWidth = saveSidebarWidth; -+ mutt_error (_("Value for sidebar_delim is too long. Disabling sidebar.")); -+ sleep (2); -+ } else { -+ SidebarWidth = 0; -+ mutt_error (_("Value for sidebar_delim is too long. Disabling sidebar. Please set your sidebar_width to a sane value.")); -+ sleep (4); /* the advise to set a sane value should be seen long enough */ -+ } -+ saveSidebarWidth = 0; -+ return (0); -+ } -+ -+ if ( SidebarWidth == 0 || !option(OPTSIDEBAR)) { -+ if (SidebarWidth > 0) { -+ saveSidebarWidth = SidebarWidth; -+ SidebarWidth = 0; -+ } -+ unset_option(OPTSIDEBAR); -+ return 0; -+ } -+ -+ /* get attributes for divider */ -+ SETCOLOR(MT_COLOR_STATUS); -+ #ifndef USE_SLANG_CURSES -+ attr_get(&attrs, &color_pair, 0); -+ #else -+ color_pair = attr_get(); -+ #endif -+ SETCOLOR(MT_COLOR_NORMAL); -+ -+ /* draw the divider */ -+ -+ for ( ; lines < LINES-1-(menu != MENU_PAGER || option(OPTSTATUSONTOP)); lines++ ) { -+ move(lines, SidebarWidth - delim_len); -+ addstr(NONULL(SidebarDelim)); -+ #ifndef USE_SLANG_CURSES -+ mvchgat(lines, SidebarWidth - delim_len, delim_len, 0, color_pair, NULL); -+ #endif -+ } -+ -+ if ( Incoming == 0 ) return 0; -+ lines = option(OPTHELP) ? 1 : 0; /* go back to the top */ -+ -+ if ( known_lines != LINES || TopBuffy == 0 || BottomBuffy == 0 ) -+ calc_boundaries(menu); -+ if ( CurBuffy == 0 ) CurBuffy = Incoming; -+ -+ tmp = TopBuffy; -+ -+ SETCOLOR(MT_COLOR_NORMAL); -+ -+ for ( ; tmp && lines < LINES-1 - (menu != MENU_PAGER || option(OPTSTATUSONTOP)); tmp = tmp->next ) { -+ if ( tmp == CurBuffy ) -+ SETCOLOR(MT_COLOR_INDICATOR); -+ else if ( tmp->msg_unread > 0 ) -+ SETCOLOR(MT_COLOR_NEW); -+ else if ( tmp->msg_flagged > 0 ) -+ SETCOLOR(MT_COLOR_FLAGGED); -+ else -+ SETCOLOR(MT_COLOR_NORMAL); -+ -+ move( lines, 0 ); -+ if ( Context && !strcmp( tmp->path, Context->path ) ) { -+ tmp->msg_unread = Context->unread; -+ tmp->msgcount = Context->msgcount; -+ tmp->msg_flagged = Context->flagged; -+ } -+ // check whether Maildir is a prefix of the current folder's path -+ short maildir_is_prefix = 0; -+ if ( (strlen(tmp->path) > strlen(Maildir)) && -+ (strncmp(Maildir, tmp->path, strlen(Maildir)) == 0) ) -+ maildir_is_prefix = 1; -+ // calculate depth of current folder and generate its display name with indented spaces -+ int sidebar_folder_depth = 0; -+ char *sidebar_folder_name; -+ sidebar_folder_name = basename(tmp->path); -+ if ( maildir_is_prefix ) { -+ char *tmp_folder_name; -+ int i; -+ tmp_folder_name = tmp->path + strlen(Maildir); -+ for (i = 0; i < strlen(tmp->path) - strlen(Maildir); i++) { -+ if (tmp_folder_name[i] == '/') sidebar_folder_depth++; -+ } -+ if (sidebar_folder_depth > 0) { -+ sidebar_folder_name = malloc(strlen(basename(tmp->path)) + sidebar_folder_depth + 1); -+ for (i=0; i < sidebar_folder_depth; i++) -+ sidebar_folder_name[i]=' '; -+ sidebar_folder_name[i]=0; -+ strncat(sidebar_folder_name, basename(tmp->path), strlen(basename(tmp->path)) + sidebar_folder_depth); -+ } -+ } -+ printw( "%.*s", SidebarWidth - delim_len + 1, -+ make_sidebar_entry(sidebar_folder_name, tmp->msgcount, -+ tmp->msg_unread, tmp->msg_flagged)); -+ if (sidebar_folder_depth > 0) -+ free(sidebar_folder_name); -+ lines++; -+ } -+ SETCOLOR(MT_COLOR_NORMAL); -+ for ( ; lines < LINES-1 - (menu != MENU_PAGER || option(OPTSTATUSONTOP)); lines++ ) { -+ int i = 0; -+ move( lines, 0 ); -+ for ( ; i < SidebarWidth - delim_len; i++ ) -+ addch(' '); -+ } -+ return 0; -+ } -+ -+ -+ void set_buffystats(CONTEXT* Context) -+ { -+ BUFFY *tmp = Incoming; -+ while(tmp) { -+ if(Context && !strcmp(tmp->path, Context->path)) { -+ tmp->msg_unread = Context->unread; -+ tmp->msgcount = Context->msgcount; -+ break; -+ } -+ tmp = tmp->next; -+ } -+ } -+ -+ void scroll_sidebar(int op, int menu) -+ { -+ if(!SidebarWidth) return; -+ if(!CurBuffy) return; -+ -+ switch (op) { -+ case OP_SIDEBAR_NEXT: -+ if ( CurBuffy->next == NULL ) return; -+ CurBuffy = CurBuffy->next; -+ break; -+ case OP_SIDEBAR_PREV: -+ if ( CurBuffy->prev == NULL ) return; -+ CurBuffy = CurBuffy->prev; -+ break; -+ case OP_SIDEBAR_SCROLL_UP: -+ CurBuffy = TopBuffy; -+ if ( CurBuffy != Incoming ) { -+ calc_boundaries(menu); -+ CurBuffy = CurBuffy->prev; -+ } -+ break; -+ case OP_SIDEBAR_SCROLL_DOWN: -+ CurBuffy = BottomBuffy; -+ if ( CurBuffy->next ) { -+ calc_boundaries(menu); -+ CurBuffy = CurBuffy->next; -+ } -+ break; -+ default: -+ return; -+ } -+ calc_boundaries(menu); -+ draw_sidebar(menu); -+ } -+ -*** mutt-1.5.20-orig/sidebar.h 1969-12-31 18:00:00.000000000 -0600 ---- mutt-1.5.20-patched/sidebar.h 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 0 **** ---- 1,36 ---- -+ /* -+ * Copyright (C) ????-2004 Justin Hibbits <jrh29@po.cwru.edu> -+ * Copyright (C) 2004 Thomer M. Gil <mutt@thomer.com> -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. -+ */ -+ -+ #ifndef SIDEBAR_H -+ #define SIDEBAR_H -+ -+ struct MBOX_LIST { -+ char *path; -+ int msgcount; -+ int new; -+ } MBLIST; -+ -+ /* parameter is whether or not to go to the status line */ -+ /* used for omitting the last | that covers up the status bar in the index */ -+ int draw_sidebar(int); -+ void scroll_sidebar(int, int); -+ void set_curbuffy(char*); -+ void set_buffystats(CONTEXT*); -+ -+ #endif /* SIDEBAR_H */ -*** mutt-1.5.20-orig/doc/Muttrc 2009-06-14 13:53:24.000000000 -0500 ---- mutt-1.5.20-patched/doc/Muttrc 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 657,662 **** ---- 657,682 ---- - # $crypt_autosign, $crypt_replysign and $smime_is_default. - # - # -+ # set sidebar_visible=no -+ # -+ # Name: sidebar_visible -+ # Type: boolean -+ # Default: no -+ # -+ # -+ # This specifies whether or not to show sidebar (left-side list of folders). -+ # -+ # -+ # set sidebar_width=0 -+ # -+ # Name: sidebar_width -+ # Type: number -+ # Default: 0 -+ # -+ # -+ # The width of the sidebar. -+ # -+ # - # set crypt_autosign=no - # - # Name: crypt_autosign -*** mutt-1.5.20-orig/imap/imap.c 2009-06-14 12:19:16.000000000 -0500 ---- mutt-1.5.20-patched/imap/imap.c 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 1521,1527 **** - - imap_munge_mbox_name (munged, sizeof (munged), name); - snprintf (command, sizeof (command), -! "STATUS %s (UIDNEXT UIDVALIDITY UNSEEN RECENT)", munged); - - if (imap_exec (idata, command, IMAP_CMD_QUEUE) < 0) - { ---- 1521,1527 ---- - - imap_munge_mbox_name (munged, sizeof (munged), name); - snprintf (command, sizeof (command), -! "STATUS %s (UIDNEXT UIDVALIDITY UNSEEN RECENT MESSAGES)", munged); - - if (imap_exec (idata, command, IMAP_CMD_QUEUE) < 0) - { -*** mutt-1.5.20-orig/imap/command.c 2009-01-05 20:58:31.000000000 -0600 ---- mutt-1.5.20-patched/imap/command.c 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 1009,1014 **** ---- 1009,1021 ---- - opened */ - status->uidnext = oldun; - -+ /* Added to make the sidebar show the correct numbers */ -+ if (status->messages) -+ { -+ inc->msgcount = status->messages; -+ inc->msg_unread = status->unseen; -+ } -+ - FREE (&value); - return; - } ---- orig/compose.c.orig 2010-04-14 20:50:19.000000000 +0200 -+++ new/compose.c 2010-09-18 15:29:09.000000000 +0200 -@@ -72,7 +72,7 @@ - - #define HDR_XOFFSET 10 - #define TITLE_FMT "%10s" /* Used for Prompts, which are ASCII */ --#define W (COLS - HDR_XOFFSET) -+#define W (COLS - HDR_XOFFSET - SidebarWidth) - - static char *Prompts[] = - { -@@ -112,7 +112,7 @@ - { - int off = 0; - -- mvaddstr (HDR_CRYPT, 0, "Security: "); -+ mvaddstr (HDR_CRYPT, SidebarWidth, "Security: "); - - if ((WithCrypto & (APPLICATION_PGP | APPLICATION_SMIME)) == 0) - { -@@ -144,7 +144,7 @@ - } - - clrtoeol (); -- move (HDR_CRYPTINFO, 0); -+ move (HDR_CRYPTINFO, SidebarWidth); - clrtoeol (); - - if ((WithCrypto & APPLICATION_PGP) -@@ -161,7 +161,7 @@ - && (msg->security & ENCRYPT) - && SmimeCryptAlg - && *SmimeCryptAlg) { -- mvprintw (HDR_CRYPTINFO, 40, "%s%s", _("Encrypt with: "), -+ mvprintw (HDR_CRYPTINFO, SidebarWidth + 40, "%s%s", _("Encrypt with: "), - NONULL(SmimeCryptAlg)); - off = 20; - } -@@ -190,7 +190,7 @@ - if (t && t[0] == '0' && t[1] == '\0') - t = "<random>"; - -- if (c + mutt_strlen (t) + 2 >= COLS) -+ if (c + mutt_strlen (t) + 2 >= COLS - SidebarWidth) - break; - - addstr (NONULL(t)); -@@ -242,7 +242,7 @@ - - buf[0] = 0; - rfc822_write_address (buf, sizeof (buf), addr, 1); -- mvprintw (line, 0, TITLE_FMT, Prompts[line - 1]); -+ mvprintw (line, SidebarWidth, TITLE_FMT, Prompts[line - 1]); - mutt_paddstr (W, buf); - } - -@@ -252,10 +252,10 @@ - draw_envelope_addr (HDR_TO, msg->env->to); - draw_envelope_addr (HDR_CC, msg->env->cc); - draw_envelope_addr (HDR_BCC, msg->env->bcc); -- mvprintw (HDR_SUBJECT, 0, TITLE_FMT, Prompts[HDR_SUBJECT - 1]); -+ mvprintw (HDR_SUBJECT, SidebarWidth, TITLE_FMT, Prompts[HDR_SUBJECT - 1]); - mutt_paddstr (W, NONULL (msg->env->subject)); - draw_envelope_addr (HDR_REPLYTO, msg->env->reply_to); -- mvprintw (HDR_FCC, 0, TITLE_FMT, Prompts[HDR_FCC - 1]); -+ mvprintw (HDR_FCC, SidebarWidth, TITLE_FMT, Prompts[HDR_FCC - 1]); - mutt_paddstr (W, fcc); - - if (WithCrypto) -@@ -266,7 +266,7 @@ - #endif - - SETCOLOR (MT_COLOR_STATUS); -- mvaddstr (HDR_ATTACH - 1, 0, _("-- Attachments")); -+ mvaddstr (HDR_ATTACH - 1, SidebarWidth, _("-- Attachments")); - BKGDSET (MT_COLOR_STATUS); - clrtoeol (); - -@@ -304,7 +304,7 @@ - /* redraw the expanded list so the user can see the result */ - buf[0] = 0; - rfc822_write_address (buf, sizeof (buf), *addr, 1); -- move (line, HDR_XOFFSET); -+ move (line, HDR_XOFFSET+SidebarWidth); - mutt_paddstr (W, buf); - - return 0; -@@ -549,7 +549,7 @@ - if (mutt_get_field ("Subject: ", buf, sizeof (buf), 0) == 0) - { - mutt_str_replace (&msg->env->subject, buf); -- move (HDR_SUBJECT, HDR_XOFFSET); -+ move (HDR_SUBJECT, HDR_XOFFSET + SidebarWidth); - clrtoeol (); - if (msg->env->subject) - mutt_paddstr (W, msg->env->subject); -@@ -566,7 +566,7 @@ - { - strfcpy (fcc, buf, fcclen); - mutt_pretty_mailbox (fcc, fcclen); -- move (HDR_FCC, HDR_XOFFSET); -+ move (HDR_FCC, HDR_XOFFSET + SidebarWidth); - mutt_paddstr (W, fcc); - fccSet = 1; - } diff --git a/mail/mutt-devel/files/extra-patch-sidebar-nntp b/mail/mutt-devel/files/extra-patch-sidebar-nntp deleted file mode 100644 index 8a118ed2c019..000000000000 --- a/mail/mutt-devel/files/extra-patch-sidebar-nntp +++ /dev/null @@ -1,1616 +0,0 @@ ---- orig/buffy.c.orig 2010-09-18 14:12:40.000000000 +0200 -+++ new/buffy.c 2010-09-18 14:17:36.000000000 +0200 -@@ -161,6 +161,49 @@ - } - } - -+static int buffy_compare_name(const void *a, const void *b) { -+ const BUFFY *b1 = * (BUFFY * const *) a; -+ const BUFFY *b2 = * (BUFFY * const *) b; -+ -+ return mutt_strcoll(b1->path, b2->path); -+} -+ -+static BUFFY *buffy_sort(BUFFY *b) -+{ -+ BUFFY *tmp = b; -+ int buffycount = 0; -+ BUFFY **ary; -+ int i; -+ -+ if (!option(OPTSIDEBARSORT)) -+ return b; -+ -+ for (; tmp != NULL; tmp = tmp->next) -+ buffycount++; -+ -+ ary = (BUFFY **) safe_calloc(buffycount, sizeof (*ary)); -+ -+ tmp = b; -+ for (i = 0; tmp != NULL; tmp = tmp->next, i++) { -+ ary[i] = tmp; -+ } -+ -+ qsort(ary, buffycount, sizeof(*ary), buffy_compare_name); -+ -+ for (i = 0; i < buffycount - 1; i++) { -+ ary[i]->next = ary[i+1]; -+ } -+ ary[buffycount - 1]->next = NULL; -+ for (i = 1; i < buffycount; i++) { -+ ary[i]->prev = ary[i-1]; -+ } -+ ary[0]->prev = NULL; -+ -+ tmp = ary[0]; -+ free(ary); -+ return tmp; -+} -+ - BUFFY *mutt_find_mailbox (const char *path) - { - BUFFY *tmp = NULL; -@@ -282,6 +325,7 @@ - else - (*tmp)->size = 0; - } -+ Incoming = buffy_sort(Incoming); - return 0; - } - -@@ -371,12 +415,17 @@ - return rc; - } - -+#define STAT_CHECK_SIZE (sb.st_size > tmp->size) -+#define STAT_CHECK_TIME (sb.st_mtime > sb.st_atime || (tmp->newly_created && sb.st_ctime == sb.st_mtime && sb.st_ctime == sb.st_atime)) -+#define STAT_CHECK (option(OPTCHECKMBOXSIZE) ? STAT_CHECK_SIZE : STAT_CHECK_TIME) -+ - int mutt_buffy_check (int force) - { - BUFFY *tmp; - struct stat sb; - struct stat contex_sb; - time_t t; -+ CONTEXT *ctx; - - sb.st_size=0; - contex_sb.st_dev=0; -@@ -416,6 +465,8 @@ - - for (tmp = Incoming; tmp; tmp = tmp->next) - { -+ if ( tmp->new == 1 ) -+ tmp->has_new = 1; - if (tmp->magic != M_IMAP) - { - tmp->new = 0; -@@ -455,18 +506,122 @@ - { - case M_MBOX: - case M_MMDF: -- if (buffy_mbox_hasnew (tmp, &sb) > 0) -- BuffyCount++; -- break; -+ { -+ if (STAT_CHECK || tmp->msgcount == 0) -+ { -+ BUFFY b = *tmp; -+ int msgcount = 0; -+ int msg_unread = 0; -+ /* parse the mailbox, to see how much mail there is */ -+ ctx = mx_open_mailbox( tmp->path, M_READONLY | M_QUIET | M_NOSORT | M_PEEK, NULL); -+ if(ctx) -+ { -+ msgcount = ctx->msgcount; -+ msg_unread = ctx->unread; -+ mx_close_mailbox(ctx, 0); -+ } -+ *tmp = b; -+ tmp->msgcount = msgcount; -+ tmp->msg_unread = msg_unread; -+ if(STAT_CHECK) { -+ tmp->has_new = tmp->new = 1; -+ BuffyCount++; -+ } -+ } -+ else if (option(OPTCHECKMBOXSIZE)) -+ { -+ /* some other program has deleted mail from the folder */ -+ tmp->size = (off_t) sb.st_size; -+ } -+ if (tmp->newly_created && -+ (sb.st_ctime != sb.st_mtime || sb.st_ctime != sb.st_atime)) -+ tmp->newly_created = 0; -+ } -+ break; -+ - - case M_MAILDIR: -- if (buffy_maildir_hasnew (tmp) > 0) -- BuffyCount++; -+ { -+ char path[_POSIX_PATH_MAX]; -+ DIR *dirp; -+ struct dirent *de; -+ /* count new message */ -+ snprintf (path, sizeof (path), "%s/new", tmp->path); -+ if ((dirp = opendir (path)) == NULL) -+ { -+ tmp->magic = 0; -+ break; -+ } -+ tmp->msgcount = 0; -+ tmp->msg_unread = 0; -+ tmp->msg_flagged = 0; -+ while ((de = readdir (dirp)) != NULL) -+ { -+ char *p; -+ if (*de->d_name != '.' && -+ (!(p = strstr (de->d_name, ":2,")) || !strchr (p + 3, 'T'))) -+ { -+ tmp->has_new = tmp->new = 1; -+ tmp->msgcount++; -+ tmp->msg_unread++; -+ } -+ } -+ if(tmp->msg_unread) -+ BuffyCount++; -+ -+ closedir (dirp); -+ -+ /* -+ * count read messages (for folderlist (sidebar) we also need to count -+ * messages in cur so that we the total number of messages -+ */ -+ snprintf (path, sizeof (path), "%s/cur", tmp->path); -+ if ((dirp = opendir (path)) == NULL) -+ { -+ tmp->magic = 0; -+ break; -+ } -+ while ((de = readdir (dirp)) != NULL) -+ { -+ char *p; -+ if (*de->d_name != '.') { -+ if ((p = strstr (de->d_name, ":2,"))) { -+ if (!strchr (p + 3, 'T')) { -+ tmp->msgcount++; -+ if ( !strchr (p + 3, 'S')) -+ tmp->msg_unread++; -+ if (strchr(p + 3, 'F')) -+ tmp->msg_flagged++; -+ } -+ } else -+ tmp->msgcount++; -+ } -+ } -+ closedir (dirp); -+ } - break; - - case M_MH: -- if ((tmp->new = mh_buffy (tmp->path)) > 0) -- BuffyCount++; -+ { -+ DIR *dp; -+ char path[_POSIX_PATH_MAX]; -+ struct dirent *de; -+ if ((tmp->new = mh_buffy (tmp->path)) > 0) -+ BuffyCount++; -+ -+ if ((dp = opendir (path)) == NULL) -+ break; -+ tmp->msgcount = 0; -+ while ((de = readdir (dp))) -+ { -+ if (mh_valid_message (de->d_name)) -+ { -+ tmp->msgcount++; -+ tmp->has_new = tmp->new = 1; -+ } -+ } -+ closedir (dp); -+ } - break; - } - } -*** mutt-1.5.20-orig/buffy.h 2009-04-30 00:36:16.000000000 -0500 ---- mutt-1.5.20-patched/buffy.h 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 25,31 **** ---- 25,36 ---- - char path[_POSIX_PATH_MAX]; - off_t size; - struct buffy_t *next; -+ struct buffy_t *prev; - short new; /* mailbox has new mail */ -+ short has_new; /* set it new if new and not read */ -+ int msgcount; /* total number of messages */ -+ int msg_unread; /* number of unread messages */ -+ int msg_flagged; /* number of flagged messages */ - short notified; /* user has been notified */ - short magic; /* mailbox type */ - short newly_created; /* mbox or mmdf just popped into existence */ -*** mutt-1.5.20-orig/color.c 2009-05-18 19:11:35.000000000 -0500 ---- mutt-1.5.20-patched/color.c 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 93,98 **** ---- 93,100 ---- - { "bold", MT_COLOR_BOLD }, - { "underline", MT_COLOR_UNDERLINE }, - { "index", MT_COLOR_INDEX }, -+ { "sidebar_new", MT_COLOR_NEW }, -+ { "sidebar_flagged", MT_COLOR_FLAGGED }, - { NULL, 0 } - }; - -*** mutt-1.5.20-orig/curs_main.c 2009-06-13 21:48:36.000000000 -0500 ---- mutt-1.5.20-patched/curs_main.c 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 26,32 **** ---- 26,34 ---- - #include "mailbox.h" - #include "mapping.h" - #include "sort.h" -+ #include "buffy.h" - #include "mx.h" -+ #include "sidebar.h" - - #ifdef USE_POP - #include "pop.h" -*************** -*** 523,530 **** - menu->redraw |= REDRAW_STATUS; - if (do_buffy_notify) - { -! if (mutt_buffy_notify () && option (OPTBEEPNEW)) -! beep (); - } - else - do_buffy_notify = 1; ---- 525,536 ---- - menu->redraw |= REDRAW_STATUS; - if (do_buffy_notify) - { -! if (mutt_buffy_notify ()) -! { -! menu->redraw |= REDRAW_FULL; -! if (option (OPTBEEPNEW)) -! beep (); -! } - } - else - do_buffy_notify = 1; -*************** -*** 536,541 **** ---- 542,548 ---- - if (menu->redraw & REDRAW_FULL) - { - menu_redraw_full (menu); -+ draw_sidebar(menu->menu); - mutt_show_error (); - } - -*************** -*** 558,567 **** ---- 565,577 ---- - - if (menu->redraw & REDRAW_STATUS) - { -+ DrawFullLine = 1; - menu_status_line (buf, sizeof (buf), menu, NONULL (Status)); -+ DrawFullLine = 0; - CLEARLINE (option (OPTSTATUSONTOP) ? 0 : LINES-2); - SETCOLOR (MT_COLOR_STATUS); - BKGDSET (MT_COLOR_STATUS); -+ set_buffystats(Context); - mutt_paddstr (COLS, buf); - SETCOLOR (MT_COLOR_NORMAL); - BKGDSET (MT_COLOR_NORMAL); -*************** -*** 575,581 **** - menu->oldcurrent = -1; - - if (option (OPTARROWCURSOR)) -! move (menu->current - menu->top + menu->offset, 2); - else if (option (OPTBRAILLEFRIENDLY)) - move (menu->current - menu->top + menu->offset, 0); - else ---- 585,591 ---- - menu->oldcurrent = -1; - - if (option (OPTARROWCURSOR)) -! move (menu->current - menu->top + menu->offset, SidebarWidth + 2); - else if (option (OPTBRAILLEFRIENDLY)) - move (menu->current - menu->top + menu->offset, 0); - else -*************** -*** 1055,1060 **** ---- 1065,1071 ---- - menu->redraw = REDRAW_FULL; - break; - -+ case OP_SIDEBAR_OPEN: - case OP_MAIN_CHANGE_FOLDER: - case OP_MAIN_NEXT_UNREAD_MAILBOX: - -*************** -*** 1086,1092 **** - { - mutt_buffy (buf, sizeof (buf)); - -! if (mutt_enter_fname (cp, buf, sizeof (buf), &menu->redraw, 1) == -1) - { - if (menu->menu == MENU_PAGER) - { ---- 1097,1107 ---- - { - mutt_buffy (buf, sizeof (buf)); - -! if ( op == OP_SIDEBAR_OPEN ) { -! if(!CurBuffy) -! break; -! strncpy( buf, CurBuffy->path, sizeof(buf) ); -! } else if (mutt_enter_fname (cp, buf, sizeof (buf), &menu->redraw, 1) == -1) - { - if (menu->menu == MENU_PAGER) - { -*************** -*** 1104,1109 **** ---- 1119,1125 ---- - } - - mutt_expand_path (buf, sizeof (buf)); -+ set_curbuffy(buf); - if (mx_get_magic (buf) <= 0) - { - mutt_error (_("%s is not a mailbox."), buf); -*************** -*** 2183,2188 **** ---- 2199,2210 ---- - mutt_what_key(); - break; - -+ case OP_SIDEBAR_SCROLL_UP: -+ case OP_SIDEBAR_SCROLL_DOWN: -+ case OP_SIDEBAR_NEXT: -+ case OP_SIDEBAR_PREV: -+ scroll_sidebar(op, menu->menu); -+ break; - default: - if (menu->menu == MENU_MAIN) - km_error_key (MENU_MAIN); -*** mutt-1.5.20-orig/flags.c 2008-12-16 21:50:09.000000000 -0600 ---- mutt-1.5.20-patched/flags.c 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 22,29 **** ---- 22,31 ---- - - #include "mutt.h" - #include "mutt_curses.h" -+ #include "mutt_menu.h" - #include "sort.h" - #include "mx.h" -+ #include "sidebar.h" - - void _mutt_set_flag (CONTEXT *ctx, HEADER *h, int flag, int bf, int upd_ctx) - { -*************** -*** 263,268 **** ---- 265,271 ---- - */ - if (h->searched && (changed != h->changed || deleted != ctx->deleted || tagged != ctx->tagged || flagged != ctx->flagged)) - h->searched = 0; -+ draw_sidebar(0); - } - - void mutt_tag_set_flag (int flag, int bf) -*** mutt-1.5.20-orig/functions.h 2009-04-30 00:36:17.000000000 -0500 ---- mutt-1.5.20-patched/functions.h 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 168,173 **** ---- 168,178 ---- - { "decrypt-save", OP_DECRYPT_SAVE, NULL }, - - -+ { "sidebar-scroll-up", OP_SIDEBAR_SCROLL_UP, NULL }, -+ { "sidebar-scroll-down", OP_SIDEBAR_SCROLL_DOWN, NULL }, -+ { "sidebar-next", OP_SIDEBAR_NEXT, NULL }, -+ { "sidebar-prev", OP_SIDEBAR_PREV, NULL }, -+ { "sidebar-open", OP_SIDEBAR_OPEN, NULL }, - { NULL, 0, NULL } - }; - -*************** -*** 268,273 **** ---- 273,283 ---- - - { "what-key", OP_WHAT_KEY, NULL }, - -+ { "sidebar-scroll-up", OP_SIDEBAR_SCROLL_UP, NULL }, -+ { "sidebar-scroll-down", OP_SIDEBAR_SCROLL_DOWN, NULL }, -+ { "sidebar-next", OP_SIDEBAR_NEXT, NULL }, -+ { "sidebar-prev", OP_SIDEBAR_PREV, NULL }, -+ { "sidebar-open", OP_SIDEBAR_OPEN, NULL }, - { NULL, 0, NULL } - }; - -*** mutt-1.5.20-orig/globals.h 2009-06-03 15:48:31.000000000 -0500 ---- mutt-1.5.20-patched/globals.h 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 117,122 **** ---- 117,123 ---- - WHERE char *SendCharset; - WHERE char *Sendmail; - WHERE char *Shell; -+ WHERE char *SidebarDelim; - WHERE char *Signature; - WHERE char *SimpleSearch; - #if USE_SMTP -*************** -*** 206,211 **** ---- 207,215 ---- - WHERE short ScoreThresholdRead; - WHERE short ScoreThresholdFlag; - -+ WHERE struct buffy_t *CurBuffy INITVAL(0); -+ WHERE short DrawFullLine INITVAL(0); -+ WHERE short SidebarWidth; - #ifdef USE_IMAP - WHERE short ImapKeepalive; - WHERE short ImapPipelineDepth; -*** mutt-1.5.20-orig/init.h 2009-06-13 16:35:21.000000000 -0500 ---- mutt-1.5.20-patched/init.h 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 1941,1946 **** ---- 1941,1967 ---- - ** not used. - ** (PGP only) - */ -+ {"sidebar_delim", DT_STR, R_BOTH, UL &SidebarDelim, "|"}, -+ /* -+ ** .pp -+ ** This specifies the delimiter between the sidebar (if visible) and -+ ** other screens. -+ */ -+ { "sidebar_visible", DT_BOOL, R_BOTH, OPTSIDEBAR, 0 }, -+ /* -+ ** .pp -+ ** This specifies whether or not to show sidebar (left-side list of folders). -+ */ -+ { "sidebar_sort", DT_BOOL, R_BOTH, OPTSIDEBARSORT, 0 }, -+ /* -+ ** .pp -+ ** This specifies whether or not to sort the sidebar alphabetically. -+ */ -+ { "sidebar_width", DT_NUM, R_BOTH, UL &SidebarWidth, 0 }, -+ /* -+ ** .pp -+ ** The width of the sidebar. -+ */ - { "pgp_use_gpg_agent", DT_BOOL, R_NONE, OPTUSEGPGAGENT, 0}, - /* - ** .pp -*** mutt-1.5.20-orig/mailbox.h 2009-04-30 00:36:17.000000000 -0500 ---- mutt-1.5.20-patched/mailbox.h 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 27,32 **** ---- 27,33 ---- - #define M_NEWFOLDER (1<<4) /* create a new folder - same as M_APPEND, but uses - * safe_fopen() for mbox-style folders. - */ -+ #define M_PEEK (1<<5) /* revert atime back after taking a look (if applicable) */ - - /* mx_open_new_message() */ - #define M_ADD_FROM 1 /* add a From_ line */ ---- orig/Makefile.am.orig 2010-09-18 13:23:19.000000000 +0200 -+++ new/Makefile.am 2010-09-18 13:25:19.000000000 +0200 -@@ -34,7 +34,7 @@ - score.c send.c sendlib.c signal.c sort.c \ - status.c system.c thread.c charset.c history.c lib.c \ - muttlib.c editmsg.c mbyte.c \ -- url.c ascii.c crypt-mod.c crypt-mod.h safe_asprintf.c -+ url.c ascii.c crypt-mod.c crypt-mod.h safe_asprintf.c sidebar.c - - nodist_mutt_SOURCES = $(BUILT_SOURCES) - ---- orig/Makefile.in.orig 2010-09-18 13:23:19.000000000 +0200 -+++ new/Makefile.in 2010-09-18 13:27:19.000000000 +0200 -@@ -89,7 +89,7 @@ - system.$(OBJEXT) thread.$(OBJEXT) charset.$(OBJEXT) \ - history.$(OBJEXT) lib.$(OBJEXT) muttlib.$(OBJEXT) \ - editmsg.$(OBJEXT) mbyte.$(OBJEXT) url.$(OBJEXT) \ -- ascii.$(OBJEXT) crypt-mod.$(OBJEXT) safe_asprintf.$(OBJEXT) -+ ascii.$(OBJEXT) crypt-mod.$(OBJEXT) safe_asprintf.$(OBJEXT) sidebar.$(OBJEXT) - am__objects_1 = - am__objects_2 = patchlist.$(OBJEXT) $(am__objects_1) - nodist_mutt_OBJECTS = $(am__objects_2) -@@ -363,7 +363,7 @@ - score.c send.c sendlib.c signal.c sort.c \ - status.c system.c thread.c charset.c history.c lib.c \ - muttlib.c editmsg.c mbyte.c \ -- url.c ascii.c crypt-mod.c crypt-mod.h safe_asprintf.c -+ url.c ascii.c crypt-mod.c crypt-mod.h safe_asprintf.c sidebar.c - - nodist_mutt_SOURCES = $(BUILT_SOURCES) - mutt_LDADD = @MUTT_LIB_OBJECTS@ @LIBOBJS@ $(LIBIMAP) $(MUTTLIBS) \ -@@ -397,7 +397,7 @@ - README.SSL smime.h group.h \ - muttbug pgppacket.h depcomp ascii.h BEWARE PATCHES patchlist.sh \ - ChangeLog mkchangelog.sh mutt_idna.h \ -- snprintf.c regex.c crypt-gpgme.h hcachever.sh.in -+ snprintf.c regex.c crypt-gpgme.h sidebar.h hcachever.sh.in - - EXTRA_SCRIPTS = smime_keys - mutt_dotlock_SOURCES = mutt_dotlock.c -*** mutt-1.5.20-orig/mbox.c 2009-06-10 23:29:41.000000000 -0500 ---- mutt-1.5.20-patched/mbox.c 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 100,105 **** ---- 100,106 ---- - mutt_perror (ctx->path); - return (-1); - } -+ ctx->atime = sb.st_atime; - ctx->mtime = sb.st_mtime; - ctx->size = sb.st_size; - -*************** -*** 255,260 **** ---- 256,262 ---- - - ctx->size = sb.st_size; - ctx->mtime = sb.st_mtime; -+ ctx->atime = sb.st_atime; - - #ifdef NFS_ATTRIBUTE_HACK - if (sb.st_mtime > sb.st_atime) -*** mutt-1.5.20-orig/menu.c 2009-06-01 11:29:32.000000000 -0500 ---- mutt-1.5.20-patched/menu.c 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 24,29 **** ---- 24,30 ---- - #include "mutt_curses.h" - #include "mutt_menu.h" - #include "mbyte.h" -+ #include "sidebar.h" - - #include <string.h> - #include <stdlib.h> -*************** -*** 156,162 **** - { - char *scratch = safe_strdup (s); - int shift = option (OPTARROWCURSOR) ? 3 : 0; -! int cols = COLS - shift; - - mutt_format_string (s, n, cols, cols, FMT_LEFT, ' ', scratch, mutt_strlen (scratch), 1); - s[n - 1] = 0; ---- 157,163 ---- - { - char *scratch = safe_strdup (s); - int shift = option (OPTARROWCURSOR) ? 3 : 0; -! int cols = COLS - shift - SidebarWidth; - - mutt_format_string (s, n, cols, cols, FMT_LEFT, ' ', scratch, mutt_strlen (scratch), 1); - s[n - 1] = 0; -*************** -*** 207,212 **** ---- 208,214 ---- - char buf[LONG_STRING]; - int i; - -+ draw_sidebar(1); - for (i = menu->top; i < menu->top + menu->pagelen; i++) - { - if (i < menu->max) -*************** -*** 217,223 **** - if (option (OPTARROWCURSOR)) - { - attrset (menu->color (i)); -! CLEARLINE (i - menu->top + menu->offset); - - if (i == menu->current) - { ---- 219,225 ---- - if (option (OPTARROWCURSOR)) - { - attrset (menu->color (i)); -! CLEARLINE_WIN (i - menu->top + menu->offset); - - if (i == menu->current) - { -*************** -*** 246,259 **** - BKGDSET (MT_COLOR_INDICATOR); - } - -! CLEARLINE (i - menu->top + menu->offset); - print_enriched_string (menu->color(i), (unsigned char *) buf, i != menu->current); - SETCOLOR (MT_COLOR_NORMAL); - BKGDSET (MT_COLOR_NORMAL); - } - } - else -! CLEARLINE (i - menu->top + menu->offset); - } - menu->redraw = 0; - } ---- 248,261 ---- - BKGDSET (MT_COLOR_INDICATOR); - } - -! CLEARLINE_WIN (i - menu->top + menu->offset); - print_enriched_string (menu->color(i), (unsigned char *) buf, i != menu->current); - SETCOLOR (MT_COLOR_NORMAL); - BKGDSET (MT_COLOR_NORMAL); - } - } - else -! CLEARLINE_WIN (i - menu->top + menu->offset); - } - menu->redraw = 0; - } -*************** -*** 268,274 **** - return; - } - -! move (menu->oldcurrent + menu->offset - menu->top, 0); - SETCOLOR (MT_COLOR_NORMAL); - BKGDSET (MT_COLOR_NORMAL); - ---- 270,276 ---- - return; - } - -! move (menu->oldcurrent + menu->offset - menu->top, SidebarWidth); - SETCOLOR (MT_COLOR_NORMAL); - BKGDSET (MT_COLOR_NORMAL); - -*************** -*** 283,295 **** - clrtoeol (); - menu_make_entry (buf, sizeof (buf), menu, menu->oldcurrent); - menu_pad_string (buf, sizeof (buf)); -! move (menu->oldcurrent + menu->offset - menu->top, 3); - print_enriched_string (menu->color(menu->oldcurrent), (unsigned char *) buf, 1); - SETCOLOR (MT_COLOR_NORMAL); - } - - /* now draw it in the new location */ -! move (menu->current + menu->offset - menu->top, 0); - attrset (menu->color (menu->current)); - ADDCOLOR (MT_COLOR_INDICATOR); - addstr ("->"); ---- 285,297 ---- - clrtoeol (); - menu_make_entry (buf, sizeof (buf), menu, menu->oldcurrent); - menu_pad_string (buf, sizeof (buf)); -! move (menu->oldcurrent + menu->offset - menu->top, SidebarWidth + 3); - print_enriched_string (menu->color(menu->oldcurrent), (unsigned char *) buf, 1); - SETCOLOR (MT_COLOR_NORMAL); - } - - /* now draw it in the new location */ -! move (menu->current + menu->offset - menu->top, SidebarWidth); - attrset (menu->color (menu->current)); - ADDCOLOR (MT_COLOR_INDICATOR); - addstr ("->"); -*************** -*** 310,316 **** - attrset (menu->color (menu->current)); - ADDCOLOR (MT_COLOR_INDICATOR); - BKGDSET (MT_COLOR_INDICATOR); -! CLEARLINE (menu->current - menu->top + menu->offset); - print_enriched_string (menu->color(menu->current), (unsigned char *) buf, 0); - SETCOLOR (MT_COLOR_NORMAL); - BKGDSET (MT_COLOR_NORMAL); ---- 312,318 ---- - attrset (menu->color (menu->current)); - ADDCOLOR (MT_COLOR_INDICATOR); - BKGDSET (MT_COLOR_INDICATOR); -! CLEARLINE_WIN (menu->current - menu->top + menu->offset); - print_enriched_string (menu->color(menu->current), (unsigned char *) buf, 0); - SETCOLOR (MT_COLOR_NORMAL); - BKGDSET (MT_COLOR_NORMAL); -*************** -*** 322,328 **** - { - char buf[LONG_STRING]; - -! move (menu->current + menu->offset - menu->top, 0); - menu_make_entry (buf, sizeof (buf), menu, menu->current); - menu_pad_string (buf, sizeof (buf)); - ---- 324,330 ---- - { - char buf[LONG_STRING]; - -! move (menu->current + menu->offset - menu->top, SidebarWidth); - menu_make_entry (buf, sizeof (buf), menu, menu->current); - menu_pad_string (buf, sizeof (buf)); - -*************** -*** 876,882 **** - - - if (option (OPTARROWCURSOR)) -! move (menu->current - menu->top + menu->offset, 2); - else if (option (OPTBRAILLEFRIENDLY)) - move (menu->current - menu->top + menu->offset, 0); - else ---- 878,884 ---- - - - if (option (OPTARROWCURSOR)) -! move (menu->current - menu->top + menu->offset, SidebarWidth + 2); - else if (option (OPTBRAILLEFRIENDLY)) - move (menu->current - menu->top + menu->offset, 0); - else -*** mutt-1.5.20-orig/mutt_curses.h 2008-11-11 13:55:47.000000000 -0600 ---- mutt-1.5.20-patched/mutt_curses.h 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 64,69 **** ---- 64,70 ---- - #undef lines - #endif /* lines */ - -+ #define CLEARLINE_WIN(x) move(x,SidebarWidth), clrtoeol() - #define CLEARLINE(x) move(x,0), clrtoeol() - #define CENTERLINE(x,y) move(y, (COLS-strlen(x))/2), addstr(x) - #define BEEP() do { if (option (OPTBEEP)) beep(); } while (0) -*************** -*** 126,131 **** ---- 127,134 ---- - MT_COLOR_BOLD, - MT_COLOR_UNDERLINE, - MT_COLOR_INDEX, -+ MT_COLOR_NEW, -+ MT_COLOR_FLAGGED, - MT_COLOR_MAX - }; - -*** mutt-1.5.20-orig/mutt.h 2009-06-12 17:15:42.000000000 -0500 ---- mutt-1.5.20-patched/mutt.h 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 418,423 **** ---- 418,425 ---- - OPTSAVEEMPTY, - OPTSAVENAME, - OPTSCORE, -+ OPTSIDEBAR, -+ OPTSIDEBARSORT, - OPTSIGDASHES, - OPTSIGONTOP, - OPTSORTRE, -*************** -*** 854,859 **** ---- 856,862 ---- - { - char *path; - FILE *fp; -+ time_t atime; - time_t mtime; - off_t size; - off_t vsize; -*************** -*** 888,893 **** ---- 891,897 ---- - unsigned int quiet : 1; /* inhibit status messages? */ - unsigned int collapsed : 1; /* are all threads collapsed? */ - unsigned int closing : 1; /* mailbox is being closed */ -+ unsigned int peekonly : 1; /* just taking a glance, revert atime */ - - /* driver hooks */ - void *data; /* driver specific data */ -*** mutt-1.5.20-orig/muttlib.c 2009-05-18 19:11:35.000000000 -0500 ---- mutt-1.5.20-patched/muttlib.c 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 1232,1237 **** ---- 1232,1239 ---- - pl = pw = 1; - - /* see if there's room to add content, else ignore */ -+ if ( DrawFullLine ) -+ { - if ((col < COLS && wlen < destlen) || soft) - { - int pad; -*************** -*** 1274,1279 **** ---- 1276,1327 ---- - col += wid; - src += pl; - } -+ } -+ else -+ { -+ if ((col < COLS-SidebarWidth && wlen < destlen) || soft) -+ { -+ int pad; -+ -+ /* get contents after padding */ -+ mutt_FormatString (buf, sizeof (buf), 0, src + pl, callback, data, flags); -+ len = mutt_strlen (buf); -+ wid = mutt_strwidth (buf); -+ -+ /* try to consume as many columns as we can, if we don't have -+ * memory for that, use as much memory as possible */ -+ pad = (COLS - SidebarWidth - col - wid) / pw; -+ if (pad > 0 && wlen + (pad * pl) + len > destlen) -+ pad = ((signed)(destlen - wlen - len)) / pl; -+ if (pad > 0) -+ { -+ while (pad--) -+ { -+ memcpy (wptr, src, pl); -+ wptr += pl; -+ wlen += pl; -+ col += pw; -+ } -+ } -+ else if (soft && pad < 0) -+ { -+ /* \0-terminate dest for length computation in mutt_wstr_trunc() */ -+ *wptr = 0; -+ /* make sure right part is at most as wide as display */ -+ len = mutt_wstr_trunc (buf, destlen, COLS, &wid); -+ /* truncate left so that right part fits completely in */ -+ wlen = mutt_wstr_trunc (dest, destlen - len, col + pad, &col); -+ wptr = dest + wlen; -+ } -+ if (len + wlen > destlen) -+ len = mutt_wstr_trunc (buf, destlen - wlen, COLS - SidebarWidth - col, NULL); -+ memcpy (wptr, buf, len); -+ wptr += len; -+ wlen += len; -+ col += wid; -+ src += pl; -+ } -+ } - break; /* skip rest of input */ - } - else if (ch == '|') -*** mutt-1.5.20-orig/mx.c 2009-06-10 23:29:41.000000000 -0500 ---- mutt-1.5.20-patched/mx.c 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 581,586 **** ---- 581,587 ---- - * M_APPEND open mailbox for appending - * M_READONLY open mailbox in read-only mode - * M_QUIET only print error messages -+ * M_PEEK revert atime where applicable - * ctx if non-null, context struct to use - */ - CONTEXT *mx_open_mailbox (const char *path, int flags, CONTEXT *pctx) -*************** -*** 603,608 **** ---- 604,611 ---- - ctx->quiet = 1; - if (flags & M_READONLY) - ctx->readonly = 1; -+ if (flags & M_PEEK) -+ ctx->peekonly = 1; - - if (flags & (M_APPEND|M_NEWFOLDER)) - { -*************** -*** 702,710 **** ---- 705,725 ---- - void mx_fastclose_mailbox (CONTEXT *ctx) - { - int i; -+ #ifndef BUFFY_SIZE -+ struct utimbuf ut; -+ #endif - - if(!ctx) - return; -+ #ifndef BUFFY_SIZE -+ /* fix up the times so buffy won't get confused */ -+ if (ctx->peekonly && ctx->path && ctx->mtime > ctx->atime) -+ { -+ ut.actime = ctx->atime; -+ ut.modtime = ctx->mtime; -+ utime (ctx->path, &ut); -+ } -+ #endif - - if (ctx->mx_close) - ctx->mx_close (ctx); -*** mutt-1.5.20-orig/OPS 2009-05-13 00:01:13.000000000 -0500 ---- mutt-1.5.20-patched/OPS 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 178,180 **** ---- 178,185 ---- - OP_MAIN_SHOW_LIMIT "show currently active limit pattern" - OP_MAIN_COLLAPSE_THREAD "collapse/uncollapse current thread" - OP_MAIN_COLLAPSE_ALL "collapse/uncollapse all threads" -+ OP_SIDEBAR_SCROLL_UP "scroll the mailbox pane up 1 page" -+ OP_SIDEBAR_SCROLL_DOWN "scroll the mailbox pane down 1 page" -+ OP_SIDEBAR_NEXT "go down to next mailbox" -+ OP_SIDEBAR_PREV "go to previous mailbox" -+ OP_SIDEBAR_OPEN "open hilighted mailbox" ---- orig/pager.c.orig 2010-09-18 13:23:19.000000000 +0200 -+++ new/pager.c 2010-09-18 14:03:08.000000000 +0200 -@@ -29,6 +29,7 @@ - #include "pager.h" - #include "attach.h" - #include "mbyte.h" -+#include "sidebar.h" - - #include "mutt_crypt.h" - -@@ -1104,6 +1105,7 @@ - if (check_attachment_marker ((char *)buf) == 0) - wrap_cols = COLS; - -+ wrap_cols -= SidebarWidth; - /* FIXME: this should come from lineInfo */ - memset(&mbstate, 0, sizeof(mbstate)); - -@@ -1778,7 +1780,7 @@ - if ((redraw & REDRAW_BODY) || topline != oldtopline) - { - do { -- move (bodyoffset, 0); -+ move (bodyoffset, SidebarWidth); - curline = oldtopline = topline; - lines = 0; - force_redraw = 0; -@@ -1791,6 +1793,7 @@ - &QuoteList, &q_level, &force_redraw, &SearchRE) > 0) - lines++; - curline++; -+ move(lines + bodyoffset, SidebarWidth); - } - last_offset = lineInfo[curline].offset; - } while (force_redraw); -@@ -1804,6 +1807,7 @@ - addch ('~'); - addch ('\n'); - lines++; -+ move(lines + bodyoffset, SidebarWidth); - } - /* We are going to update the pager status bar, so it isn't - * necessary to reset to normal color now. */ -@@ -1827,21 +1831,21 @@ - /* print out the pager status bar */ - SETCOLOR (MT_COLOR_STATUS); - BKGDSET (MT_COLOR_STATUS); -- CLEARLINE (statusoffset); -+ CLEARLINE_WIN (statusoffset); - - if (IsHeader (extra) || IsMsgAttach (extra)) - { -- size_t l1 = COLS * MB_LEN_MAX; -+ size_t l1 = (COLS-SidebarWidth) * MB_LEN_MAX; - size_t l2 = sizeof (buffer); - hfi.hdr = (IsHeader (extra)) ? extra->hdr : extra->bdy->hdr; - mutt_make_string_info (buffer, l1 < l2 ? l1 : l2, NONULL (PagerFmt), &hfi, M_FORMAT_MAKEPRINT); -- mutt_paddstr (COLS, buffer); -+ mutt_paddstr (COLS-SidebarWidth, buffer); - } - else - { - char bn[STRING]; - snprintf (bn, sizeof (bn), "%s (%s)", banner, pager_progress_str); -- mutt_paddstr (COLS, bn); -+ mutt_paddstr (COLS-SidebarWidth, bn); - } - BKGDSET (MT_COLOR_NORMAL); - SETCOLOR (MT_COLOR_NORMAL); -@@ -1852,18 +1856,23 @@ - /* redraw the pager_index indicator, because the - * flags for this message might have changed. */ - menu_redraw_current (index); -+ draw_sidebar(MENU_PAGER); - - /* print out the index status bar */ - menu_status_line (buffer, sizeof (buffer), index, NONULL(Status)); - -- move (indexoffset + (option (OPTSTATUSONTOP) ? 0 : (indexlen - 1)), 0); -+ move (indexoffset + (option (OPTSTATUSONTOP) ? 0 : (indexlen - 1)), SidebarWidth); - SETCOLOR (MT_COLOR_STATUS); - BKGDSET (MT_COLOR_STATUS); -- mutt_paddstr (COLS, buffer); -+ mutt_paddstr (COLS-SidebarWidth, buffer); - SETCOLOR (MT_COLOR_NORMAL); - BKGDSET (MT_COLOR_NORMAL); - } - -+ /* if we're not using the index, update every time */ -+ if ( index == 0 ) -+ draw_sidebar(MENU_PAGER); -+ - redraw = 0; - - if (option(OPTBRAILLEFRIENDLY)) { -@@ -2852,6 +2861,13 @@ - mutt_what_key (); - break; - -+ case OP_SIDEBAR_SCROLL_UP: -+ case OP_SIDEBAR_SCROLL_DOWN: -+ case OP_SIDEBAR_NEXT: -+ case OP_SIDEBAR_PREV: -+ scroll_sidebar(ch, MENU_PAGER); -+ break; -+ - default: - ch = -1; - break; -*** mutt-1.5.20-orig/PATCHES 2008-11-11 13:55:46.000000000 -0600 ---- mutt-1.5.20-patched/PATCHES 2009-06-19 22:20:31.000000000 -0500 -*************** -*** 0 **** ---- 1 ---- -+ patch-1.5.20.sidebar.20090619.txt -*** mutt-1.5.20-orig/sidebar.c 1969-12-31 18:00:00.000000000 -0600 ---- mutt-1.5.20-patched/sidebar.c 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 0 **** ---- 1,333 ---- -+ /* -+ * Copyright (C) ????-2004 Justin Hibbits <jrh29@po.cwru.edu> -+ * Copyright (C) 2004 Thomer M. Gil <mutt@thomer.com> -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. -+ */ -+ -+ -+ #if HAVE_CONFIG_H -+ # include "config.h" -+ #endif -+ -+ #include "mutt.h" -+ #include "mutt_menu.h" -+ #include "mutt_curses.h" -+ #include "sidebar.h" -+ #include "buffy.h" -+ #include <libgen.h> -+ #include "keymap.h" -+ #include <stdbool.h> -+ -+ /*BUFFY *CurBuffy = 0;*/ -+ static BUFFY *TopBuffy = 0; -+ static BUFFY *BottomBuffy = 0; -+ static int known_lines = 0; -+ -+ static int quick_log10(int n) -+ { -+ char string[32]; -+ sprintf(string, "%d", n); -+ return strlen(string); -+ } -+ -+ void calc_boundaries (int menu) -+ { -+ BUFFY *tmp = Incoming; -+ -+ if ( known_lines != LINES ) { -+ TopBuffy = BottomBuffy = 0; -+ known_lines = LINES; -+ } -+ for ( ; tmp->next != 0; tmp = tmp->next ) -+ tmp->next->prev = tmp; -+ -+ if ( TopBuffy == 0 && BottomBuffy == 0 ) -+ TopBuffy = Incoming; -+ if ( BottomBuffy == 0 ) { -+ int count = LINES - 2 - (menu != MENU_PAGER || option(OPTSTATUSONTOP)); -+ BottomBuffy = TopBuffy; -+ while ( --count && BottomBuffy->next ) -+ BottomBuffy = BottomBuffy->next; -+ } -+ else if ( TopBuffy == CurBuffy->next ) { -+ int count = LINES - 2 - (menu != MENU_PAGER); -+ BottomBuffy = CurBuffy; -+ tmp = BottomBuffy; -+ while ( --count && tmp->prev) -+ tmp = tmp->prev; -+ TopBuffy = tmp; -+ } -+ else if ( BottomBuffy == CurBuffy->prev ) { -+ int count = LINES - 2 - (menu != MENU_PAGER); -+ TopBuffy = CurBuffy; -+ tmp = TopBuffy; -+ while ( --count && tmp->next ) -+ tmp = tmp->next; -+ BottomBuffy = tmp; -+ } -+ } -+ -+ char *make_sidebar_entry(char *box, int size, int new, int flagged) -+ { -+ static char *entry = 0; -+ char *c; -+ int i = 0; -+ int delim_len = strlen(SidebarDelim); -+ -+ c = realloc(entry, SidebarWidth - delim_len + 2); -+ if ( c ) entry = c; -+ entry[SidebarWidth - delim_len + 1] = 0; -+ for (; i < SidebarWidth - delim_len + 1; entry[i++] = ' ' ); -+ i = strlen(box); -+ strncpy( entry, box, i < (SidebarWidth - delim_len + 1) ? i : (SidebarWidth - delim_len + 1) ); -+ -+ if (size == -1) -+ sprintf(entry + SidebarWidth - delim_len - 3, "?"); -+ else if ( new ) { -+ if (flagged > 0) { -+ sprintf( -+ entry + SidebarWidth - delim_len - 5 - quick_log10(size) - quick_log10(new) - quick_log10(flagged), -+ "% d(%d)[%d]", size, new, flagged); -+ } else { -+ sprintf( -+ entry + SidebarWidth - delim_len - 3 - quick_log10(size) - quick_log10(new), -+ "% d(%d)", size, new); -+ } -+ } else if (flagged > 0) { -+ sprintf( entry + SidebarWidth - delim_len - 3 - quick_log10(size) - quick_log10(flagged), "% d[%d]", size, flagged); -+ } else { -+ sprintf( entry + SidebarWidth - delim_len - 1 - quick_log10(size), "% d", size); -+ } -+ return entry; -+ } -+ -+ void set_curbuffy(char buf[LONG_STRING]) -+ { -+ BUFFY* tmp = CurBuffy = Incoming; -+ -+ if (!Incoming) -+ return; -+ -+ while(1) { -+ if(!strcmp(tmp->path, buf)) { -+ CurBuffy = tmp; -+ break; -+ } -+ -+ if(tmp->next) -+ tmp = tmp->next; -+ else -+ break; -+ } -+ } -+ -+ int draw_sidebar(int menu) { -+ -+ int lines = option(OPTHELP) ? 1 : 0; -+ BUFFY *tmp; -+ #ifndef USE_SLANG_CURSES -+ attr_t attrs; -+ #endif -+ short delim_len = strlen(SidebarDelim); -+ short color_pair; -+ -+ static bool initialized = false; -+ static int prev_show_value; -+ static short saveSidebarWidth; -+ -+ /* initialize first time */ -+ if(!initialized) { -+ prev_show_value = option(OPTSIDEBAR); -+ saveSidebarWidth = SidebarWidth; -+ if(!option(OPTSIDEBAR)) SidebarWidth = 0; -+ initialized = true; -+ } -+ -+ /* save or restore the value SidebarWidth */ -+ if(prev_show_value != option(OPTSIDEBAR)) { -+ if(prev_show_value && !option(OPTSIDEBAR)) { -+ saveSidebarWidth = SidebarWidth; -+ SidebarWidth = 0; -+ } else if(!prev_show_value && option(OPTSIDEBAR)) { -+ SidebarWidth = saveSidebarWidth; -+ } -+ prev_show_value = option(OPTSIDEBAR); -+ } -+ -+ -+ // if ( SidebarWidth == 0 ) return 0; -+ if (SidebarWidth > 0 && option (OPTSIDEBAR) -+ && delim_len >= SidebarWidth) { -+ unset_option (OPTSIDEBAR); -+ /* saveSidebarWidth = SidebarWidth; */ -+ if (saveSidebarWidth > delim_len) { -+ SidebarWidth = saveSidebarWidth; -+ mutt_error (_("Value for sidebar_delim is too long. Disabling sidebar.")); -+ sleep (2); -+ } else { -+ SidebarWidth = 0; -+ mutt_error (_("Value for sidebar_delim is too long. Disabling sidebar. Please set your sidebar_width to a sane value.")); -+ sleep (4); /* the advise to set a sane value should be seen long enough */ -+ } -+ saveSidebarWidth = 0; -+ return (0); -+ } -+ -+ if ( SidebarWidth == 0 || !option(OPTSIDEBAR)) { -+ if (SidebarWidth > 0) { -+ saveSidebarWidth = SidebarWidth; -+ SidebarWidth = 0; -+ } -+ unset_option(OPTSIDEBAR); -+ return 0; -+ } -+ -+ /* get attributes for divider */ -+ SETCOLOR(MT_COLOR_STATUS); -+ #ifndef USE_SLANG_CURSES -+ attr_get(&attrs, &color_pair, 0); -+ #else -+ color_pair = attr_get(); -+ #endif -+ SETCOLOR(MT_COLOR_NORMAL); -+ -+ /* draw the divider */ -+ -+ for ( ; lines < LINES-1-(menu != MENU_PAGER || option(OPTSTATUSONTOP)); lines++ ) { -+ move(lines, SidebarWidth - delim_len); -+ addstr(NONULL(SidebarDelim)); -+ #ifndef USE_SLANG_CURSES -+ mvchgat(lines, SidebarWidth - delim_len, delim_len, 0, color_pair, NULL); -+ #endif -+ } -+ -+ if ( Incoming == 0 ) return 0; -+ lines = option(OPTHELP) ? 1 : 0; /* go back to the top */ -+ -+ if ( known_lines != LINES || TopBuffy == 0 || BottomBuffy == 0 ) -+ calc_boundaries(menu); -+ if ( CurBuffy == 0 ) CurBuffy = Incoming; -+ -+ tmp = TopBuffy; -+ -+ SETCOLOR(MT_COLOR_NORMAL); -+ -+ for ( ; tmp && lines < LINES-1 - (menu != MENU_PAGER || option(OPTSTATUSONTOP)); tmp = tmp->next ) { -+ if ( tmp == CurBuffy ) -+ SETCOLOR(MT_COLOR_INDICATOR); -+ else if ( tmp->msg_unread > 0 ) -+ SETCOLOR(MT_COLOR_NEW); -+ else if ( tmp->msg_flagged > 0 ) -+ SETCOLOR(MT_COLOR_FLAGGED); -+ else -+ SETCOLOR(MT_COLOR_NORMAL); -+ -+ move( lines, 0 ); -+ if ( Context && !strcmp( tmp->path, Context->path ) ) { -+ tmp->msg_unread = Context->unread; -+ tmp->msgcount = Context->msgcount; -+ tmp->msg_flagged = Context->flagged; -+ } -+ // check whether Maildir is a prefix of the current folder's path -+ short maildir_is_prefix = 0; -+ if ( (strlen(tmp->path) > strlen(Maildir)) && -+ (strncmp(Maildir, tmp->path, strlen(Maildir)) == 0) ) -+ maildir_is_prefix = 1; -+ // calculate depth of current folder and generate its display name with indented spaces -+ int sidebar_folder_depth = 0; -+ char *sidebar_folder_name; -+ sidebar_folder_name = basename(tmp->path); -+ if ( maildir_is_prefix ) { -+ char *tmp_folder_name; -+ int i; -+ tmp_folder_name = tmp->path + strlen(Maildir); -+ for (i = 0; i < strlen(tmp->path) - strlen(Maildir); i++) { -+ if (tmp_folder_name[i] == '/') sidebar_folder_depth++; -+ } -+ if (sidebar_folder_depth > 0) { -+ sidebar_folder_name = malloc(strlen(basename(tmp->path)) + sidebar_folder_depth + 1); -+ for (i=0; i < sidebar_folder_depth; i++) -+ sidebar_folder_name[i]=' '; -+ sidebar_folder_name[i]=0; -+ strncat(sidebar_folder_name, basename(tmp->path), strlen(basename(tmp->path)) + sidebar_folder_depth); -+ } -+ } -+ printw( "%.*s", SidebarWidth - delim_len + 1, -+ make_sidebar_entry(sidebar_folder_name, tmp->msgcount, -+ tmp->msg_unread, tmp->msg_flagged)); -+ if (sidebar_folder_depth > 0) -+ free(sidebar_folder_name); -+ lines++; -+ } -+ SETCOLOR(MT_COLOR_NORMAL); -+ for ( ; lines < LINES-1 - (menu != MENU_PAGER || option(OPTSTATUSONTOP)); lines++ ) { -+ int i = 0; -+ move( lines, 0 ); -+ for ( ; i < SidebarWidth - delim_len; i++ ) -+ addch(' '); -+ } -+ return 0; -+ } -+ -+ -+ void set_buffystats(CONTEXT* Context) -+ { -+ BUFFY *tmp = Incoming; -+ while(tmp) { -+ if(Context && !strcmp(tmp->path, Context->path)) { -+ tmp->msg_unread = Context->unread; -+ tmp->msgcount = Context->msgcount; -+ break; -+ } -+ tmp = tmp->next; -+ } -+ } -+ -+ void scroll_sidebar(int op, int menu) -+ { -+ if(!SidebarWidth) return; -+ if(!CurBuffy) return; -+ -+ switch (op) { -+ case OP_SIDEBAR_NEXT: -+ if ( CurBuffy->next == NULL ) return; -+ CurBuffy = CurBuffy->next; -+ break; -+ case OP_SIDEBAR_PREV: -+ if ( CurBuffy->prev == NULL ) return; -+ CurBuffy = CurBuffy->prev; -+ break; -+ case OP_SIDEBAR_SCROLL_UP: -+ CurBuffy = TopBuffy; -+ if ( CurBuffy != Incoming ) { -+ calc_boundaries(menu); -+ CurBuffy = CurBuffy->prev; -+ } -+ break; -+ case OP_SIDEBAR_SCROLL_DOWN: -+ CurBuffy = BottomBuffy; -+ if ( CurBuffy->next ) { -+ calc_boundaries(menu); -+ CurBuffy = CurBuffy->next; -+ } -+ break; -+ default: -+ return; -+ } -+ calc_boundaries(menu); -+ draw_sidebar(menu); -+ } -+ -*** mutt-1.5.20-orig/sidebar.h 1969-12-31 18:00:00.000000000 -0600 ---- mutt-1.5.20-patched/sidebar.h 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 0 **** ---- 1,36 ---- -+ /* -+ * Copyright (C) ????-2004 Justin Hibbits <jrh29@po.cwru.edu> -+ * Copyright (C) 2004 Thomer M. Gil <mutt@thomer.com> -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. -+ */ -+ -+ #ifndef SIDEBAR_H -+ #define SIDEBAR_H -+ -+ struct MBOX_LIST { -+ char *path; -+ int msgcount; -+ int new; -+ } MBLIST; -+ -+ /* parameter is whether or not to go to the status line */ -+ /* used for omitting the last | that covers up the status bar in the index */ -+ int draw_sidebar(int); -+ void scroll_sidebar(int, int); -+ void set_curbuffy(char*); -+ void set_buffystats(CONTEXT*); -+ -+ #endif /* SIDEBAR_H */ -*** mutt-1.5.20-orig/doc/Muttrc 2009-06-14 13:53:24.000000000 -0500 ---- mutt-1.5.20-patched/doc/Muttrc 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 657,662 **** ---- 657,682 ---- - # $crypt_autosign, $crypt_replysign and $smime_is_default. - # - # -+ # set sidebar_visible=no -+ # -+ # Name: sidebar_visible -+ # Type: boolean -+ # Default: no -+ # -+ # -+ # This specifies whether or not to show sidebar (left-side list of folders). -+ # -+ # -+ # set sidebar_width=0 -+ # -+ # Name: sidebar_width -+ # Type: number -+ # Default: 0 -+ # -+ # -+ # The width of the sidebar. -+ # -+ # - # set crypt_autosign=no - # - # Name: crypt_autosign -*** mutt-1.5.20-orig/imap/imap.c 2009-06-14 12:19:16.000000000 -0500 ---- mutt-1.5.20-patched/imap/imap.c 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 1521,1527 **** - - imap_munge_mbox_name (munged, sizeof (munged), name); - snprintf (command, sizeof (command), -! "STATUS %s (UIDNEXT UIDVALIDITY UNSEEN RECENT)", munged); - - if (imap_exec (idata, command, IMAP_CMD_QUEUE) < 0) - { ---- 1521,1527 ---- - - imap_munge_mbox_name (munged, sizeof (munged), name); - snprintf (command, sizeof (command), -! "STATUS %s (UIDNEXT UIDVALIDITY UNSEEN RECENT MESSAGES)", munged); - - if (imap_exec (idata, command, IMAP_CMD_QUEUE) < 0) - { -*** mutt-1.5.20-orig/imap/command.c 2009-01-05 20:58:31.000000000 -0600 ---- mutt-1.5.20-patched/imap/command.c 2009-06-19 22:07:04.000000000 -0500 -*************** -*** 1009,1014 **** ---- 1009,1021 ---- - opened */ - status->uidnext = oldun; - -+ /* Added to make the sidebar show the correct numbers */ -+ if (status->messages) -+ { -+ inc->msgcount = status->messages; -+ inc->msg_unread = status->unseen; -+ } -+ - FREE (&value); - return; - } ---- orig/compose.c.orig 2010-09-18 13:23:18.000000000 +0200 -+++ new/compose.c 2010-09-18 14:01:09.000000000 +0200 -@@ -80,7 +80,7 @@ - - #define HDR_XOFFSET 14 - #define TITLE_FMT "%14s" /* Used for Prompts, which are ASCII */ --#define W (COLS - HDR_XOFFSET) -+#define W (COLS - HDR_XOFFSET - SidebarWidth) - - static char *Prompts[] = - { -@@ -143,7 +143,7 @@ - { - int off = 0; - -- mvprintw (HDR_CRYPT, 0, TITLE_FMT, "Security: "); -+ mvprintw (HDR_CRYPT, SidebarWidth, TITLE_FMT, "Security: "); - - if ((WithCrypto & (APPLICATION_PGP | APPLICATION_SMIME)) == 0) - { -@@ -175,7 +175,7 @@ - } - - clrtoeol (); -- move (HDR_CRYPTINFO, 0); -+ move (HDR_CRYPTINFO, SidebarWidth); - clrtoeol (); - - if ((WithCrypto & APPLICATION_PGP) -@@ -195,7 +195,7 @@ - && (msg->security & ENCRYPT) - && SmimeCryptAlg - && *SmimeCryptAlg) { -- mvprintw (HDR_CRYPTINFO, 40, "%s%s", _("Encrypt with: "), -+ mvprintw (HDR_CRYPTINFO, SidebarWidth + 40, "%s%s", _("Encrypt with: "), - NONULL(SmimeCryptAlg)); - off = 20; - } -@@ -224,7 +224,7 @@ - if (t && t[0] == '0' && t[1] == '\0') - t = "<random>"; - -- if (c + mutt_strlen (t) + 2 >= COLS) -+ if (c + mutt_strlen (t) + 2 >= COLS - SidebarWidth) - break; - - addstr (NONULL(t)); -@@ -276,7 +276,7 @@ - - buf[0] = 0; - rfc822_write_address (buf, sizeof (buf), addr, 1); -- mvprintw (line, 0, TITLE_FMT, Prompts[line - 1]); -+ mvprintw (line, SidebarWidth, TITLE_FMT, Prompts[line - 1]); - mutt_paddstr (W, buf); - } - -@@ -294,21 +294,21 @@ - } - else - { -- mvprintw (HDR_TO, 0, TITLE_FMT , Prompts[HDR_NEWSGROUPS - 1]); -+ mvprintw (HDR_TO, SidebarWidth, TITLE_FMT , Prompts[HDR_NEWSGROUPS - 1]); - mutt_paddstr (W, NONULL (msg->env->newsgroups)); -- mvprintw (HDR_CC, 0, TITLE_FMT , Prompts[HDR_FOLLOWUPTO - 1]); -+ mvprintw (HDR_CC, SidebarWidth, TITLE_FMT , Prompts[HDR_FOLLOWUPTO - 1]); - mutt_paddstr (W, NONULL (msg->env->followup_to)); - if (option (OPTXCOMMENTTO)) - { -- mvprintw (HDR_BCC, 0, TITLE_FMT , Prompts[HDR_XCOMMENTTO - 1]); -+ mvprintw (HDR_BCC, SidebarWidth, TITLE_FMT , Prompts[HDR_XCOMMENTTO - 1]); - mutt_paddstr (W, NONULL (msg->env->x_comment_to)); - } - } - #endif -- mvprintw (HDR_SUBJECT, 0, TITLE_FMT, Prompts[HDR_SUBJECT - 1]); -+ mvprintw (HDR_SUBJECT, SidebarWidth, TITLE_FMT, Prompts[HDR_SUBJECT - 1]); - mutt_paddstr (W, NONULL (msg->env->subject)); - draw_envelope_addr (HDR_REPLYTO, msg->env->reply_to); -- mvprintw (HDR_FCC, 0, TITLE_FMT, Prompts[HDR_FCC - 1]); -+ mvprintw (HDR_FCC, SidebarWidth, TITLE_FMT, Prompts[HDR_FCC - 1]); - mutt_paddstr (W, fcc); - - if (WithCrypto) -@@ -319,7 +319,7 @@ - #endif - - SETCOLOR (MT_COLOR_STATUS); -- mvaddstr (HDR_ATTACH - 1, 0, _("-- Attachments")); -+ mvaddstr (HDR_ATTACH - 1, SidebarWidth, _("-- Attachments")); - BKGDSET (MT_COLOR_STATUS); - clrtoeol (); - -@@ -357,7 +357,7 @@ - /* redraw the expanded list so the user can see the result */ - buf[0] = 0; - rfc822_write_address (buf, sizeof (buf), *addr, 1); -- move (line, HDR_XOFFSET); -+ move (line, HDR_XOFFSET+SidebarWidth); - mutt_paddstr (W, buf); - - return 0; -@@ -686,7 +686,7 @@ - if (mutt_get_field ("Subject: ", buf, sizeof (buf), 0) == 0) - { - mutt_str_replace (&msg->env->subject, buf); -- move (HDR_SUBJECT, HDR_XOFFSET); -+ move (HDR_SUBJECT, HDR_XOFFSET + SidebarWidth); - clrtoeol (); - if (msg->env->subject) - mutt_paddstr (W, msg->env->subject); -@@ -703,7 +703,7 @@ - { - strfcpy (fcc, buf, fcclen); - mutt_pretty_mailbox (fcc, fcclen); -- move (HDR_FCC, HDR_XOFFSET); -+ move (HDR_FCC, HDR_XOFFSET + SidebarWidth); - mutt_paddstr (W, fcc); - fccSet = 1; diff --git a/mail/mutt-devel/files/extra-patch-signature-menu b/mail/mutt-devel/files/extra-patch-signature-menu deleted file mode 100644 index 029dd4ac215d..000000000000 --- a/mail/mutt-devel/files/extra-patch-signature-menu +++ /dev/null @@ -1,729 +0,0 @@ ---- mutt-1.5.11/PATCHES Dec 2002 17:44:54 -0000 3.6 -+++ mutt-1.5.11/PATCHES Feb 2004 13:19:42 -0000 -@@ -0,0 +1 @@ -+patch-1.5.11.cd.signatures_menu.2.1 ---- mutt-1.5.11/Makefile.am.orig Thu Aug 11 23:27:28 2005 -+++ mutt-1.5.11/Makefile.am Sat Mar 11 21:47:55 2006 -@@ -25,7 +25,7 @@ - main.c mbox.c menu.c mh.c mx.c pager.c parse.c pattern.c \ - postpone.c query.c recvattach.c recvcmd.c \ - rfc822.c rfc1524.c rfc2047.c rfc2231.c \ -- score.c send.c sendlib.c signal.c sort.c \ -+ score.c send.c sendlib.c signal.c signature.c sort.c \ - status.c system.c thread.c charset.c history.c lib.c \ - muttlib.c editmsg.c utf8.c mbyte.c wcwidth.c \ - url.c ascii.c mutt_idna.c crypt-mod.c crypt-mod.h ---- mutt-1.5.12/Makefile.in.orig Mon Jul 17 16:29:15 2006 -+++ mutt-1.5.12/Makefile.in Mon Jul 17 16:30:26 2006 -@@ -90,7 +90,7 @@ - query.$(OBJEXT) recvattach.$(OBJEXT) recvcmd.$(OBJEXT) \ - rfc822.$(OBJEXT) rfc1524.$(OBJEXT) rfc2047.$(OBJEXT) \ - rfc2231.$(OBJEXT) score.$(OBJEXT) send.$(OBJEXT) \ -- sendlib.$(OBJEXT) signal.$(OBJEXT) sort.$(OBJEXT) \ -+ sendlib.$(OBJEXT) signal.$(OBJEXT) signature.$(OBJEXT) sort.$(OBJEXT) \ - status.$(OBJEXT) system.$(OBJEXT) thread.$(OBJEXT) \ - charset.$(OBJEXT) history.$(OBJEXT) lib.$(OBJEXT) \ - muttlib.$(OBJEXT) editmsg.$(OBJEXT) utf8.$(OBJEXT) \ -@@ -309,7 +309,7 @@ - main.c mbox.c menu.c mh.c mx.c pager.c parse.c pattern.c \ - postpone.c query.c recvattach.c recvcmd.c \ - rfc822.c rfc1524.c rfc2047.c rfc2231.c \ -- score.c send.c sendlib.c signal.c sort.c \ -+ score.c send.c sendlib.c signal.c signature.c sort.c \ - status.c system.c thread.c charset.c history.c lib.c \ - muttlib.c editmsg.c utf8.c mbyte.c wcwidth.c \ - url.c ascii.c mutt_idna.c crypt-mod.c crypt-mod.h ---- mutt-1.5.11/OPS.orig Sun Jul 24 18:56:42 2005 -+++ mutt-1.5.11/OPS Sat Mar 11 21:47:55 2006 -@@ -38,6 +38,7 @@ - OP_COMPOSE_POSTPONE_MESSAGE "save this message to send later" - OP_COMPOSE_RENAME_FILE "rename/move an attached file" - OP_COMPOSE_SEND_MESSAGE "send the message" -+OP_COMPOSE_SIG "choose a signature" - OP_COMPOSE_TOGGLE_DISPOSITION "toggle disposition between inline/attachment" - OP_COMPOSE_TOGGLE_UNLINK "toggle whether to delete file after sending it" - OP_COMPOSE_UPDATE_ENCODING "update an attachment's encoding info" -@@ -131,6 +132,7 @@ - OP_NEXT_ENTRY "move to the next entry" - OP_NEXT_LINE "scroll down one line" - OP_NEXT_PAGE "move to the next page" -+OP_NEXT_SIG "move to the next signature" - OP_PAGER_BOTTOM "jump to the bottom of the message" - OP_PAGER_HIDE_QUOTED "toggle display of quoted text" - OP_PAGER_SKIP_QUOTED "skip beyond quoted text" -@@ -139,10 +141,12 @@ - OP_PREV_ENTRY "move to the previous entry" - OP_PREV_LINE "scroll up one line" - OP_PREV_PAGE "move to the previous page" -+OP_PREV_SIG "move to the previous signature" - OP_PRINT "print the current entry" - OP_QUERY "query external program for addresses" - OP_QUERY_APPEND "append new query results to current results" - OP_QUIT "save changes to mailbox and quit" -+OP_RANDOM_SIG "pick a signature at random" - OP_RECALL_MESSAGE "recall a postponed message" - OP_REDRAW "clear and redraw the screen" - OP_REFORMAT_WINCH "{internal}" -@@ -156,6 +160,7 @@ - OP_SEARCH_OPPOSITE "search for next match in opposite direction" - OP_SEARCH_TOGGLE "toggle search pattern coloring" - OP_SHELL_ESCAPE "invoke a command in a subshell" -+OP_SIG_SEARCH "search signatures matching a pattern" - OP_SORT "sort messages" - OP_SORT_REVERSE "sort messages in reverse order" - OP_TAG "tag the current entry" ---- mutt-1.5.11/compose.c.orig Thu Aug 11 21:37:23 2005 -+++ mutt-1.5.11/compose.c Sat Mar 11 21:47:55 2006 -@@ -1128,6 +1128,12 @@ - /* no send2hook, since this doesn't modify the message */ - break; - -+ case OP_COMPOSE_SIG: -+ mutt_signature(msg->content->filename); -+ MAYBE_REDRAW (menu->redraw); -+ mutt_update_encoding (msg->content); -+ break; -+ - case OP_PIPE: - case OP_FILTER: - CHECK_COUNT; ---- mutt-1.5.12/doc/manual.xml.head.orig Mon Jul 17 16:21:01 2006 -+++ mutt-1.5.12/doc/manual.xml.head Mon Jul 17 16:24:46 2006 -@@ -999,6 +999,7 @@ - <row><entry>c</entry><entry>edit-cc</entry><entry>edit the Cc field</entry></row> - <row><entry>b</entry><entry>edit-bcc</entry><entry>edit the Bcc field</entry></row> - <row><entry>y</entry><entry>send-message</entry><entry>send the message</entry></row> -+<row><entry>ESC s</entry><entry>signature-menu</entry><entry>select a signature and append it to your mail</entry></row> - <row><entry>s</entry><entry>edit-subject</entry><entry>edit the Subject</entry></row> - <row><entry>S</entry><entry>smime-menu</entry><entry>select S/MIME options</entry></row> - <row><entry>f</entry><entry>edit-fcc</entry><entry>specify an ``Fcc'' mailbox</entry></row> ---- mutt-1.5.11/functions.h.orig Sun Jul 24 18:56:42 2005 -+++ mutt-1.5.11/functions.h Sat Mar 11 21:48:05 2006 -@@ -311,6 +311,7 @@ - { "view-attach", OP_VIEW_ATTACH, M_ENTER_S }, - { "send-message", OP_COMPOSE_SEND_MESSAGE, "y" }, - { "pipe-entry", OP_PIPE, "|" }, -+ { "signature-menu", OP_COMPOSE_SIG, "\033s" }, - - { "attach-key", OP_COMPOSE_ATTACH_KEY, "\033k" }, - { "pgp-menu", OP_COMPOSE_PGP_MENU, "p" }, -@@ -368,6 +369,19 @@ - { "mail", OP_MAIL, "m" }, - { "query", OP_QUERY, "Q" }, - { "query-append", OP_QUERY_APPEND, "A" }, -+ { NULL, 0, NULL } -+}; -+ -+/* Signature Menu */ -+struct binding_t OpSig[] = { -+ { "next-sig", OP_NEXT_SIG, "j" }, -+ { "previous-sig", OP_PREV_SIG, "k" }, -+ { "random-sig", OP_RANDOM_SIG, "r" }, -+ { NULL, 0, NULL } -+}; -+ -+struct binding_t OpSigDir[] = { -+ { "search-sig", OP_SIG_SEARCH, "/" }, - { NULL, 0, NULL } - }; - ---- mutt-1.5.11/globals.h.orig Thu Sep 15 16:19:54 2005 -+++ mutt-1.5.11/globals.h Sat Mar 11 21:48:05 2006 -@@ -109,6 +109,7 @@ - WHERE char *Sendmail; - WHERE char *Shell; - WHERE char *Signature; -+WHERE char *SigDirectory; - WHERE char *SimpleSearch; - WHERE char *Spoolfile; - WHERE char *SpamSep; ---- mutt-1.5.11/init.h.orig Thu Sep 15 16:19:54 2005 -+++ mutt-1.5.11/init.h Sat Mar 11 21:48:05 2006 -@@ -2457,6 +2457,14 @@ - ** assumed that filename is a shell command and input should be read from - ** its stdout. - */ -+ { "signatures_directory", DT_PATH, R_NONE, UL &SigDirectory, UL "" }, -+ /* -+ ** .pp -+ ** Specifies the path where your signatures are located. In the files of -+ ** this directory, the signatures are separated by blank lines and/or -+ ** sig_dashes (``-- ''). -+ ** You can choose between these signatures from the compose menu. -+ */ - { "simple_search", DT_STR, R_NONE, UL &SimpleSearch, UL "~f %s | ~s %s" }, - /* - ** .pp ---- mutt-1.5.11/keymap.c.orig Wed Sep 7 10:19:43 2005 -+++ mutt-1.5.11/keymap.c Sat Mar 11 21:48:05 2006 -@@ -55,6 +55,8 @@ - - - { "query", MENU_QUERY }, -+ { "signature", MENU_SIG }, -+ { "sig_directory", MENU_SIG_DIR }, - { "generic", MENU_GENERIC }, - { NULL, 0 } - }; -@@ -560,6 +562,8 @@ - create_bindings (OpPost, MENU_POST); - create_bindings (OpQuery, MENU_QUERY); - create_bindings (OpAlias, MENU_ALIAS); -+ create_bindings (OpSig, MENU_SIG); -+ create_bindings (OpSigDir, MENU_SIG_DIR); - - - if ((WithCrypto & APPLICATION_PGP)) -@@ -658,6 +662,9 @@ - km_bindkey ("<enter>", MENU_ATTACH, OP_VIEW_ATTACH); - km_bindkey ("<enter>", MENU_COMPOSE, OP_VIEW_ATTACH); - -+ km_bindkey ("<up>", MENU_SIG, OP_PREV_SIG); -+ km_bindkey ("<down>", MENU_SIG, OP_NEXT_SIG); -+ - /* edit-to (default "t") hides generic tag-entry in Compose menu - This will bind tag-entry to "T" in the Compose menu */ - km_bindkey ("T", MENU_COMPOSE, OP_TAG); -@@ -793,6 +800,10 @@ - return OpEditor; - case MENU_QUERY: - return OpQuery; -+ case MENU_SIG: -+ return OpSig; -+ case MENU_SIG_DIR: -+ return OpSigDir; - - case MENU_PGP: - return (WithCrypto & APPLICATION_PGP)? OpPgp:NULL; ---- mutt-1.5.11/keymap.h.orig Thu Jun 17 22:33:04 2004 -+++ mutt-1.5.11/keymap.h Sat Mar 11 21:48:05 2006 -@@ -62,6 +62,8 @@ - MENU_PAGER, - MENU_POST, - MENU_QUERY, -+ MENU_SIG, -+ MENU_SIG_DIR, - - - MENU_PGP, -@@ -108,6 +110,8 @@ - extern struct binding_t OpEditor[]; - extern struct binding_t OpQuery[]; - extern struct binding_t OpAlias[]; -+extern struct binding_t OpSig[]; -+extern struct binding_t OpSigDir[]; - - extern struct binding_t OpPgp[]; - ---- mutt-1.5.11/protos.h.orig Wed Sep 7 10:19:43 2005 -+++ mutt-1.5.11/protos.h Sat Mar 11 21:48:05 2006 -@@ -242,6 +242,7 @@ - void mutt_shell_escape (void); - void mutt_show_error (void); - void mutt_signal_init (void); -+void mutt_signature (char *); - void mutt_stamp_attachment (BODY *a); - void mutt_tabs_to_spaces (char *); - void mutt_tag_set_flag (int, int); ---- mutt-1.5.11/signature.c.orig Sat Mar 11 21:58:38 2006 -+++ mutt-1.5.11/signature.c Sat Mar 11 22:07:31 2006 -@@ -0,0 +1,499 @@ -+/* -+ * Copyright (C) 2001 Cedric Duval <cedricduval@free.fr> -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation; either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program; if not, write to the Free Software -+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. -+ */ -+ -+#if HAVE_CONFIG_H -+# include "config.h" -+#endif -+ -+#include "mutt.h" -+#include "mutt_menu.h" -+#include "mapping.h" -+#include "mutt_curses.h" -+ -+#include <stdio.h> -+#include <string.h> -+#include <stdlib.h> -+#include <dirent.h> -+#include <sys/stat.h> -+ -+#define SIG_DISPLAY_LINES 4 -+#define SEPARATOR(x) ((*x == '\n') || (mutt_strcmp (x, "-- \n") == 0)) -+#define SIG_ADD_LINE(x,y) mutt_add_list (x, strtok (y, "\n")) -+ -+typedef struct sig_list -+{ -+ struct sig_list *next; -+ LIST *sig; -+} SIG_LIST; -+ -+typedef struct sig_dir -+{ -+ struct sig_dir *next; -+ char *name; -+} SIG_DIR; -+ -+typedef LIST * ENTRY; -+ -+typedef struct entry_dir -+{ -+ int tagged; -+ SIG_DIR *data; -+} ENTRY_DIR; -+ -+static struct mapping_t SigHelp[] = { -+ { N_("Exit"), OP_EXIT }, -+ { N_("Search"), OP_SEARCH }, -+ { N_("Random"), OP_RANDOM_SIG }, -+ { N_("Help"), OP_HELP }, -+ { NULL } -+}; -+ -+static struct mapping_t SigDirHelp[] = { -+ { N_("Exit"), OP_EXIT }, -+ { N_("Search signature"), OP_SIG_SEARCH }, -+ { N_("Help"), OP_HELP }, -+ { NULL } -+}; -+ -+void menu_next_entry (MUTTMENU *menu); -+void menu_prev_entry (MUTTMENU *menu); -+ -+ -+static int sig_match (LIST *s, regex_t *re) -+{ -+ while (s) -+ { -+ if (regexec (re, s->data, (size_t)0, NULL, (int)0) == 0) -+ return 1; -+ s = s->next; -+ } -+ return 0; -+} -+ -+static void read_sig_file (char *name, SIG_LIST **begin, regex_t *re) -+{ -+ FILE *fp; -+ char buf[STRING]; -+ LIST *sig = NULL; -+ SIG_LIST *first, *cur; -+ int append = 0; -+ -+ if (!(fp = safe_fopen (name, "r"))) -+ { -+ mutt_error (_("Can't open signature file %s"), name); -+ return; -+ } -+ -+ for (first = *begin; first && first->next; first = first->next, append++) -+ ; /* append results to an existing list */ -+ cur = first; -+ -+ while (fgets (buf, sizeof (buf), fp)) -+ { -+ if (buf[0] && !SEPARATOR (buf)) -+ { -+ sig = SIG_ADD_LINE (NULL, buf); -+ -+ while (fgets (buf, sizeof (buf), fp) && buf[0] && !SEPARATOR (buf)) -+ SIG_ADD_LINE (sig, buf); -+ -+ if (re && !sig_match (sig, re)) -+ mutt_free_list (&sig); /* previous sig didn't match the regexp */ -+ else -+ { -+ /* add signature */ -+ if (first == NULL) -+ first = cur = (SIG_LIST *) safe_calloc (1, sizeof (SIG_LIST)); -+ else -+ { -+ cur->next = (SIG_LIST *) safe_calloc (1, sizeof (SIG_LIST)); -+ cur = cur->next; -+ } -+ -+ cur->sig = sig; -+ cur->next = NULL; -+ } -+ } -+ } -+ -+ if (!append) -+ *begin = first; -+ -+ safe_fclose (&fp); -+} -+ -+static void sig_make_entry (char *s, size_t slen, MUTTMENU *menu, int num) -+{ -+ ENTRY *table = (ENTRY *) menu->data; -+ -+ snprintf (s, slen, "%3d %s", -+ num + 1, -+ table[num]->data); -+} -+ -+static int sig_menu_search (MUTTMENU *menu, regex_t *re, int num) -+{ -+ return (sig_match (((ENTRY *)menu->data)[num], re) ? 0 : REG_NOMATCH); -+} -+ -+static void draw_sig_frame (LIST *s) -+{ -+ int i; -+ -+ for (i = 1; i <= SIG_DISPLAY_LINES; i++) -+ { -+ if (s) -+ { -+ mvaddstr (i, 0, s->data); -+ s = s->next; -+ } -+ else -+ move (i, 0); -+ -+ clrtoeol (); -+ } -+ -+ SETCOLOR (MT_COLOR_STATUS); -+ mvaddstr (SIG_DISPLAY_LINES + 1, 0, _("-- Signature")); -+ BKGDSET (MT_COLOR_STATUS); -+ clrtoeol (); -+ -+ BKGDSET (MT_COLOR_NORMAL); -+ SETCOLOR (MT_COLOR_NORMAL); -+} -+ -+static void free_sig_list (SIG_LIST **sigs) -+{ -+ SIG_LIST *cur; -+ -+ while (*sigs) -+ { -+ cur = *sigs; -+ *sigs = (*sigs)->next; -+ mutt_free_list (&cur->sig); -+ safe_free ((void **)&cur); -+ } -+} -+ -+static void append_signature (char *msg_file, LIST *s) -+{ -+ FILE *fp; -+ -+ if ((fp = safe_fopen (msg_file, "a")) == 0) -+ mutt_perror (msg_file); -+ else -+ { -+ if (option (OPTSIGDASHES)) -+ fputs ("\n-- \n", fp); -+ -+ for (; s; s = s->next) -+ fprintf (fp, "%s\n", s->data); -+ -+ mutt_message (_("Signature appended to your mail")); -+ safe_fclose (&fp); -+ } -+} -+ -+static LIST *sig_list_menu (char *file, SIG_LIST *list) -+{ -+ LIST *result = NULL; -+ SIG_LIST *sigl; -+ MUTTMENU *menu; -+ ENTRY *SigTable; -+ char helpstr[SHORT_STRING], title[SHORT_STRING]; -+ int i, done = 0; -+ -+ snprintf (title, sizeof (title), _("Signature : %s"), file); -+ -+ menu = mutt_new_menu (); -+ menu->make_entry = sig_make_entry; -+ menu->tag = NULL; -+ menu->search = sig_menu_search; -+ menu->menu = MENU_SIG; -+ menu->title = title; -+ menu->help = mutt_compile_help (helpstr, sizeof (helpstr), -+ MENU_SIG, SigHelp); -+ menu->offset = SIG_DISPLAY_LINES + 2; -+ menu->pagelen = LINES - SIG_DISPLAY_LINES - 4; -+ -+ for (sigl = list; sigl; sigl = sigl->next) -+ menu->max++; -+ -+ menu->data = SigTable = (ENTRY *) safe_calloc (menu->max, sizeof (ENTRY)); -+ -+ for (i = 0, sigl = list; sigl; i++, sigl = sigl->next) -+ SigTable[i] = sigl->sig; -+ -+ while (!done) -+ { -+ switch (mutt_menuLoop (menu)) -+ { -+ case OP_GENERIC_SELECT_ENTRY: -+ result = SigTable[menu->current]; -+ done = 1; -+ break; -+ -+ case OP_PREV_SIG: -+ menu_prev_entry (menu); -+ draw_sig_frame (SigTable[menu->current]); -+ break; -+ -+ case OP_NEXT_SIG: -+ menu_next_entry (menu); -+ draw_sig_frame (SigTable[menu->current]); -+ break; -+ -+ case OP_REDRAW: -+ menu->offset = SIG_DISPLAY_LINES + 2; -+ menu->pagelen = LINES - SIG_DISPLAY_LINES - 4; -+ draw_sig_frame (SigTable[menu->current]); -+ break; -+ -+ case OP_RANDOM_SIG: -+ menu->current = LRAND () % menu->max; -+ draw_sig_frame (SigTable[menu->current]); -+ menu->redraw |= REDRAW_MOTION; -+ break; -+ -+ case OP_EXIT: -+ set_option (OPTNEEDREDRAW); -+ done = 1; -+ break; -+ } -+ } -+ -+ mutt_menuDestroy (&menu); -+ safe_free ((void **)&SigTable); -+ return result; -+} -+ -+static SIG_LIST *sig_search_filter (MUTTMENU *menu, char *path) -+{ -+ regex_t re; -+ char buf[STRING]; -+ SIG_LIST *result = NULL; -+ int i; -+ -+ snprintf (buf, sizeof(buf), menu->searchBuf ? menu->searchBuf : ""); -+ if (mutt_get_field (_("Search for: "), buf, -+ sizeof (buf), M_CLEAR) != 0 || !buf[0]) -+ return (NULL); -+ mutt_str_replace (&menu->searchBuf, buf); -+ -+ if ((i = regcomp (&re, menu->searchBuf, REG_NOSUB | REG_EXTENDED | REG_WORDS -+ | mutt_which_case (menu->searchBuf))) != 0) -+ { -+ regerror (i, &re, buf, sizeof (buf)); -+ regfree (&re); -+ mutt_error ("%s", buf); -+ return (NULL); -+ } -+ -+ /* building list of sigs matching the regexp */ -+ for (i = 0; i < menu->max; i++) -+ { -+ /* search in every file if none is tagged */ -+ if (((ENTRY_DIR *) menu->data)[i].tagged || (menu->tagged == 0)) -+ { -+ snprintf (buf, sizeof (buf), "%s/%s", path, -+ ((ENTRY_DIR *) menu->data)[i].data->name); -+ read_sig_file (buf, &result, &re); -+ } -+ } -+ -+ regfree (&re); -+ if (!result) -+ mutt_error (_("Not found.")); -+ -+ return (result); -+} -+ -+/* returns the list of files in this directory */ -+static SIG_DIR *sig_directory (char *path) -+{ -+ DIR *dp; -+ struct dirent *de; -+ struct stat s; -+ SIG_DIR *first = NULL, *cur = NULL; -+ char file[_POSIX_PATH_MAX + SHORT_STRING]; -+ -+ if ((dp = opendir (path)) == NULL) -+ { -+ mutt_perror (path); -+ return (NULL); -+ } -+ -+ while ((de = readdir (dp))) -+ { -+ if ((de->d_name)[0] == '.') /* no hidden files */ -+ continue; -+ -+ snprintf (file, sizeof (file), "%s/%s", path, de->d_name); -+ if (lstat (file, &s) == -1) -+ continue; -+ -+ if ((!S_ISREG (s.st_mode)) && (!S_ISLNK (s.st_mode))) -+ continue; -+ -+ if (first == NULL) -+ cur = first = safe_calloc (1, sizeof (SIG_DIR)); -+ else -+ { -+ cur->next = safe_calloc (1, sizeof (SIG_DIR)); -+ cur = cur->next; -+ } -+ cur->name = safe_strdup (de->d_name); -+ cur->next = NULL; -+ } -+ closedir (dp); -+ return first; -+} -+ -+static void sig_dir_make_entry (char *s, size_t slen, MUTTMENU *menu, int num) -+{ -+ ENTRY_DIR *table = (ENTRY_DIR *) menu->data; -+ -+ snprintf (s, slen, "%c %3d - %s", -+ table[num].tagged ? '*' : ' ', -+ num + 1, -+ table[num].data->name); -+} -+ -+static int sig_dir_tag (MUTTMENU *menu, int n, int m) -+{ -+ ENTRY_DIR *cur = &((ENTRY_DIR *) menu->data)[n]; -+ int ot = cur->tagged; -+ -+ cur->tagged = m >= 0 ? m : !cur->tagged; -+ return cur->tagged - ot; -+ -+} -+ -+static int sig_dir_sort (const void *a, const void *b) -+{ -+ ENTRY_DIR *pa = (ENTRY_DIR *) a; -+ ENTRY_DIR *pb = (ENTRY_DIR *) b; -+ -+ return (mutt_strcmp (pa->data->name, pb->data->name)); -+} -+ -+static int sig_dir_menu (char *path, char *msg_file) -+{ -+ MUTTMENU *menu; -+ SIG_LIST *sigl; -+ LIST *result = NULL; -+ ENTRY_DIR *FileTable; -+ SIG_DIR *list, *files; -+ char buf[STRING], helpstr[SHORT_STRING], title[SHORT_STRING]; -+ int i, done = 0; -+ -+ if ((list = sig_directory (path)) == NULL) -+ return -1; -+ -+ snprintf (title, sizeof (title), "Signature directory : %s", path); -+ -+ menu = mutt_new_menu (); -+ menu->make_entry = sig_dir_make_entry; -+ menu->search = NULL; /* search within files with sig_search_filter() */ -+ menu->tag = sig_dir_tag; -+ menu->menu = MENU_SIG_DIR; -+ menu->title = title; -+ menu->help = mutt_compile_help (helpstr, sizeof (helpstr), -+ MENU_SIG_DIR, SigDirHelp); -+ -+ for (files = list; files; files = files->next) -+ menu->max++; -+ -+ menu->data = FileTable = (ENTRY_DIR *) safe_calloc (menu->max, -+ sizeof (ENTRY_DIR)); -+ -+ for (i = 0, files = list; files; i++, files = files->next) -+ FileTable[i].data = files; -+ -+ qsort (FileTable, menu->max, sizeof (ENTRY_DIR), sig_dir_sort); -+ -+ while (!done) -+ { -+ switch (mutt_menuLoop (menu)) -+ { -+ case OP_SIG_SEARCH: -+ sigl = sig_search_filter (menu, path); -+ -+ if (sigl) -+ { -+ if ((result = sig_list_menu (_("query results"), sigl)) != NULL) -+ { -+ append_signature (msg_file, result); -+ done = 1; -+ } -+ -+ MAYBE_REDRAW (menu->redraw); -+ free_sig_list (&sigl); -+ } -+ break; -+ -+ case OP_GENERIC_SELECT_ENTRY: -+ snprintf (buf, sizeof (buf), "%s/%s", path, -+ FileTable[menu->current].data->name); -+ sigl = NULL; -+ read_sig_file (buf, &sigl, NULL); -+ -+ if (sigl) -+ { -+ if ((result = sig_list_menu (buf, sigl)) != NULL) -+ { -+ append_signature (msg_file, result); -+ done = 1; -+ } -+ -+ MAYBE_REDRAW (menu->redraw); -+ free_sig_list (&sigl); -+ } -+ break; -+ -+ case OP_EXIT: -+ done = 1; -+ break; -+ } -+ } -+ -+ while (list) -+ { -+ safe_free ((void **)&list->name); -+ files = list; -+ list = list->next; -+ safe_free ((void **)&files); -+ } -+ safe_free ((void **)&FileTable); -+ mutt_menuDestroy (&menu); -+ return 0; -+} -+ -+void mutt_signature (char *msg_file) -+{ -+ if (!SigDirectory) -+ { -+ mutt_error (_("variable 'signatures_directory' is unset")); -+ return; -+ } -+ -+ if (sig_dir_menu (SigDirectory, msg_file) == -1) -+ mutt_error (_("%s: no files in this directory"), SigDirectory); -+ else -+ set_option (OPTNEEDREDRAW); -+} diff --git a/mail/mutt-devel/files/extra-patch-smime-outlook b/mail/mutt-devel/files/extra-patch-smime-outlook deleted file mode 100644 index 355811694002..000000000000 --- a/mail/mutt-devel/files/extra-patch-smime-outlook +++ /dev/null @@ -1,11 +0,0 @@ ---- crypt.c.orig Fri Mar 7 09:23:44 2003 -+++ crypt.c Fri Mar 21 00:06:48 2003 -@@ -440,7 +440,7 @@ - { - len++; - if (!ascii_strcasecmp ((t+len), "p7m")) --#if 0 -+#if 1 - return SMIMEENCRYPT; - #else - /* Not sure if this is the correct thing to do, but diff --git a/mail/mutt-devel/files/extra-patch-trash-purge b/mail/mutt-devel/files/extra-patch-trash-purge deleted file mode 100644 index d609d184d907..000000000000 --- a/mail/mutt-devel/files/extra-patch-trash-purge +++ /dev/null @@ -1,403 +0,0 @@ -diff -pruN -x'*.orig' mutt-1.5.20/OPS mutt-1.5.20-trash/OPS ---- mutt-1.5.20/OPS 2009-05-13 01:01:13.000000000 -0400 -+++ mutt-1.5.20-trash/OPS 2009-07-23 09:44:40.000000000 -0400 -@@ -141,6 +141,7 @@ OP_PREV_ENTRY "move to the previous entr - OP_PREV_LINE "scroll up one line" - OP_PREV_PAGE "move to the previous page" - OP_PRINT "print the current entry" -+OP_PURGE_MESSAGE "really delete the current entry, bypassing the trash folder" - OP_QUERY "query external program for addresses" - OP_QUERY_APPEND "append new query results to current results" - OP_QUIT "save changes to mailbox and quit" -diff -pruN -x'*.orig' mutt-1.5.20/PATCHES mutt-1.5.20-trash/PATCHES ---- mutt-1.5.20/PATCHES 2008-11-11 14:55:46.000000000 -0500 -+++ mutt-1.5.20-trash/PATCHES 2009-07-23 09:53:20.000000000 -0400 -@@ -0,0 +1 @@ -+patch-1.5.20.bk.trash_folder-purge_message.1 -diff -pruN -x'*.orig' mutt-1.5.20/commands.c mutt-1.5.20-trash/commands.c ---- mutt-1.5.20/commands.c 2009-06-12 19:38:52.000000000 -0400 -+++ mutt-1.5.20-trash/commands.c 2009-07-23 09:44:40.000000000 -0400 -@@ -716,6 +716,7 @@ int _mutt_save_message (HEADER *h, CONTE - if (option (OPTDELETEUNTAG)) - mutt_set_flag (Context, h, M_TAG, 0); - } -+ mutt_set_flag (Context, h, M_APPENDED, 1); - - return 0; - } -diff -pruN -x'*.orig' mutt-1.5.20/curs_main.c mutt-1.5.20-trash/curs_main.c ---- mutt-1.5.20/curs_main.c 2009-06-13 22:48:36.000000000 -0400 -+++ mutt-1.5.20-trash/curs_main.c 2009-07-23 09:44:40.000000000 -0400 -@@ -1803,6 +1803,7 @@ int mutt_index_menu (void) - MAYBE_REDRAW (menu->redraw); - break; - -+ case OP_PURGE_MESSAGE: - case OP_DELETE: - - CHECK_MSGCOUNT; -@@ -1813,6 +1814,7 @@ int mutt_index_menu (void) - if (tag) - { - mutt_tag_set_flag (M_DELETE, 1); -+ mutt_tag_set_flag (M_PURGED, (op != OP_PURGE_MESSAGE) ? 0 : 1); - if (option (OPTDELETEUNTAG)) - mutt_tag_set_flag (M_TAG, 0); - menu->redraw = REDRAW_INDEX; -@@ -1820,6 +1822,8 @@ int mutt_index_menu (void) - else - { - mutt_set_flag (Context, CURHDR, M_DELETE, 1); -+ mutt_set_flag (Context, CURHDR, M_PURGED, -+ (op != OP_PURGE_MESSAGE) ? 0 : 1); - if (option (OPTDELETEUNTAG)) - mutt_set_flag (Context, CURHDR, M_TAG, 0); - if (option (OPTRESOLVE)) -@@ -2116,11 +2120,13 @@ int mutt_index_menu (void) - if (tag) - { - mutt_tag_set_flag (M_DELETE, 0); -+ mutt_tag_set_flag (M_PURGED, 0); - menu->redraw = REDRAW_INDEX; - } - else - { - mutt_set_flag (Context, CURHDR, M_DELETE, 0); -+ mutt_set_flag (Context, CURHDR, M_PURGED, 0); - if (option (OPTRESOLVE) && menu->current < Context->vcount - 1) - { - menu->current++; -@@ -2141,9 +2147,11 @@ int mutt_index_menu (void) - CHECK_ACL(M_ACL_DELETE, _("undelete message(s)")); - - rc = mutt_thread_set_flag (CURHDR, M_DELETE, 0, -- op == OP_UNDELETE_THREAD ? 0 : 1); -+ op == OP_UNDELETE_THREAD ? 0 : 1) -+ + mutt_thread_set_flag (CURHDR, M_PURGED, 0, -+ op == OP_UNDELETE_THREAD ? 0 : 1); - -- if (rc != -1) -+ if (rc > -1) - { - if (option (OPTRESOLVE)) - { -diff -pruN -x'*.orig' mutt-1.5.20/flags.c mutt-1.5.20-trash/flags.c ---- mutt-1.5.20/flags.c 2008-12-16 22:50:09.000000000 -0500 -+++ mutt-1.5.20-trash/flags.c 2009-07-23 09:44:40.000000000 -0400 -@@ -65,7 +65,13 @@ void _mutt_set_flag (CONTEXT *ctx, HEADE - { - h->deleted = 0; - update = 1; -- if (upd_ctx) ctx->deleted--; -+ if (upd_ctx) -+ { -+ ctx->deleted--; -+ if (h->appended) -+ ctx->appended--; -+ } -+ h->appended = 0; /* when undeleting, also reset the appended flag */ - #ifdef USE_IMAP - /* see my comment above */ - if (ctx->magic == M_IMAP) -@@ -87,6 +93,27 @@ void _mutt_set_flag (CONTEXT *ctx, HEADE - } - break; - -+ case M_APPENDED: -+ if (bf) -+ { -+ if (!h->appended) -+ { -+ h->appended = 1; -+ if (upd_ctx) ctx->appended++; -+ } -+ } -+ break; -+ -+ case M_PURGED: -+ if (bf) -+ { -+ if (!h->purged) -+ h->purged = 1; -+ } -+ else if (h->purged) -+ h->purged = 0; -+ break; -+ - case M_NEW: - - if (!mutt_bit_isset(ctx->rights,M_ACL_SEEN)) -diff -pruN -x'*.orig' mutt-1.5.20/functions.h mutt-1.5.20-trash/functions.h ---- mutt-1.5.20/functions.h 2009-04-30 01:36:17.000000000 -0400 -+++ mutt-1.5.20-trash/functions.h 2009-07-23 09:44:40.000000000 -0400 -@@ -120,6 +120,7 @@ struct binding_t OpMain[] = { /* map: in - { "toggle-write", OP_TOGGLE_WRITE, "%" }, - { "next-thread", OP_MAIN_NEXT_THREAD, "\016" }, - { "next-subthread", OP_MAIN_NEXT_SUBTHREAD, "\033n" }, -+ { "purge-message", OP_PURGE_MESSAGE, NULL }, - { "query", OP_QUERY, "Q" }, - { "quit", OP_QUIT, "q" }, - { "reply", OP_REPLY, "r" }, -@@ -209,6 +210,7 @@ struct binding_t OpPager[] = { /* map: p - { "print-message", OP_PRINT, "p" }, - { "previous-thread", OP_MAIN_PREV_THREAD, "\020" }, - { "previous-subthread",OP_MAIN_PREV_SUBTHREAD, "\033p" }, -+ { "purge-message", OP_PURGE_MESSAGE, NULL }, - { "quit", OP_QUIT, "Q" }, - { "exit", OP_EXIT, "q" }, - { "reply", OP_REPLY, "r" }, -diff -pruN -x'*.orig' mutt-1.5.20/globals.h mutt-1.5.20-trash/globals.h ---- mutt-1.5.20/globals.h 2009-06-03 16:48:31.000000000 -0400 -+++ mutt-1.5.20-trash/globals.h 2009-07-23 09:44:40.000000000 -0400 -@@ -139,6 +139,7 @@ WHERE char *StChars; - WHERE char *Status; - WHERE char *Tempdir; - WHERE char *Tochars; -+WHERE char *TrashPath; - WHERE char *Username; - WHERE char *Visual; - -diff -pruN -x'*.orig' mutt-1.5.20/imap/message.c mutt-1.5.20-trash/imap/message.c ---- mutt-1.5.20/imap/message.c 2009-06-07 13:52:57.000000000 -0400 -+++ mutt-1.5.20-trash/imap/message.c 2009-07-23 09:44:40.000000000 -0400 -@@ -867,6 +867,7 @@ int imap_copy_messages (CONTEXT* ctx, HE - if (ctx->hdrs[n]->tagged) - { - mutt_set_flag (ctx, ctx->hdrs[n], M_DELETE, 1); -+ mutt_set_flag (ctx, ctx->hdrs[n], M_APPENDED, 1); - if (option (OPTDELETEUNTAG)) - mutt_set_flag (ctx, ctx->hdrs[n], M_TAG, 0); - } -@@ -874,6 +875,7 @@ int imap_copy_messages (CONTEXT* ctx, HE - else - { - mutt_set_flag (ctx, h, M_DELETE, 1); -+ mutt_set_flag (ctx, h, M_APPENDED, 1); - if (option (OPTDELETEUNTAG)) - mutt_set_flag (ctx, h, M_TAG, 0); - } -diff -pruN -x'*.orig' mutt-1.5.20/init.h mutt-1.5.20-trash/init.h ---- mutt-1.5.20/init.h 2009-06-13 17:35:21.000000000 -0400 -+++ mutt-1.5.20-trash/init.h 2009-07-23 09:44:40.000000000 -0400 -@@ -3180,6 +3180,16 @@ struct option_t MuttVars[] = { - ** by \fIyou\fP. The sixth character is used to indicate when a mail - ** was sent to a mailing-list you subscribe to. - */ -+ { "trash", DT_PATH, R_NONE, UL &TrashPath, 0 }, -+ /* -+ ** .pp -+ ** If set, this variable specifies the path of the trash folder where the -+ ** mails marked for deletion will be moved, instead of being irremediably -+ ** purged. -+ ** .pp -+ ** NOTE: When you delete a message in the trash folder, it is really -+ ** deleted, so that you have a way to clean the trash. -+ */ - #ifdef USE_SOCKET - { "tunnel", DT_STR, R_NONE, UL &Tunnel, UL 0 }, - /* -diff -pruN -x'*.orig' mutt-1.5.20/mutt.h mutt-1.5.20-trash/mutt.h ---- mutt-1.5.20/mutt.h 2009-06-12 18:15:42.000000000 -0400 -+++ mutt-1.5.20-trash/mutt.h 2009-07-23 09:44:40.000000000 -0400 -@@ -187,6 +187,8 @@ enum - M_DELETE, - M_UNDELETE, - M_DELETED, -+ M_APPENDED, -+ M_PURGED, - M_FLAG, - M_TAG, - M_UNTAG, -@@ -701,6 +703,8 @@ typedef struct header - unsigned int mime : 1; /* has a MIME-Version header? */ - unsigned int flagged : 1; /* marked important? */ - unsigned int tagged : 1; -+ unsigned int appended : 1; /* has been saved */ -+ unsigned int purged : 1; /* bypassing the trash folder */ - unsigned int deleted : 1; - unsigned int changed : 1; - unsigned int attach_del : 1; /* has an attachment marked for deletion */ -@@ -873,6 +877,7 @@ typedef struct _context - int new; /* how many new messages? */ - int unread; /* how many unread messages? */ - int deleted; /* how many deleted messages */ -+ int appended; /* how many saved messages? */ - int flagged; /* how many flagged messages */ - int msgnotreadyet; /* which msg "new" in pager, -1 if none */ - -diff -pruN -x'*.orig' mutt-1.5.20/muttlib.c mutt-1.5.20-trash/muttlib.c ---- mutt-1.5.20/muttlib.c 2009-05-18 20:11:35.000000000 -0400 -+++ mutt-1.5.20-trash/muttlib.c 2009-07-23 09:44:40.000000000 -0400 -@@ -1460,7 +1460,9 @@ int mutt_save_confirm (const char *s, st - - if (magic > 0 && !mx_access (s, W_OK)) - { -- if (option (OPTCONFIRMAPPEND)) -+ if (option (OPTCONFIRMAPPEND) && -+ (!TrashPath || (mutt_strcmp (s, TrashPath) != 0))) -+ /* if we're appending to the trash, there's no point in asking */ - { - snprintf (tmp, sizeof (tmp), _("Append messages to %s?"), s); - if ((rc = mutt_yesorno (tmp, M_YES)) == M_NO) -diff -pruN -x'*.orig' mutt-1.5.20/mx.c mutt-1.5.20-trash/mx.c ---- mutt-1.5.20/mx.c 2009-06-11 00:29:41.000000000 -0400 -+++ mutt-1.5.20-trash/mx.c 2009-07-23 09:44:40.000000000 -0400 -@@ -773,6 +773,54 @@ static int sync_mailbox (CONTEXT *ctx, i - return rc; - } - -+/* move deleted mails to the trash folder */ -+static int trash_append (CONTEXT *ctx) -+{ -+ CONTEXT *ctx_trash; -+ int i = 0; -+ struct stat st, stc; -+ -+ if (!TrashPath || !ctx->deleted || -+ (ctx->magic == M_MAILDIR && option (OPTMAILDIRTRASH))) -+ return 0; -+ -+ for (;i < ctx->msgcount && (!ctx->hdrs[i]->deleted || -+ ctx->hdrs[i]->appended); i++); -+ if (i == ctx->msgcount) -+ return 0; /* nothing to be done */ -+ -+ if (mutt_save_confirm (TrashPath, &st) != 0) -+ { -+ mutt_error _("message(s) not deleted"); -+ return -1; -+ } -+ -+ if (lstat (ctx->path, &stc) == 0 && stc.st_ino == st.st_ino -+ && stc.st_dev == st.st_dev && stc.st_rdev == st.st_rdev) -+ return 0; /* we are in the trash folder: simple sync */ -+ -+ if ((ctx_trash = mx_open_mailbox (TrashPath, M_APPEND, NULL)) != NULL) -+ { -+ for (i = 0 ; i < ctx->msgcount ; i++) -+ if (ctx->hdrs[i]->deleted && !ctx->hdrs[i]->appended -+ && !ctx->hdrs[i]->purged -+ && mutt_append_message (ctx_trash, ctx, ctx->hdrs[i], 0, 0) == -1) -+ { -+ mx_close_mailbox (ctx_trash, NULL); -+ return -1; -+ } -+ -+ mx_close_mailbox (ctx_trash, NULL); -+ } -+ else -+ { -+ mutt_error _("Can't open trash folder"); -+ return -1; -+ } -+ -+ return 0; -+} -+ - /* save changes and close mailbox */ - int mx_close_mailbox (CONTEXT *ctx, int *index_hint) - { -@@ -909,6 +957,7 @@ int mx_close_mailbox (CONTEXT *ctx, int - if (mutt_append_message (&f, ctx, ctx->hdrs[i], 0, CH_UPDATE_LEN) == 0) - { - mutt_set_flag (ctx, ctx->hdrs[i], M_DELETE, 1); -+ mutt_set_flag (ctx, ctx->hdrs[i], M_APPENDED, 1); - } - else - { -@@ -931,6 +980,14 @@ int mx_close_mailbox (CONTEXT *ctx, int - return 0; - } - -+ /* copy mails to the trash before expunging */ -+ if (purge && ctx->deleted) -+ if (trash_append (ctx) != 0) -+ { -+ ctx->closing = 0; -+ return -1; -+ } -+ - #ifdef USE_IMAP - /* allow IMAP to preserve the deleted flag across sessions */ - if (ctx->magic == M_IMAP) -@@ -1130,6 +1187,12 @@ int mx_sync_mailbox (CONTEXT *ctx, int * - msgcount = ctx->msgcount; - deleted = ctx->deleted; - -+ if (purge && ctx->deleted) -+ { -+ if (trash_append (ctx) == -1) -+ return -1; -+ } -+ - #ifdef USE_IMAP - if (ctx->magic == M_IMAP) - rc = imap_sync_mailbox (ctx, purge, index_hint); -diff -pruN -x'*.orig' mutt-1.5.20/pager.c mutt-1.5.20-trash/pager.c ---- mutt-1.5.20/pager.c 2009-06-03 16:48:31.000000000 -0400 -+++ mutt-1.5.20-trash/pager.c 2009-07-23 09:44:40.000000000 -0400 -@@ -2309,12 +2309,15 @@ search_next: - MAYBE_REDRAW (redraw); - break; - -+ case OP_PURGE_MESSAGE: - case OP_DELETE: - CHECK_MODE(IsHeader (extra)); - CHECK_READONLY; - CHECK_ACL(M_ACL_DELETE, _("delete message")); - - mutt_set_flag (Context, extra->hdr, M_DELETE, 1); -+ mutt_set_flag (Context, extra->hdr, M_PURGED, -+ ch != OP_PURGE_MESSAGE ? 0 : 1); - if (option (OPTDELETEUNTAG)) - mutt_set_flag (Context, extra->hdr, M_TAG, 0); - redraw = REDRAW_STATUS | REDRAW_INDEX; -@@ -2641,6 +2644,7 @@ search_next: - CHECK_ACL(M_ACL_DELETE, _("undelete message")); - - mutt_set_flag (Context, extra->hdr, M_DELETE, 0); -+ mutt_set_flag (Context, extra->hdr, M_PURGED, 0); - redraw = REDRAW_STATUS | REDRAW_INDEX; - if (option (OPTRESOLVE)) - { -@@ -2656,9 +2660,11 @@ search_next: - CHECK_ACL(M_ACL_DELETE, _("undelete message(s)")); - - r = mutt_thread_set_flag (extra->hdr, M_DELETE, 0, -+ ch == OP_UNDELETE_THREAD ? 0 : 1) -+ + mutt_thread_set_flag (extra->hdr, M_PURGED, 0, - ch == OP_UNDELETE_THREAD ? 0 : 1); - -- if (r != -1) -+ if (r > -1) - { - if (option (OPTRESOLVE)) - { -diff -pruN -x'*.orig' mutt-1.5.20/pattern.c mutt-1.5.20-trash/pattern.c ---- mutt-1.5.20/pattern.c 2009-06-03 16:48:31.000000000 -0400 -+++ mutt-1.5.20-trash/pattern.c 2009-07-23 09:44:40.000000000 -0400 -@@ -1347,8 +1347,10 @@ int mutt_pattern_func (int op, char *pro - { - switch (op) - { -- case M_DELETE: - case M_UNDELETE: -+ mutt_set_flag (Context, Context->hdrs[Context->v2r[i]], M_PURGED, -+ 0); -+ case M_DELETE: - mutt_set_flag (Context, Context->hdrs[Context->v2r[i]], M_DELETE, - (op == M_DELETE)); - break; -diff -pruN -x'*.orig' mutt-1.5.20/postpone.c mutt-1.5.20-trash/postpone.c ---- mutt-1.5.20/postpone.c 2009-06-13 17:28:37.000000000 -0400 -+++ mutt-1.5.20-trash/postpone.c 2009-07-23 09:44:40.000000000 -0400 -@@ -276,6 +276,9 @@ int mutt_get_postponed (CONTEXT *ctx, HE - /* finished with this message, so delete it. */ - mutt_set_flag (PostContext, h, M_DELETE, 1); - -+ /* and consider it saved, so that it won't be moved to the trash folder */ -+ mutt_set_flag (PostContext, h, M_APPENDED, 1); -+ - /* update the count for the status display */ - PostCount = PostContext->msgcount - PostContext->deleted; - diff --git a/mail/mutt-devel/files/patch-02 b/mail/mutt-devel/files/patch-02 deleted file mode 100644 index 91fa4a18c641..000000000000 --- a/mail/mutt-devel/files/patch-02 +++ /dev/null @@ -1,32 +0,0 @@ ---- doc/Makefile.am.orig 2010-09-17 16:04:58.000000000 +0200 -+++ doc/Makefile.am 2010-09-17 16:09:09.000000000 +0200 -@@ -47,7 +47,7 @@ - - all: makedoc-all - --makedoc-all: mutt.1 smime_keys.1 muttrc.man manual.html stamp-doc-rc stamp-doc-chunked manual.txt -+makedoc-all: mutt.1 smime_keys.1 muttrc.man - - install-data-local: makedoc-all instdoc - $(top_srcdir)/mkinstalldirs $(DESTDIR)$(mandir)/man1 -@@ -70,9 +70,6 @@ - $(INSTALL) -m 644 $(srcdir)/$$f $(DESTDIR)$(docdir) ; \ - done - -$(INSTALL) -m 644 manual.txt $(DESTDIR)$(docdir) -- -for f in $(HTML_DOCFILES) ; do \ -- $(INSTALL) -m 644 $$f $(DESTDIR)$(docdir) ; \ -- done - $(INSTALL) -m 644 Muttrc $(DESTDIR)$(sysconfdir)/Muttrc.dist - -if [ -f $(DESTDIR)$(pkgdatadir)/Muttrc ] ; then \ - mv $(DESTDIR)$(pkgdatadir)/Muttrc* $(DESTDIR)$(sysconfdir) ; \ -@@ -103,9 +100,7 @@ - - check: - manual.txt: manual.html -- -LC_ALL=C lynx -dump -nolist -with_backspaces -display_charset=us-ascii manual.html > $@ || \ -- LC_ALL=C w3m -dump manual.html > $@ || \ -- LC_ALL=C elinks -dump -no-numbering -no-references manual.html | sed -e 's,\\001, ,g' > $@ -+ -LC_ALL=C lynx -dump -nolist -with_backspaces -display_charset=us-ascii manual.html > $@ - - Muttrc: stamp-doc-rc - diff --git a/mail/mutt-devel/files/patch-05 b/mail/mutt-devel/files/patch-05 deleted file mode 100644 index bfbb5aa3ab9b..000000000000 --- a/mail/mutt-devel/files/patch-05 +++ /dev/null @@ -1,43 +0,0 @@ ---- curs_lib.c.old Wed Sep 1 19:39:20 1999 -+++ curs_lib.c Sun Sep 26 23:47:03 1999 -@@ -156,6 +156,16 @@ - def = 0; - break; - } -+ else if (tolower(ch.ch) == 'y') -+ { -+ def = 1; -+ break; -+ } -+ else if (tolower(ch.ch) == 'n') -+ { -+ def = 0; -+ break; -+ } - else - { - BEEP(); -@@ -413,8 +423,9 @@ - { - event_t ch; - int choice; -- char *p; -+ char *p, *nletters; - -+ nletters = _(letters); - mvaddstr (LINES - 1, 0, prompt); - clrtoeol (); - FOREVER -@@ -428,6 +439,12 @@ - } - else - { -+ p = strchr (nletters, ch.ch); -+ if (p) -+ { -+ choice = p - nletters + 1; -+ break; -+ } - p = strchr (letters, ch.ch); - if (p) - { diff --git a/mail/mutt-devel/files/patch-08 b/mail/mutt-devel/files/patch-08 deleted file mode 100644 index 69d353f64b40..000000000000 --- a/mail/mutt-devel/files/patch-08 +++ /dev/null @@ -1,10 +0,0 @@ ---- doc/Muttrc.orig Sat May 13 08:30:44 2000 -+++ doc/Muttrc Sat May 13 08:32:05 2000 -@@ -629,6 +629,7 @@ - # Type: boolean - # Default: yes - # -+set followup_to=no - # - # Controls whether or not the Mail-Followup-To header field is - # generated when sending mail. When set, Mutt will generate this diff --git a/mail/mutt-devel/files/patch-Makefile.am b/mail/mutt-devel/files/patch-Makefile.am deleted file mode 100644 index ac0403811365..000000000000 --- a/mail/mutt-devel/files/patch-Makefile.am +++ /dev/null @@ -1,13 +0,0 @@ ---- Makefile.am.orig 2008-05-19 19:00:44.000000000 +0200 -+++ Makefile.am 2008-05-19 19:03:20.000000000 +0200 -@@ -136,10 +136,6 @@ - - install-data-local: - $(srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir) -- $(INSTALL) -m 644 $(srcdir)/mime.types $(DESTDIR)$(sysconfdir)/mime.types.dist -- -if [ ! -f $(DESTDIR)$(sysconfdir)/mime.types ]; then \ -- $(INSTALL) -m 644 $(srcdir)/mime.types $(DESTDIR)$(sysconfdir); \ -- fi - - uninstall-local: - for i in mime.types ; do \ diff --git a/mail/mutt-devel/files/patch-Makefile.am.doc b/mail/mutt-devel/files/patch-Makefile.am.doc deleted file mode 100644 index 5c5854250df1..000000000000 --- a/mail/mutt-devel/files/patch-Makefile.am.doc +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile.am.orig2 Mon Feb 7 10:20:52 2005 -+++ Makefile.am Mon Feb 7 10:29:41 2005 -@@ -10,7 +10,7 @@ - IMAP_INCLUDES = -I$(top_srcdir)/imap - endif - --SUBDIRS = m4 po intl doc contrib $(IMAP_SUBDIR) -+SUBDIRS = m4 po intl contrib $(IMAP_SUBDIR) . doc - - bin_SCRIPTS = muttbug flea @SMIMEAUX_TARGET@ - diff --git a/mail/mutt-devel/files/patch-bdb b/mail/mutt-devel/files/patch-bdb deleted file mode 100644 index f4a7d1d7ae62..000000000000 --- a/mail/mutt-devel/files/patch-bdb +++ /dev/null @@ -1,11 +0,0 @@ ---- configure.ac.orig 2009-06-09 08:50:33.000000000 +0200 -+++ configure.ac 2010-01-27 18:15:31.000000000 +0100 -@@ -976,7 +976,7 @@ - bdbpfx="$bdbpfx $d/$v" - done - done -- BDB_VERSIONS="db-4 db4 db-4.6 db4.6 db46 db-4.5 db4.5 db45 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db ''" -+ BDB_VERSIONS="db-4 db4 db-5 db5 db-5.2 db5.2 db52 db-5.1 db5.1 db51 db-5.0 db5.0 db50 db-4.8 db4.8 db48 db-4.7 db4.7 db47 db-4.6 db4.6 db46 db-4.5 db4.5 db45 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db ''" - AC_MSG_CHECKING([for BerkeleyDB > 4.0]) - for d in $bdbpfx; do - BDB_INCLUDE_DIR="" diff --git a/mail/mutt-devel/files/patch-color-eol b/mail/mutt-devel/files/patch-color-eol deleted file mode 100644 index 686be16b3bcb..000000000000 --- a/mail/mutt-devel/files/patch-color-eol +++ /dev/null @@ -1,62 +0,0 @@ ---- mutt.h.orig Fri Jun 4 13:35:59 2004 -+++ mutt.h Fri Jun 4 13:49:26 2004 -@@ -350,6 +350,7 @@ - OPTBEEPNEW, - OPTBOUNCEDELIVERED, - OPTCHECKNEW, -+ OPTCOLORAFTEREOL, - OPTCOLLAPSEUNREAD, - OPTCONFIRMAPPEND, - OPTCONFIRMCREATE, ---- init.h.orig Fri Jun 4 13:35:56 2004 -+++ init.h Fri Jun 4 13:45:43 2004 -@@ -315,6 +315,12 @@ - ** \fIcheck_new\fP is \fIunset\fP, no check for new mail is performed - ** while the mailbox is open. - */ -+ { "color_after_eol", DT_BOOL, R_NONE, OPTCOLORAFTEREOL, 1 }, -+ /* -+ ** .pp -+ ** When \fIset\fP, Mutt will color a line after the last character extending -+ ** to the end of the window. -+ */ - { "collapse_unread", DT_BOOL, R_NONE, OPTCOLLAPSEUNREAD, 1 }, - /* - ** .pp ---- pager.c.orig Sat Jun 5 09:13:33 2004 -+++ pager.c Sat Jun 5 09:12:31 2004 -@@ -1392,7 +1392,7 @@ - * ncurses does an implicit clrtoeol() when you do addch('\n') so we have - * to make sure to reset the color *after* that - */ -- if (flags & M_SHOWCOLOR) -+ if (option (OPTCOLORAFTEREOL) && (flags & M_SHOWCOLOR)) - { - m = ((*lineInfo)[n].continuation) ? ((*lineInfo)[n].syntax)[0].first : n; - if ((*lineInfo)[m].type == MT_COLOR_HEADER) -@@ -1406,6 +1406,16 @@ - #endif - } - -+ /* -+ * reset the color back to normal. This *must* come before the -+ * addch('\n') for the color not to be filled to the right margin. -+ */ -+ if (!option (OPTCOLORAFTEREOL) && (flags & M_SHOWCOLOR)) -+ { -+ SETCOLOR(MT_COLOR_NORMAL); -+ BKGDSET(MT_COLOR_NORMAL); -+ } -+ - /* ncurses always wraps lines when you get to the right side of the - * screen, but S-Lang seems to only wrap if the next character is *not* - * a newline (grr!). -@@ -1420,7 +1430,7 @@ - * addch('\n'), otherwise the color for this line will not be - * filled to the right margin. - */ -- if (flags & M_SHOWCOLOR) -+ if (option (OPTCOLORAFTEREOL) && (flags & M_SHOWCOLOR)) - { - SETCOLOR(MT_COLOR_NORMAL); - BKGDSET(MT_COLOR_NORMAL); diff --git a/mail/mutt-devel/files/patch-configure.ac b/mail/mutt-devel/files/patch-configure.ac deleted file mode 100644 index 993e53daf38d..000000000000 --- a/mail/mutt-devel/files/patch-configure.ac +++ /dev/null @@ -1,9 +0,0 @@ ---- configure.ac.orig 2010-08-24 09:34:21.000000000 -0700 -+++ configure.ac 2012-05-03 18:14:34.000000000 -0700 -@@ -29,6 +29,2 @@ - AC_ISC_POSIX --AM_C_PROTOTYPES --if test "x$U" != "x"; then -- AC_MSG_ERROR(Compiler not ANSI compliant) --fi - AC_PROG_CPP diff --git a/mail/mutt-devel/files/patch-contrib-Makefile.am b/mail/mutt-devel/files/patch-contrib-Makefile.am deleted file mode 100644 index 2328b65e1b37..000000000000 --- a/mail/mutt-devel/files/patch-contrib-Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ ---- contrib/Makefile.am.orig Tue Jul 18 20:04:14 2006 -+++ contrib/Makefile.am Wed Aug 30 16:15:04 2006 -@@ -2,7 +2,7 @@ - - subdir = contrib - --SAMPLES = Mush.rc Pine.rc gpg.rc pgp2.rc pgp5.rc pgp6.rc Tin.rc \ -+SAMPLES = Mush.rc Pine.rc gpg.rc pgp2.rc pgp6.rc Tin.rc \ - sample.muttrc sample.mailcap sample.muttrc-tlr \ - colors.default colors.linux smime.rc \ - ca-bundle.crt smime_keys_test.pl diff --git a/mail/mutt-devel/files/patch-crypt-gpgme.c b/mail/mutt-devel/files/patch-crypt-gpgme.c deleted file mode 100644 index 2fb9536f3cd6..000000000000 --- a/mail/mutt-devel/files/patch-crypt-gpgme.c +++ /dev/null @@ -1,10 +0,0 @@ ---- ./crypt-gpgme.c.orig 2009-07-01 21:28:51.000000000 -0400 -+++ ./crypt-gpgme.c 2009-07-01 21:31:52.000000000 -0400 -@@ -342,6 +342,7 @@ - gpgme_error_t err; - gpgme_ctx_t ctx; - -+ gpgme_check_version (NULL); - if (!GpgmeLocaleSet) - { - gpgme_set_locale (NULL, LC_CTYPE, setlocale (LC_CTYPE, NULL)); diff --git a/mail/mutt-devel/files/patch-date-conditional b/mail/mutt-devel/files/patch-date-conditional deleted file mode 100644 index 7912815f0bce..000000000000 --- a/mail/mutt-devel/files/patch-date-conditional +++ /dev/null @@ -1,147 +0,0 @@ ---- PATCHES~ never -+++ PATCHES Thu Jun 13 16:25:05 CDT 2002 -@@ -0,0 +1 @@ -+dgc.deepif.1 -diff -Pur mutt-1.5.1-base/muttlib.c mutt-1.5.1/muttlib.c ---- muttlib.c Tue Mar 26 16:47:06 2002 -+++ muttlib.c Thu Jun 13 15:28:20 2002 -@@ -978,6 +978,12 @@ - count = 0; - while (count < sizeof (ifstring) && *src && *src != '?' && *src != '&') - { -+ if (*src == '\\') -+ { -+ src++; -+ if (!*src) -+ break; -+ } - *cp++ = *src++; - count++; - } -@@ -990,7 +996,13 @@ - count = 0; - while (count < sizeof (elsestring) && *src && *src != '?') - { -- *cp++ = *src++; -+ if (*src == '\\') -+ { -+ src++; -+ if (!*src) -+ break; -+ } -+ *cp++ = *src++; - count++; - } - *cp = 0; -Index: PATCHES -=================================================================== ---- PATCHES (revision 22) -+++ PATCHES (revision 22) -@@ -0,0 +1 @@ -+patch-1.5.0.ats.date_conditional.1 -Index: muttlib.c -=================================================================== ---- muttlib.c (revision 22) -+++ muttlib.c (revision 22) -@@ -944,7 +944,16 @@ - if (*src == '?') - { - flags |= M_FORMAT_OPTIONAL; -- src++; -+ ch = *(++src); /* save the character to switch on */ -+ cp = prefix; -+ ++src; -+ count = 0; -+ while (count < sizeof (prefix) && *src != '?') -+ { -+ *cp++ = *src++; -+ count++; -+ } -+ *cp = 0; - } - else - { -@@ -960,12 +969,12 @@ - count++; - } - *cp = 0; -- } - -- if (!*src) -- break; /* bad format */ -+ if (!*src) -+ break; /* bad format */ - -- ch = *src++; /* save the character to switch on */ -+ ch = *src++; /* save the character to switch on */ -+ } - - if (flags & M_FORMAT_OPTIONAL) - { ---- hdrline.c.orig Tue Jun 29 15:01:28 2004 -+++ hdrline.c Tue Jun 29 15:02:59 2004 -@@ -316,6 +316,64 @@ - const char *cp; - struct tm *tm; - time_t T; -+ int i = 0, invert = 0; -+ -+ if (optional && (op == '[' || op == '(')) { -+ char *is; -+ int d; -+ T = time(NULL); -+ tm = localtime(&T); -+ d = (T + tm->tm_gmtoff) % 86400; -+ T -= (op == '(') ? hdr->received : hdr->date_sent; -+ -+ is = (char *)prefix; -+ if( *is == '>' ) { -+ invert = 1; -+ ++is; -+ } -+ -+ while( *is && *is != '?' ) { -+ int t = strtol (is, &is, 10); -+ switch (*(is++)) { -+ case '?': -+ break; -+ case 'y': -+ t *= 365 * 24 * 60 * 60; -+ break; -+ case 'M': -+ t *= 30 * 24 * 60 * 60; -+ break; -+ case 'w': -+ t *= 7 * 24 * 60 * 60; -+ break; -+ case 'd': -+ t *= 24 * 60 * 60; -+ break; -+ case 't': -+ if (t > 1) { -+ t = (t-1) * 24 * 60 * 60; -+ } else { -+ t = 0; -+ } -+ t += d; -+ break; -+ case 'h': -+ t *= 60 * 60; -+ break; -+ case 'm': -+ t *= 60; -+ break; -+ } -+ i += t; -+ } -+ -+ if (i < 0) -+ i *= -1; -+ -+ if( (T > i || T < -1*i) ^ invert ) -+ optional = 0; -+ break; -+ } - - p = dest; - diff --git a/mail/mutt-devel/files/patch-doc-manual.xml.head b/mail/mutt-devel/files/patch-doc-manual.xml.head deleted file mode 100644 index 82ab62c1cbe8..000000000000 --- a/mail/mutt-devel/files/patch-doc-manual.xml.head +++ /dev/null @@ -1,10 +0,0 @@ ---- doc/manual.xml.head.orig 2009-06-22 08:35:06.000000000 +0200 -+++ doc/manual.xml.head 2009-06-22 08:37:31.000000000 +0200 -@@ -1,6 +1,6 @@ - <?xml version="1.0" standalone="no"?> - <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" -- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> -+ "/usr/local/share/xml/docbook/4.2/docbookx.dtd"> - <book> - - <bookinfo> diff --git a/mail/mutt-devel/files/patch-examples b/mail/mutt-devel/files/patch-examples deleted file mode 100644 index a2c8815720db..000000000000 --- a/mail/mutt-devel/files/patch-examples +++ /dev/null @@ -1,109 +0,0 @@ ---- contrib/Makefile.am.orig Tue Jul 18 20:04:14 2006 -+++ contrib/Makefile.am Wed Aug 30 16:05:33 2006 -@@ -1,6 +1,7 @@ - # $Id: Makefile.am,v 3.1 2006/07/18 18:04:14 brendan Exp $ - - subdir = contrib -+samplesdir = @samplesdir@ - - SAMPLES = Mush.rc Pine.rc gpg.rc pgp2.rc pgp5.rc pgp6.rc Tin.rc \ - sample.muttrc sample.mailcap sample.muttrc-tlr \ -@@ -14,12 +15,12 @@ - iconv/make.sh - - install-data-local: -- $(top_srcdir)/mkinstalldirs $(DESTDIR)$(docdir)/samples $(DESTDIR)$(docdir)/samples/iconv -+ $(top_srcdir)/mkinstalldirs $(DESTDIR)$(samplesdir) $(DESTDIR)$(samplesdir)/iconv - for f in $(SAMPLES) ; do \ -- $(INSTALL) -m 644 $(srcdir)/$$f $(DESTDIR)$(docdir)/samples ; \ -+ $(INSTALL) -m 644 $(srcdir)/$$f $(DESTDIR)$(samplesdir) ; \ - done - for f in $(srcdir)/iconv/*.rc ; do \ -- $(INSTALL) -m 644 $$f $(DESTDIR)$(docdir)/samples/iconv ; \ -+ $(INSTALL) -m 644 $$f $(DESTDIR)$(samplesdir)/iconv ; \ - done - - uninstall-local: ---- init.h.orig 2009-02-06 13:27:52.000000000 +0100 -+++ init.h 2009-02-06 13:34:09.000000000 +0100 -@@ -1808,9 +1808,8 @@ - ** .pp - ** For examples on how to configure these formats for the various versions - ** of PGP which are floating around, see the pgp and gpg sample configuration files in -- ** the \fCsamples/\fP subdirectory which has been installed on your system -- ** alongside the documentation. -- ** (PGP only) -+ ** the \fCshare/examples/mutt/\fP subdirectory which has been installed on -+ ** your system. (PGP only) - */ - { "pgp_getkeys_command", DT_STR, R_NONE, UL &PgpGetkeysCommand, 0}, - /* -@@ -2017,9 +2016,8 @@ - ** .de - ** .pp - ** For examples on how to configure these formats, see the \fCsmime.rc\fP in -- ** the \fCsamples/\fP subdirectory which has been installed on your system -- ** alongside the documentation. -- ** (S/MIME only) -+ ** the \fCshare/examples/mutt/\fP subdirectory which has been installed on -+ ** your system. (S/MIME only) - */ - { "smime_verify_command", DT_STR, R_NONE, UL &SmimeVerifyCommand, 0}, - /* ---- INSTALL.orig Mon Nov 25 15:16:46 2002 -+++ INSTALL Wed Mar 26 15:59:57 2003 -@@ -225,13 +225,13 @@ - need to tell mutt about implementation-defined names for some - character sets. Sample configuration files for various systems can - be found in the directory contrib/iconv/ in this source --distribution, and will be installed in the samples/iconv directory -+distribution, and will be installed in the share/examples/mutt/iconv directory - as part of mutt's documentation. - - In order to use these sample configuration files, just put a line - like - -- source /usr/local/doc/mutt/samples/iconv/iconv.osf1-4.0d.rc -+ source /usr/local/share/examples/mutt/iconv/iconv.osf1-4.0d.rc - - into your system's global Muttrc, which normally resides in /etc or - /usr/local/etc. ---- doc/manual.txt.orig 2009-06-14 20:54:56.000000000 +0200 -+++ doc/manual.txt 2009-06-22 15:11:26.000000000 +0200 -@@ -3225,9 +3225,9 @@ - shows that arguments can be quoted: the script will receive the expanded string - between the single quotes as the only argument. - --A practical example is the mutt_xtitle script installed in the samples --subdirectory of the Mutt documentation: it can be used as filter for --$status_format to set the current terminal's title, if supported. -+A practical example is the mutt_xtitle script installed in the -+share/examples/mutt/ subdirectory of the Mutt documentation: it can be used as -+filter for $status_format to set the current terminal's title, if supported. - - 29.4. Padding - -@@ -7740,8 +7740,8 @@ - - For examples on how to configure these formats for the various versions of PGP - which are floating around, see the pgp and gpg sample configuration files in --the samples/ subdirectory which has been installed on your system alongside the --documentation. (PGP only) -+the share/examples/mutt/ subdirectory which has been installed on your system. -+(PGP only) - - 3.158. pgp_decrypt_command - -@@ -8751,9 +8751,9 @@ - | |$smime_ca_location?. | - +-----------------------------------------------------------------------------+ - --For examples on how to configure these formats, see the smime.rc in the samples --/ subdirectory which has been installed on your system alongside the --documentation. (S/MIME only) -+For examples on how to configure these formats, see the smime.rc in the -+share/examples/mutt/ subdirectory which has been installed on your system. -+(S/MIME only) - - 3.244. smime_decrypt_use_default_key - diff --git a/mail/mutt-devel/files/patch-gnutls-CN-validation b/mail/mutt-devel/files/patch-gnutls-CN-validation deleted file mode 100644 index e19608b86571..000000000000 --- a/mail/mutt-devel/files/patch-gnutls-CN-validation +++ /dev/null @@ -1,29 +0,0 @@ ---- mutt_ssl_gnutls.c.orig -+++ mutt_ssl_gnutls.c -@@ -999,6 +999,7 @@ - unsigned int cert_list_size = 0; - gnutls_certificate_status certstat; - int certerr, i, preauthrc, savedcert, rc = 0; -+ int rcpeer; - - if (gnutls_auth_get_type (state) != GNUTLS_CRD_CERTIFICATE) - { -@@ -1024,6 +1025,9 @@ - for (i = 0; i < cert_list_size; i++) { - rc = tls_check_preauth(&cert_list[i], certstat, conn->account.host, i, - &certerr, &savedcert); -+ if (i == 0) -+ rcpeer = rc; -+ - preauthrc += rc; - - if (savedcert) -@@ -1049,7 +1053,7 @@ - dprint (1, (debugfile, "error trusting certificate %d: %d\n", i, rc)); - - certstat = tls_verify_peers (state); -- if (!certstat) -+ if (!certstat && !rcpeer) - return 1; - } - } diff --git a/mail/mutt-devel/files/patch-imap-message.c b/mail/mutt-devel/files/patch-imap-message.c deleted file mode 100644 index 7db99b5da207..000000000000 --- a/mail/mutt-devel/files/patch-imap-message.c +++ /dev/null @@ -1,15 +0,0 @@ -This patch fixes a segfault that happens when the IMAP server sends some -additional flags for the same message ID, see upstream bug -http://bugs.mutt.org/3288 - ---- imap/message.c -+++ imap/message.c -@@ -288,7 +288,7 @@ - continue; - } - /* May receive FLAGS updates in a separate untagged response (#2935) */ -- if (idx < ctx->msgcount) -+ if (ctx->hdrs[idx] != NULL) - { - dprint (2, (debugfile, "imap_read_headers: message %d is not new\n", - h.sid)); diff --git a/mail/mutt-devel/files/patch-init.c b/mail/mutt-devel/files/patch-init.c deleted file mode 100644 index 389b682cfa11..000000000000 --- a/mail/mutt-devel/files/patch-init.c +++ /dev/null @@ -1,39 +0,0 @@ ---- init.c.orig Wed Jul 24 10:41:29 2002 -+++ init.c Sat May 3 08:46:29 2003 -@@ -1707,7 +1707,11 @@ - void mutt_init (int skip_sys_rc, LIST *commands) - { - struct passwd *pw; -+#if __FreeBSD_version < 500000 -+ char nodename[STRING]; -+#else - struct utsname utsname; -+#endif - char *p, buffer[STRING], error[STRING]; - int i, default_rc = 0, need_pause = 0; - BUFFER err; -@@ -1765,16 +1769,21 @@ - #endif - - /* And about the host... */ -+#if __FreeBSD_version < 500000 -+ gethostname(nodename, sizeof (nodename)); -+#else - uname (&utsname); -+ strfcpy (nodename, utsname.nodename, sizeof (nodename)); -+#endif - /* some systems report the FQDN instead of just the hostname */ -- if ((p = strchr (utsname.nodename, '.'))) -+ if ((p = strchr (nodename, '.'))) - { -- Hostname = mutt_substrdup (utsname.nodename, p); -+ Hostname = mutt_substrdup (nodename, p); - p++; - strfcpy (buffer, p, sizeof (buffer)); /* save the domain for below */ - } - else -- Hostname = safe_strdup (utsname.nodename); -+ Hostname = safe_strdup (nodename); - - #ifndef DOMAIN - #define DOMAIN buffer diff --git a/mail/mutt-devel/files/patch-mktemp b/mail/mutt-devel/files/patch-mktemp deleted file mode 100644 index 16521f758607..000000000000 --- a/mail/mutt-devel/files/patch-mktemp +++ /dev/null @@ -1,23 +0,0 @@ ---- muttlib.c.orig 2010-09-19 09:58:24.000000000 +0200 -+++ muttlib.c 2010-09-19 10:36:26.000000000 +0200 -@@ -788,14 +788,15 @@ - - void _mutt_mktemp (char *s, size_t slen, const char *src, int line) - { -- size_t n = snprintf (s, slen, "%s/mutt-%s-%d-%d-%ld%ld", NONULL (Tempdir), NONULL (Hostname), -- (int) getuid (), (int) getpid (), random (), random ()); -+ size_t n = snprintf (s, slen, "%s/mutt-%s-XXXXXXXX", NONULL (Tempdir), NONULL (Hostname)); - if (n >= slen) - dprint (1, (debugfile, "%s:%d: ERROR: insufficient buffer space to hold temporary filename! slen=%zu but need %zu\n", - src, line, slen, n)); -- dprint (3, (debugfile, "%s:%d: mutt_mktemp returns \"%s\".\n", src, line, s)); -- if (unlink (s) && errno != ENOENT) -- dprint (1, (debugfile, "%s:%d: ERROR: unlink(\"%s\"): %s (errno %d)\n", src, line, s, strerror (errno), errno)); -+ if (mktemp (s)) { -+ dprint (3, (debugfile, "%s:%d: mutt_mktemp returns \"%s\".\n", src, line, s)); -+ } else { -+ dprint (1, (debugfile, "%s:%d: ERROR: mktemp(\"%s\"): %s (errno %d)\n", src, line, s, strerror (errno), errno)); -+ } - } - - void mutt_free_alias (ALIAS **p) diff --git a/mail/mutt-devel/files/patch-nbsp b/mail/mutt-devel/files/patch-nbsp deleted file mode 100644 index e996a05d1ea0..000000000000 --- a/mail/mutt-devel/files/patch-nbsp +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/pager.c b/pager.c ---- pager.c -+++ pager.c -@@ -1187,10 +1187,17 @@ - last_special = special; - } - -- if (IsWPrint (wc)) -+ if (IsWPrint (wc) || (Charset_is_utf8 && wc == 0x00A0)) - { - if (wc == ' ') - space = ch; -+ else if (Charset_is_utf8 && wc == 0x00A0) -+ { -+ /* Convert non-breaking space to normal space. The local variable -+ * `space' is not set here so that the caller of this function won't -+ * attempt to wrap at this character. */ -+ wc = ' '; -+ } - t = wcwidth (wc); - if (col + t > wrap_cols) - break; diff --git a/mail/mutt-devel/files/patch-pgp b/mail/mutt-devel/files/patch-pgp deleted file mode 100644 index b7d0f36bf499..000000000000 --- a/mail/mutt-devel/files/patch-pgp +++ /dev/null @@ -1,134 +0,0 @@ ---- crypt-gpgme.c~ 2010-09-10 07:41:33.584316201 +1000 -+++ crypt-gpgme.c 2010-09-10 08:22:32.948976728 +1000 -@@ -2003,12 +2003,14 @@ - { - if (!mutt_strncmp ("-----BEGIN PGP ", buf, 15)) - { -- if (!mutt_strcmp ("MESSAGE-----\n", buf + 15)) -+ if (!mutt_strcmp ("MESSAGE-----\n", buf + 15) || -+ !mutt_strcmp ("MESSAGE-----\r\n", buf + 15)) - { - enc = 1; - break; - } -- else if (!mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15)) -+ else if (!mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) || -+ !mutt_strcmp ("SIGNED MESSAGE-----\r\n", buf + 15)) - { - sgn = 1; - break; -@@ -2128,7 +2130,8 @@ - continue; - } - -- if (!mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\n")) -+ if (!mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\n") || -+ !mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\r\n")) - break; - - if (armor_header) -@@ -2196,14 +2199,17 @@ - clearsign = 0; - start_pos = last_pos; - -- if (!mutt_strcmp ("MESSAGE-----\n", buf + 15)) -+ if (!mutt_strcmp ("MESSAGE-----\n", buf + 15) || -+ !mutt_strcmp ("MESSAGE-----\r\n", buf + 15)) - needpass = 1; -- else if (!mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15)) -+ else if (!mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) || -+ !mutt_strcmp ("SIGNED MESSAGE-----\r\n", buf + 15)) - { - clearsign = 1; - needpass = 0; - } -- else if (!mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15)) -+ else if (!mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15) || -+ !mutt_strcmp ("PUBLIC KEY BLOCK-----\r\n", buf + 15)) - { - needpass = 0; - pgp_keyblock = 1; ---- pgp.c~ 2009-05-31 03:20:08.000000000 +1000 -+++ pgp.c 2010-09-10 08:27:40.317064142 +1000 -@@ -219,7 +219,8 @@ - continue; - } - -- if (mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\n") == 0) -+ if (mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\n") == 0 || -+ mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\r\n") == 0) - break; - - if (armor_header) -@@ -287,14 +288,17 @@ - clearsign = 0; - start_pos = last_pos; - -- if (mutt_strcmp ("MESSAGE-----\n", buf + 15) == 0) -+ if (mutt_strcmp ("MESSAGE-----\n", buf + 15) == 0 || -+ mutt_strcmp ("MESSAGE-----\r\n", buf + 15) == 0) - needpass = 1; -- else if (mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) == 0) -+ else if (mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) == 0 || -+ mutt_strcmp ("SIGNED MESSAGE-----\r\n", buf + 15) == 0) - { - clearsign = 1; - needpass = 0; - } -- else if (!mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15)) -+ else if (!mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15) || -+ !mutt_strcmp ("PUBLIC KEY BLOCK-----\r\n", buf + 15)) - { - needpass = 0; - pgp_keyblock = 1; -@@ -327,10 +331,14 @@ - - fputs (buf, tmpfp); - -- if ((needpass && mutt_strcmp ("-----END PGP MESSAGE-----\n", buf) == 0) || -- (!needpass -- && (mutt_strcmp ("-----END PGP SIGNATURE-----\n", buf) == 0 -- || mutt_strcmp ("-----END PGP PUBLIC KEY BLOCK-----\n",buf) == 0))) -+ if ((needpass && -+ (mutt_strcmp ("-----END PGP MESSAGE-----\n", buf) == 0 || -+ mutt_strcmp ("-----END PGP MESSAGE-----\r\n", buf) == 0)) || -+ (!needpass && -+ (mutt_strcmp ("-----END PGP SIGNATURE-----\n", buf) == 0 || -+ mutt_strcmp ("-----END PGP SIGNATURE-----\r\n", buf) == 0 || -+ mutt_strcmp ("-----END PGP PUBLIC KEY BLOCK-----\n",buf) == 0 || -+ mutt_strcmp ("-----END PGP PUBLIC KEY BLOCK-----\r\n",buf) == 0))) - break; - /* remember optional Charset: armor header as defined by RfC4880 */ - if (mutt_strncmp ("Charset: ", buf, 9) == 0) -@@ -554,11 +562,14 @@ - { - if (mutt_strncmp ("-----BEGIN PGP ", buf, 15) == 0) - { -- if (mutt_strcmp ("MESSAGE-----\n", buf + 15) == 0) -+ if (mutt_strcmp ("MESSAGE-----\n", buf + 15) == 0 || -+ mutt_strcmp ("MESSAGE-----\r\n", buf + 15) == 0) - enc = 1; -- else if (mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) == 0) -+ else if (mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15) == 0 || -+ mutt_strcmp ("SIGNED MESSAGE-----\r\n", buf + 15) == 0) - sgn = 1; -- else if (mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15) == 0) -+ else if (mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15) == 0 || -+ mutt_strcmp ("PUBLIC KEY BLOCK-----\r\n", buf + 15) == 0) - key = 1; - } - } -@@ -1067,9 +1078,11 @@ - */ - while (fgets (buffer, sizeof (buffer) - 1, pgpout) != NULL) - { -- if (mutt_strcmp ("-----BEGIN PGP MESSAGE-----\n", buffer) == 0) -+ if (mutt_strcmp ("-----BEGIN PGP MESSAGE-----\n", buffer) == 0 || -+ mutt_strcmp ("-----BEGIN PGP MESSAGE-----\r\n", buffer) == 0) - fputs ("-----BEGIN PGP SIGNATURE-----\n", fp); -- else if (mutt_strcmp("-----END PGP MESSAGE-----\n", buffer) == 0) -+ else if (mutt_strcmp("-----END PGP MESSAGE-----\n", buffer) == 0 || -+ mutt_strcmp("-----END PGP MESSAGE-----\r\n", buffer) == 0) - fputs ("-----END PGP SIGNATURE-----\n", fp); - else - fputs (buffer, fp); diff --git a/mail/mutt-devel/files/patch-smime-self b/mail/mutt-devel/files/patch-smime-self deleted file mode 100644 index d8b0e7b8d336..000000000000 --- a/mail/mutt-devel/files/patch-smime-self +++ /dev/null @@ -1,66 +0,0 @@ -Base: http://descolada.dartmouth.edu/mutt/patch-1.5.4+-ow.smime-encrypt-self.2 ---- crypt.c 7 Mar 2003 08:23:27 -0000 3.17 -+++ crypt.c 7 May 2003 14:57:00 -0000 -@@ -246,8 +246,18 @@ - if ((WithCrypto & APPLICATION_SMIME) - && (msg->security & APPLICATION_SMIME)) - { -- if (!(tmp_pbody = crypt_smime_build_smime_entity (tmp_smime_pbody, -- keylist))) -+ char *new_keylist = keylist; -+ -+ if (SmimeDefaultKey && query_quadoption(OPT_SMIMEENCRYPTSELF, _("Encrypt message to S/MIME Default Key also?")) == M_YES) -+ { -+ int size = mutt_strlen(keylist) + mutt_strlen (SmimeDefaultKey) + 2; /* +1 for NULL, +1 for \n */ -+ new_keylist = safe_malloc(size); -+ snprintf(new_keylist, size, "%s%s\n", keylist, SmimeDefaultKey); -+ } -+ -+ tmp_pbody = crypt_smime_build_smime_entity (tmp_smime_pbody, new_keylist); -+ safe_free((void **)&new_keylist); -+ if (!tmp_pbody) - { - /* signed ? free it! */ - return (-1); ---- init.h.orig 2009-02-06 13:43:14.000000000 +0100 -+++ init.h 2009-02-06 13:46:53.000000000 +0100 -@@ -1957,6 +1957,11 @@ - ** not used. - ** (S/MIME only) - */ -+ { "smime_encrypt_self", DT_QUAD, R_NONE, OPT_SMIMEENCRYPTSELF, 1 }, -+ /* -+ ** .pp -+ ** Encrypt the message to smime_default_key too. -+ */ - { "smime_encrypt_with", DT_STR, R_NONE, UL &SmimeCryptAlg, 0 }, - /* - ** .pp -diff -u -d -b -B -r3.18 mutt.h ---- mutt.h.orig Thu Nov 6 08:15:51 2003 -+++ mutt.h Thu Nov 6 08:16:43 2003 -@@ -275,6 +275,7 @@ - OPT_DELETE, - OPT_FORWEDIT, - OPT_INCLUDE, -+ OPT_SMIMEENCRYPTSELF, - OPT_MFUPTO, - OPT_MIMEFWD, - OPT_MIMEFWDREST, ---- contrib/smime.rc.orig Sat Mar 2 13:11:35 2002 -+++ contrib/smime.rc Sat Oct 25 17:56:28 2003 -@@ -23,9 +23,12 @@ - - # The (default) keyfile for signing/decrypting. Uncomment the following - # line and replace the keyid with your own. --set smime_default_key="12345678.0" -+# set smime_default_key="12345678.0" -+# Uncomment the following line in addition to the one above, if you want that -+# all encrypted messages are also encrypted with your default key. -+# set smime_encrypt_self = yes - --# Uncommen to make mutt ask what key to use when trying to decrypt a message. -+# Uncomment to make mutt ask what key to use when trying to decrypt a message. - # It will use the default key above (if that was set) else. - # unset smime_decrypt_use_default_key - diff --git a/mail/mutt-devel/files/patch-smime-sender b/mail/mutt-devel/files/patch-smime-sender deleted file mode 100644 index a8a9cacf5559..000000000000 --- a/mail/mutt-devel/files/patch-smime-sender +++ /dev/null @@ -1,54 +0,0 @@ ---- commands.c.orig Thu Mar 20 20:37:21 2003 -+++ commands.c Thu Mar 20 20:40:29 2003 -@@ -178,7 +178,7 @@ - { - if (cur->security & GOODSIGN) - { -- if (!crypt_smime_verify_sender(cur)) -+ if (option(OPTSMIMENOSENDER) || !crypt_smime_verify_sender(cur)) - mutt_message ( _("S/MIME signature successfully verified.")); - else - mutt_error ( _("S/MIME certificate owner does not match sender.")); ---- init.h.orig2 Fri May 31 10:14:05 2002 -+++ init.h Fri May 31 10:54:55 2002 -@@ -1435,6 +1435,15 @@ - ** This flag controls wether you want to be asked to enter a label for a certificate - ** about to be added to the database or not. It is set by default. - */ -+ { "smime_dont_check_sender", DT_BOOL, R_NONE, OPTSMIMENOSENDER, 0 }, -+ /* -+ ** .pp -+ ** This flag controls wether you want the skip the check for the sender's -+ ** email address against the email address stored in the certificate. -+ ** This can be useful if most of your email senders use SMIMEv3 which no -+ ** longer needs email-addresses as part of the certificates. -+ ** It is not set by default. -+ */ - { "smime_decrypt_use_default_key", DT_BOOL, R_NONE, OPTSDEFAULTDECRYPTKEY, 1 }, - /* - ** .pp ---- mutt.h.orig2 Fri May 31 10:14:06 2002 -+++ mutt.h Fri May 31 10:24:03 2002 -@@ -453,6 +453,7 @@ - #ifdef HAVE_SMIME - OPTSMIMEISDEFAULT, - OPTASKCERTLABEL, -+ OPTSMIMENOSENDER, - OPTSDEFAULTDECRYPTKEY, - #endif - #ifdef HAVE_PGP ---- contrib/smime.rc.orig Sat Oct 25 17:57:35 2003 -+++ contrib/smime.rc Sat Oct 25 17:57:35 2003 -@@ -6,8 +6,11 @@ - # will be the default method unless the following option is set - set smime_is_default - --# Uncoment this if you don't want to set labels for certificates you add. -+# Uncomment this if you don't want to set labels for certificates you add. - # unset smime_ask_cert_label -+ -+# Uncomment this if you don't want to check for sender's email address -+# set smime_dont_check_sender = yes - - # Passphrase expiration - set smime_timeout=300 diff --git a/mail/mutt-devel/files/patch-threadcomplete b/mail/mutt-devel/files/patch-threadcomplete deleted file mode 100644 index d151009ec1d7..000000000000 --- a/mail/mutt-devel/files/patch-threadcomplete +++ /dev/null @@ -1,37 +0,0 @@ ---- mutt.h.orig2 Mon Sep 6 09:24:17 2004 -+++ mutt.h Mon Sep 6 09:27:04 2004 -@@ -212,6 +212,7 @@ - M_LIMIT, - M_EXPIRED, - M_SUPERSEDED, -+ M_THREADCOMPLETE, - - /* actions for mutt_pattern_comp/mutt_pattern_exec */ - M_AND, ---- pattern.c.orig2 Sun Sep 18 15:17:46 2005 -+++ pattern.c Sun Sep 18 15:19:48 2005 -@@ -54,6 +54,7 @@ - } - Flags[] = - { -+ { 'a', M_THREADCOMPLETE, 0, NULL }, - { 'A', M_ALL, 0, NULL }, - { 'b', M_BODY, M_FULL_MSG, eat_regexp }, - { 'B', M_WHOLE_MSG, M_FULL_MSG, eat_regexp }, -@@ -1139,6 +1140,16 @@ - 2, h->env->to, h->env->cc)); - case M_LIST: /* known list, subscribed or not */ - return (pat->not ^ mutt_is_list_cc (pat->alladdr, h->env->to, h->env->cc)); -+ case M_THREADCOMPLETE: -+ { static pattern_t tmp; -+ static short pattern_set = 0; -+ if(! pattern_set) { -+ memset (&tmp, 0, sizeof (tmp)); -+ tmp.op = M_TAG; -+ pattern_set = 1; -+ } -+ return (pat->not ^ (h->env && match_threadcomplete(&tmp, flags, ctx, h->thread, 1, 1, 1, 1))); -+ } - case M_SUBSCRIBED_LIST: - return (pat->not ^ mutt_is_list_recipient (pat->alladdr, h->env->to, h->env->cc)); - case M_PERSONAL_RECIP: |