Sprout from master 2010-10-06 17:59:14 UTC Jan Rękorajski <baggins@pld-linux.org> '- more 1.5.21 updates'
Delete:
mutt-Muttrc.head.patch
mutt-Muttrc.patch
mutt-Muttrc_mbox_path.patch
mutt-bj.status-time.patch
mutt-cd.purge_message.patch
mutt-cd.signatures_menu.patch
mutt-cd.trash_folder.patch
mutt-crypt-autoselectkey.patch
mutt-folder_columns.patch
mutt-forcedotlock.patch
mutt-home_etc.patch
mutt-imap_mxcmp.patch
mutt-imap_recent.patch
mutt-manual.patch
mutt-muttbug-tmp.patch
mutt-null_name.patch
mutt-pl.po-update.patch
mutt-po.patch
mutt-rr.compressed.patch
mutt-smime.rc.patch
mutt-vvv.quote.patch
mutt-xface.patch
mutt.1.pl
mutt.desktop
mutt.png
mutt.spec
+++ /dev/null
-diff -urN mutt-1.5.19/doc/Muttrc.head mutt-1.5.19.conf/doc/Muttrc.head
---- mutt-1.5.19/doc/Muttrc.head 2009-04-13 19:06:54.325723485 +0200
-+++ mutt-1.5.19.conf/doc/Muttrc.head 2009-04-13 18:36:22.943095974 +0200
-@@ -7,10 +7,23 @@
- ignore *
-
- # ... then allow these through.
--unignore from: subject to cc date x-mailer x-url user-agent
-+unignore from: subject to cc date x-mailer x-url user-agent mail-followup-to reply-to lines
-
- # Display the fields in this order
- hdr_order date from to cc subject
-+
-+# Some sane bindings (next/prev-undeleted idea is just sick)
-+bind index <up> previous-entry
-+bind index <down> next-entry
-+bind index + collapse-thread
-+bind index - collapse-thread
-+
-+# Same as above, and
-+# Up/Down is much more intiuitive than Backspace/Enter for up and down
-+bind pager <up> previous-line
-+bind pager <down> next-line
-+bind pager <left> previous-entry
-+bind pager <right> next-entry
-
- # imitate the old search-body function
- macro index \eb "<search>~b " "search in message bodies"
-@@ -47,6 +60,20 @@
- # be undone with unmime_lookup.
- mime_lookup application/octet-stream
-
-+auto_view text/richtext text/html text/x-sgml text/x-vcard application/x-tex \
-+ application/x-dvi applicatoin/x-gzip-dvi application/x-gzip \
-+ application/x-gunzip application/x-cpio application/x-gtar \
-+ application/x-tar application/x-tar-gz application/x-rar-compressed \
-+ application/x-zip-compressed application/zip application/x-csh \
-+ application/x-sh application/x-script application/x-latex \
-+ application/x-tex application/x-shar application/x-troff \
-+ application/x-troff-man application/x-troff-me \
-+ application/x-pgp-message application/msword \
-+ application/ms-tnef application/rtf application/octet-stream \
-+ application/x-tcl application/x-perl message/partial
-+
-+alternative_order text/enriched text/plain text/html
-+
- ##
- ## *** DEFAULT SETTINGS FOR THE ATTACHMENTS PATCH ***
- ##
+++ /dev/null
-diff -urN mutt-1.5.19/doc/Muttrc mutt-1.5.19.conf/doc/Muttrc
---- mutt-1.5.19/doc/Muttrc 2009-04-13 19:07:38.103582891 +0200
-+++ mutt-1.5.19.conf/doc/Muttrc 2009-04-13 18:29:07.652668002 +0200
-@@ -1033,6 +1033,7 @@
- #
- #
- # set forward_format="[%a: %s]"
-+set forward_format="Fwd: %s"
- #
- # Name: forward_format
- # Type: string
-@@ -1203,6 +1204,7 @@
- #
- #
- # set history=10
-+set history=100
- #
- # Name: history
- # Type: number
-@@ -1775,6 +1777,7 @@
- #
- #
- # set mark_old=yes
-+set mark_old=no
- #
- # Name: mark_old
- # Type: boolean
-@@ -1947,6 +1950,7 @@
- #
- #
- # set mime_forward=no
-+set mime_forward=ask-no
- #
- # Name: mime_forward
- # Type: quadoption
-@@ -2115,6 +2119,7 @@
- #
- #
- # set pager_context=0
-+set pager_context=1
- #
- # Name: pager_context
- # Type: number
-@@ -2141,6 +2146,7 @@
- #
- #
- # set pager_index_lines=0
-+set pager_index_lines=6
- #
- # Name: pager_index_lines
- # Type: number
-@@ -3546,6 +3553,7 @@
- #
- #
- # set quit=yes
-+set quit=ask-yes
- #
- # Name: quit
- # Type: quadoption
-@@ -3680,6 +3688,7 @@
- #
- #
- # set reply_regexp="^(re([\\[0-9\\]+])*|aw):[ \t]*"
-+set reply_regexp="^(([oO][dD][pP]|[aA][wW]|[rR][eE]([\\[0-9\\]+])*:|[Oo][dD][pP]:|[aA][wW]:|[rR][eE]:)[ \t]+)*"
- #
- # Name: reply_regexp
- # Type: regular expression
-@@ -3915,6 +3924,7 @@
- #
- #
- # set send_charset="us-ascii:iso-8859-1:utf-8"
-+set send_charset="us-ascii:utf-8"
- #
- # Name: send_charset
- # Type: string
-@@ -4019,6 +4029,7 @@
- #
- #
- # set simple_search="~f %s | ~s %s"
-+set simple_search="~f %s | ~C %s | ~s %s"
- #
- # Name: simple_search
- # Type: string
-@@ -4126,6 +4137,7 @@
- #
- #
- # set sort=date
-+set sort=threads
- #
- # Name: sort
- # Type: sort order
-@@ -4436,6 +4448,7 @@
- #
- #
- # set thorough_search=yes
-+set thorough_search=yes
- #
- # Name: thorough_search
- # Type: boolean
-@@ -4455,6 +4468,7 @@
- #
- #
- # set tilde=no
-+set tilde=yes
- #
- # Name: tilde
- # Type: boolean
-@@ -4772,3 +4786,4 @@
- # in an X11 terminal emulator.
- #
- #
-+source mutt_source-muttrc.d|
+++ /dev/null
---- mutt-1.5.18.orig/doc/Muttrc 2004-03-04 18:10:37.000000000 +0100
-+++ mutt-1.5.18/doc/Muttrc 2004-03-04 18:17:10.000000000 +0100
-@@ -1360,7 +1360,7 @@
- # will be shown. The match is always case-sensitive.
- #
- #
--# set mbox="~/mbox"
-+set mbox="~/Mail/mbox"
- #
- # Name: mbox
- # Type: path
+++ /dev/null
-diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/curs_main.c mutt-1.5.10/curs_main.c
---- mutt-1.5.20.b/curs_main.c 2009-07-14 12:34:25.000000000 +0200
-+++ mutt-1.5.20/curs_main.c 2009-07-14 12:42:41.000000000 +0200
-@@ -556,7 +556,7 @@
- menu_redraw_current (menu);
- }
-
-- if (menu->redraw & REDRAW_STATUS)
-+ if ((menu->redraw & REDRAW_STATUS) || update_status_time ())
- {
- menu_status_line (buf, sizeof (buf), menu, NONULL (Status));
- CLEARLINE (option (OPTSTATUSONTOP) ? 0 : LINES-2);
---- mutt-1.5.18/globals.h.orig 2008-01-30 05:26:50.000000000 +0100
-+++ mutt-1.5.18/globals.h 2008-07-25 17:41:02.532746787 +0200
-@@ -200,6 +200,7 @@
- WHERE short SaveHist;
- WHERE short SendmailWait;
- WHERE short SleepTime INITVAL (1);
-+WHERE short StatusUpdate;
- WHERE short TimeInc;
- WHERE short Timeout;
- WHERE short Wrap;
-diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/init.h mutt-1.5.10/init.h
---- mutt-1.5.10.orig/init.h 2005-10-07 09:28:10.000000000 +0200
-+++ mutt-1.5.10/init.h 2005-10-07 09:28:24.000000000 +0200
-@@ -2626,6 +2626,9 @@
- ** .dt %u .dd number of unread messages *
- ** .dt %v .dd Mutt version string
- ** .dt %V .dd currently active limit pattern, if any *
-+ ** .dt %[fmt] .dd the current date and time. ``fmt'' is
-+ ** expanded by the system call ``strftime'';
-+ ** a leading bang disables locales
- ** .dt %>X .dd right justify the rest of the string and pad with ``X''
- ** .dt %|X .dd pad to the end of the line with ``X''
- ** .dt %*X .dd soft-fill with character ``X'' as pad
-@@ -2671,6 +2674,16 @@
- ** Setting this variable causes the ``status bar'' to be displayed on
- ** the first line of the screen rather than near the bottom.
- */
-+ { "status_update", DT_NUM, R_NONE, UL &StatusUpdate, -1 },
-+ /*
-+ ** .pp
-+ ** This variable controls, if positive, the maximum interval in seconds
-+ ** before the time in the status line is updated. It is checked at
-+ ** every key press and after a keyboard $$timeout.
-+ ** If the value is zero, the status line will be updated at every check.
-+ ** If it is negative, the status time will only be updated
-+ ** if it necessary to update to the status line for some other reason.
-+ */
- { "strict_threads", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, OPTSTRICTTHREADS, 0 },
- /*
- ** .pp
-diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/menu.c mutt-1.5.10/menu.c
---- mutt-1.5.10.orig/menu.c 2005-06-12 20:32:46.000000000 +0200
-+++ mutt-1.5.10/menu.c 2005-10-07 09:28:24.000000000 +0200
-@@ -1087,3 +1087,23 @@
- }
- /* not reached */
- }
-+
-+int update_status_time ()
-+{
-+ static time_t Last;
-+ time_t now;
-+
-+ if (StatusUpdate < 0)
-+ return 0;
-+ else if (StatusUpdate == 0)
-+ return 1;
-+
-+ now = time (NULL);
-+ if (now - Last >= StatusUpdate)
-+ {
-+ Last = now;
-+ return 1;
-+ }
-+ else
-+ return 0;
-+}
-diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/mutt_menu.h mutt-1.5.10/mutt_menu.h
---- mutt-1.5.10.orig/mutt_menu.h 2005-08-11 21:37:02.000000000 +0200
-+++ mutt-1.5.10/mutt_menu.h 2005-10-07 09:28:59.000000000 +0200
-@@ -112,4 +112,5 @@
- void index_make_entry (char *, size_t, struct menu_t *, int);
- int index_color (int);
-
-+int update_status_time (void);
- #endif /* _MUTT_MENU_H_ */
-diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/pager.c mutt-1.5.10/pager.c
---- mutt-1.5.10.orig/pager.c 2005-08-11 21:37:02.000000000 +0200
-+++ mutt-1.5.10/pager.c 2005-10-07 09:28:24.000000000 +0200
-@@ -1763,7 +1763,7 @@
- SETCOLOR (MT_COLOR_NORMAL);
- }
-
-- if ((redraw & REDRAW_INDEX) && index)
-+ if (index && ((redraw & REDRAW_INDEX) || update_status_time ()))
- {
- /* redraw the pager_index indicator, because the
- * flags for this message might have changed. */
-diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/status.c mutt-1.5.10/status.c
---- mutt-1.5.10.orig/status.c 2005-10-07 09:28:10.000000000 +0200
-+++ mutt-1.5.10/status.c 2005-10-07 09:28:24.000000000 +0200
-@@ -30,6 +30,7 @@
- #include <string.h>
- #include <ctype.h>
- #include <unistd.h>
-+#include <locale.h>
-
- static char *get_sort_str (char *buf, size_t buflen, int method)
- {
-@@ -288,6 +289,61 @@
- *buf = 0;
- return (src);
-
-+ case '[':
-+ {
-+ int do_locales;
-+ int len = sizeof (fmt) - 1;
-+
-+ cp = fmt;
-+ if (*src == '!')
-+ {
-+ do_locales = 0;
-+ src++;
-+ }
-+ else
-+ do_locales = 1;
-+
-+ while (len > 0 && *src != ']')
-+ {
-+ if (*src == '%')
-+ {
-+ src++;
-+ if (len >= 2)
-+ {
-+ *cp++ = '%';
-+ *cp++ = *src;
-+ len -= 2;
-+ }
-+ else
-+ break; /* not enough space */
-+ src++;
-+ }
-+ else
-+ {
-+ *cp++ = *src++;
-+ len--;
-+ }
-+ }
-+ *cp = 0;
-+ src++;
-+
-+ if (do_locales && Locale)
-+ setlocale (LC_TIME, Locale);
-+
-+ {
-+ time_t now = time (NULL);
-+
-+ strftime (tmp, sizeof (tmp), fmt, localtime (&now));
-+ }
-+
-+ if (do_locales && Locale)
-+ setlocale (LC_TIME, "C");
-+
-+ snprintf (fmt, sizeof (fmt), "%%%ss", prefix);
-+ snprintf (buf, buflen, fmt, tmp);
-+ }
-+ break;
-+
- default:
- snprintf (buf, buflen, "%%%s%c", prefix, op);
- break;
+++ /dev/null
-diff -pruN1 mutt-1.3.25.trash_folder/OPS mutt-1.3.25.purge_command/OPS
---- mutt-1.3.25.trash_folder/OPS Tue Sep 11 12:50:50 2001
-+++ mutt-1.3.25.purge_command/OPS Wed Jan 9 20:40:27 2002
-@@ -136,2 +136,3 @@ 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"
-diff -pruN1 mutt-1.3.25.trash_folder/curs_main.c mutt-1.3.25.purge_command/curs_main.c
---- mutt-1.3.25.trash_folder/curs_main.c Thu Nov 8 09:56:02 2001
-+++ mutt-1.3.25.purge_command/curs_main.c Wed Jan 9 20:40:27 2002
-@@ -1615,2 +1615,3 @@ int mutt_index_menu (void)
-
-+ case OP_PURGE_MESSAGE:
- case OP_DELETE:
-@@ -1623,2 +1624,4 @@ int mutt_index_menu (void)
- mutt_tag_set_flag (M_DELETE, 1);
-+ if (op == OP_PURGE_MESSAGE)
-+ mutt_tag_set_flag (M_PURGED, 1);
- if (option (OPTDELETEUNTAG))
-@@ -1630,2 +1633,4 @@ int mutt_index_menu (void)
- mutt_set_flag (Context, CURHDR, M_DELETE, 1);
-+ if (op == OP_PURGE_MESSAGE)
-+ mutt_set_flag (Context, CURHDR, M_PURGED, 1);
- if (option (OPTDELETEUNTAG))
-@@ -1908,2 +1913,3 @@ int mutt_index_menu (void)
- mutt_tag_set_flag (M_DELETE, 0);
-+ mutt_tag_set_flag (M_PURGED, 0);
- menu->redraw = REDRAW_INDEX;
-@@ -1913,2 +1919,3 @@ int mutt_index_menu (void)
- mutt_set_flag (Context, CURHDR, M_DELETE, 0);
-+ mutt_set_flag (Context, CURHDR, M_PURGED, 0);
- if (option (OPTRESOLVE) && menu->current < Context->vcount - 1)
-@@ -1932,5 +1939,7 @@ int mutt_index_menu (void)
- 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)
- {
-diff -pruN1 mutt-1.3.25.trash_folder/flags.c mutt-1.3.25.purge_command/flags.c
---- mutt-1.3.25.trash_folder/flags.c Wed Jan 9 20:39:31 2002
-+++ mutt-1.3.25.purge_command/flags.c Wed Jan 9 20:40:27 2002
-@@ -100,2 +100,12 @@ void _mutt_set_flag (CONTEXT *ctx, HEADE
-
-+ case M_PURGED:
-+ if (bf)
-+ {
-+ if (!h->purged)
-+ h->purged = 1;
-+ }
-+ else if (h->purged)
-+ h->purged = 0;
-+ break;
-+
- case M_NEW:
-diff -pruN1 mutt-1.3.25.trash_folder/functions.h mutt-1.3.25.purge_command/functions.h
---- mutt-1.3.25.trash_folder/functions.h Tue Sep 11 12:51:39 2001
-+++ mutt-1.3.25.purge_command/functions.h Wed Jan 9 20:40:27 2002
-@@ -100,2 +100,3 @@ struct binding_t OpMain[] = {
- { "next-subthread", OP_MAIN_NEXT_SUBTHREAD, "\033n" },
-+ { "purge-message", OP_PURGE_MESSAGE, NULL },
- { "query", OP_QUERY, "Q" },
-@@ -184,2 +185,3 @@ struct binding_t OpPager[] = {
- { "previous-subthread",OP_MAIN_PREV_SUBTHREAD, "\033p" },
-+ { "purge-message", OP_PURGE_MESSAGE, NULL },
- { "quit", OP_QUIT, "Q" },
-diff -pruN1 mutt-1.3.25.trash_folder/mutt.h mutt-1.3.25.purge_command/mutt.h
---- mutt-1.3.25.trash_folder/mutt.h Wed Jan 9 20:39:31 2002
-+++ mutt-1.3.25.purge_command/mutt.h Wed Jan 9 20:40:27 2002
-@@ -187,2 +187,3 @@ enum
- M_APPENDED,
-+ M_PURGED,
- M_FLAG,
-@@ -620,2 +621,3 @@ typedef struct header
- unsigned int appended : 1; /* has been saved */
-+ unsigned int purged : 1; /* bypassing the trash folder */
- unsigned int deleted : 1;
-diff -pruN1 mutt-1.3.25.trash_folder/mx.c mutt-1.3.25.purge_command/mx.c
---- mutt-1.3.25.trash_folder/mx.c Wed Jan 9 20:39:31 2002
-+++ mutt-1.3.25.purge_command/mx.c Wed Jan 9 20:40:27 2002
-@@ -841,2 +841,3 @@ static int trash_append (CONTEXT *ctx)
- 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)
-diff -pruN1 mutt-1.3.25.trash_folder/pager.c mutt-1.3.25.purge_command/pager.c
---- mutt-1.3.25.trash_folder/pager.c Fri Dec 21 01:21:03 2001
-+++ mutt-1.3.25.purge_command/pager.c Wed Jan 9 20:40:27 2002
-@@ -2148,2 +2148,3 @@ mutt_pager (const char *banner, const ch
-
-+ case OP_PURGE_MESSAGE:
- case OP_DELETE:
-@@ -2152,2 +2153,3 @@ mutt_pager (const char *banner, const ch
- mutt_set_flag (Context, extra->hdr, M_DELETE, 1);
-+ mutt_set_flag (Context, extra->hdr, M_PURGED, 1);
- if (option (OPTDELETEUNTAG))
-@@ -2461,2 +2463,3 @@ mutt_pager (const char *banner, const ch
- mutt_set_flag (Context, extra->hdr, M_DELETE, 0);
-+ mutt_set_flag (Context, extra->hdr, M_PURGED, 0);
- redraw = REDRAW_STATUS | REDRAW_INDEX;
-@@ -2475,5 +2478,7 @@ mutt_pager (const char *banner, const ch
- 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)
- {
-diff -pruN1 mutt-1.3.25.trash_folder/pattern.c mutt-1.3.25.purge_command/pattern.c
---- mutt-1.3.25.trash_folder/pattern.c Mon Dec 3 11:17:57 2001
-+++ mutt-1.3.25.purge_command/pattern.c Wed Jan 9 20:40:27 2002
-@@ -1172,4 +1172,6 @@ int mutt_pattern_func (int op, char *pro
- {
-- 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,
-diff -pruN mutt-1.3.25.orig/PATCHES mutt-1.3.25/PATCHES
---- mutt-1.3.25.orig/PATCHES Mon Nov 26 20:16:52 2001
-+++ mutt-1.3.25/PATCHES Thu Dec 6 16:27:55 2001
-@@ -1,0 +1 @@
-+patch-1.3.25.cd.purge_command.2
+++ /dev/null
-diff -pruN2 mutt-1.3.27.orig/Makefile.am mutt-1.3.27/Makefile.am
---- mutt-1.3.27.orig/Makefile.am Fri Nov 9 01:18:28 2001
-+++ mutt-1.3.27/Makefile.am Wed Jan 23 22:35:32 2002
-@@ -25,5 +25,5 @@ mutt_SOURCES = $(BUILT_SOURCES) \
- 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 \
-diff -pruN2 mutt-1.3.27.orig/OPS mutt-1.3.27/OPS
---- mutt-1.3.27.orig/OPS Tue Sep 11 12:50:50 2001
-+++ mutt-1.3.27/OPS Wed Jan 23 22:35:32 2002
-@@ -37,4 +37,5 @@ OP_COMPOSE_POSTPONE_MESSAGE "save this m
- 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"
-@@ -126,4 +127,5 @@ 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"
-@@ -134,9 +136,11 @@ OP_PREV_ENTRY "move to the previous entr
- 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_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"
-+OP_RANDOM_SIG "pick a signature at random"
- OP_RECALL_MESSAGE "recall a postponed message"
- OP_REDRAW "clear and redraw the screen"
-@@ -150,4 +154,5 @@ OP_SEARCH_OPPOSITE "search for next matc
- 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"
-diff -pruN2 mutt-1.3.27.orig/compose.c mutt-1.3.27/compose.c
---- mutt-1.3.27.orig/compose.c Mon Dec 3 11:17:57 2001
-+++ mutt-1.3.27/compose.c Wed Jan 23 22:35:32 2002
-@@ -1103,4 +1103,10 @@ int mutt_compose_menu (HEADER *msg, /*
- 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:
-diff -pruN2 mutt-1.3.27.orig/doc/manual.sgml.head mutt-1.3.27/doc/manual.sgml.head
---- mutt-1.3.27.orig/doc/manual.xml.head Sat Jan 12 12:35:43 2002
-+++ mutt-1.3.27/doc/manual.xml.head Wed Jan 23 22:35:32 2002
-@@ -526,4 +526,5 @@ c edit-cc edit the
- b edit-bcc edit the Bcc field
- y send-message send the message
-+ESC s signature-menu select a signature and append it to your mail
- s edit-subject edit the Subject
- f edit-fcc specify an ``Fcc'' mailbox
-diff -pruN2 mutt-1.3.27.orig/functions.h mutt-1.3.27/functions.h
---- mutt-1.3.27.orig/functions.h Tue Sep 11 12:51:39 2001
-+++ mutt-1.3.27/functions.h Wed Jan 23 22:35:32 2002
-@@ -309,4 +309,5 @@ struct binding_t OpCompose[] = {
- { "send-message", OP_COMPOSE_SEND_MESSAGE, "y" },
- { "pipe-entry", OP_PIPE, "|" },
-+ { "signature-menu", OP_COMPOSE_SIG, "\033s" },
-
- #ifdef HAVE_PGP
-@@ -363,4 +364,17 @@ struct binding_t OpQuery[] = {
- { "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 }
- };
-diff -pruN2 mutt-1.3.27.orig/globals.h mutt-1.3.27/globals.h
---- mutt-1.3.27.orig/globals.h Thu Jan 3 21:56:46 2002
-+++ mutt-1.3.27/globals.h Wed Jan 23 22:35:32 2002
-@@ -100,4 +100,5 @@ WHERE char *Sendmail;
- WHERE char *Shell;
- WHERE char *Signature;
-+WHERE char *SigDirectory;
- WHERE char *SimpleSearch;
- WHERE char *Spoolfile;
-diff -pruN2 mutt-1.3.27.orig/init.h mutt-1.3.27/init.h
---- mutt-1.3.27.orig/init.h Mon Dec 10 11:09:03 2001
-+++ mutt-1.3.27/init.h Wed Jan 23 22:35:32 2002
-@@ -1954,4 +1954,12 @@ struct option_t MuttVars[] = {
- ** 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" },
- /*
-diff -pruN2 mutt-1.3.27.orig/keymap.c mutt-1.3.27/keymap.c
---- mutt-1.3.27.orig/keymap.c Tue Oct 16 16:29:02 2001
-+++ mutt-1.3.27/keymap.c Wed Jan 23 22:35:32 2002
-@@ -50,4 +50,6 @@ struct mapping_t Menus[] = {
-
- { "query", MENU_QUERY },
-+ { "signature", MENU_SIG },
-+ { "sig_directory", MENU_SIG_DIR },
- { "generic", MENU_GENERIC },
- { NULL, 0 }
-@@ -528,4 +530,6 @@ void km_init (void)
- create_bindings (OpQuery, MENU_QUERY);
- create_bindings (OpAlias, MENU_ALIAS);
-+ create_bindings (OpSig, MENU_SIG);
-+ create_bindings (OpSigDir, MENU_SIG_DIR);
-
-
-@@ -619,4 +623,7 @@ void km_init (void)
- 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 */
-@@ -739,4 +746,8 @@ struct binding_t *km_get_table (int menu
- case MENU_QUERY:
- return OpQuery;
-+ case MENU_SIG:
-+ return OpSig;
-+ case MENU_SIG_DIR:
-+ return OpSigDir;
-
-
-diff -pruN2 mutt-1.3.27.orig/keymap.h mutt-1.3.27/keymap.h
---- mutt-1.3.27.orig/keymap.h Tue Sep 11 12:50:12 2001
-+++ mutt-1.3.27/keymap.h Wed Jan 23 22:35:32 2002
-@@ -60,4 +60,6 @@ enum
- MENU_POST,
- MENU_QUERY,
-+ MENU_SIG,
-+ MENU_SIG_DIR,
-
-
-@@ -102,4 +104,6 @@ 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[];
-
- #ifdef HAVE_PGP
-diff -pruN2 mutt-1.3.27.orig/protos.h mutt-1.3.27/protos.h
---- mutt-1.3.27.orig/protos.h Wed Jan 16 21:43:58 2002
-+++ mutt-1.3.27/protos.h Wed Jan 23 22:35:32 2002
-@@ -225,4 +225,5 @@ 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 *);
-diff -pruN2 mutt-1.3.27.orig/signature.c mutt-1.3.27/signature.c
---- mutt-1.3.27.orig/signature.c Thu Jan 1 01:00:00 1970
-+++ mutt-1.3.27/signature.c Wed Jan 23 22:35:32 2002
-@@ -0,0 +1,505 @@
-+/*
-+ * 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_SIG);
-+ menu->make_entry = sig_make_entry;
-+ menu->tag = NULL;
-+ menu->search = sig_menu_search;
-+ 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;
-+}
-+
-+extern char* SearchBuffers[MENU_MAX];
-+
-+static SIG_LIST *sig_search_filter (MUTTMENU *menu, char *path)
-+{
-+ regex_t re;
-+ char buf[STRING];
-+ SIG_LIST *result = NULL;
-+ int i;
-+ char* searchBuf = menu->menu >= 0 && menu->menu < MENU_MAX ?
-+ SearchBuffers[menu->menu] : NULL;
-+
-+ snprintf (buf, sizeof(buf), searchBuf ? searchBuf : "");
-+ if (mutt_get_field (_("Search for: "), buf,
-+ sizeof (buf), M_CLEAR) != 0 || !buf[0])
-+ return (NULL);
-+ if (menu->menu >= 0 && menu->menu < MENU_MAX)
-+ {
-+ mutt_str_replace (&SearchBuffers[menu->menu], buf);
-+ searchBuf = SearchBuffers[menu->menu];
-+ }
-+
-+ if ((i = regcomp (&re, searchBuf, REG_NOSUB | REG_EXTENDED | REG_WORDS
-+ | mutt_which_case (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_SIG_DIR);
-+ menu->make_entry = sig_dir_make_entry;
-+ menu->search = NULL; /* search within files with sig_search_filter() */
-+ menu->tag = sig_dir_tag;
-+ 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 -pruN mutt-1.3.27.orig/PATCHES mutt-1.3.27/PATCHES
---- mutt-1.3.27.orig/PATCHES Mon Nov 26 20:16:52 2001
-+++ mutt-1.3.27/PATCHES Thu Dec 6 16:27:55 2001
-@@ -1,0 +1 @@
-+patch-1.3.27.cd.signatures_menu.2.1
-diff --git a/menu.c b/menu.c
---- a/menu.c
-+++ b/menu.c
-@@ -642,7 +640,7 @@
- mutt_error _("No entries.");
- }
-
--static void menu_next_entry (MUTTMENU *menu)
-+void menu_next_entry (MUTTMENU *menu)
- {
- if (menu->current < menu->max - 1)
- {
-@@ -653,7 +651,7 @@
- mutt_error _("You are on the last entry.");
- }
-
--static void menu_prev_entry (MUTTMENU *menu)
-+void menu_prev_entry (MUTTMENU *menu)
- {
- if (menu->current)
- {
+++ /dev/null
-diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/PATCHES mutt-1.5.10/PATCHES
---- mutt-1.5.10.orig/PATCHES 2005-10-07 09:29:54.000000000 +0200
-+++ mutt-1.5.10/PATCHES 2005-10-07 09:30:06.000000000 +0200
-@@ -1,2 +1,3 @@
- vvv.quote
-+patch-1.3.27.cd.trash_folder.1
- rr.compressed
-diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/commands.c mutt-1.5.10/commands.c
---- mutt-1.5.10.orig/commands.c 2005-08-02 09:08:00.000000000 +0200
-+++ mutt-1.5.10/commands.c 2005-10-07 09:32:06.000000000 +0200
-@@ -690,6 +690,7 @@
- if (option (OPTDELETEUNTAG))
- mutt_set_flag (Context, h, M_TAG, 0);
- }
-+ mutt_set_flag (Context, h, M_APPENDED, 1);
-
- return 0;
- }
-Only in mutt-1.5.10/doc: manual-1.html
-Only in mutt-1.5.10/doc: manual-2.html
-Only in mutt-1.5.10/doc: manual-3.html
-Only in mutt-1.5.10/doc: manual-4.html
-Only in mutt-1.5.10/doc: manual-5.html
-Only in mutt-1.5.10/doc: manual-6.html
-Only in mutt-1.5.10/doc: manual-7.html
-Only in mutt-1.5.10/doc: manual.html
-Only in mutt-1.5.10/doc: manual.txt
-diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/flags.c mutt-1.5.10/flags.c
---- mutt-1.5.10.orig/flags.c 2005-02-03 19:47:52.000000000 +0100
-+++ mutt-1.5.10/flags.c 2005-10-07 09:30:06.000000000 +0200
-@@ -91,6 +91,17 @@
- }
- break;
-
-+ case M_APPENDED:
-+ if (bf)
-+ {
-+ if (!h->appended)
-+ {
-+ h->appended = 1;
-+ if (upd_ctx) ctx->appended++;
-+ }
-+ }
-+ break;
-+
- case M_NEW:
-
- #ifdef USE_IMAP
-diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/globals.h mutt-1.5.10/globals.h
---- mutt-1.5.10.orig/globals.h 2005-10-07 09:29:54.000000000 +0200
-+++ mutt-1.5.10/globals.h 2005-10-07 09:30:06.000000000 +0200
-@@ -130,6 +130,7 @@
- WHERE char *Status;
- WHERE char *Tempdir;
- WHERE char *Tochars;
-+WHERE char *TrashPath;
- WHERE char *Username;
- WHERE char *Visual;
-
-diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/init.h mutt-1.5.10/init.h
---- mutt-1.5.10.orig/init.h 2005-10-07 09:29:54.000000000 +0200
-+++ mutt-1.5.10/init.h 2005-10-07 09:30:06.000000000 +0200
-@@ -2774,6 +2774,13 @@
- ** by \fIyou\fP. The sixth character is used to indicate when a mail
- ** was sent to a mailing-list you subscribe to (default: L).
- */
-+ { "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.
-+ */
- #ifdef USE_SOCKET
- { "tunnel", DT_STR, R_NONE, UL &Tunnel, UL 0 },
- /*
-diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/mutt.h mutt-1.5.10/mutt.h
---- mutt-1.5.10.orig/mutt.h 2005-10-07 09:29:54.000000000 +0200
-+++ mutt-1.5.10/mutt.h 2005-10-07 09:30:06.000000000 +0200
-@@ -207,6 +207,7 @@
- M_DELETE,
- M_UNDELETE,
- M_DELETED,
-+ M_APPENDED,
- M_FLAG,
- M_TAG,
- M_UNTAG,
-@@ -702,6 +703,7 @@
- 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 deleted : 1;
- unsigned int changed : 1;
- unsigned int attach_del : 1; /* has an attachment marked for deletion */
-@@ -830,6 +832,7 @@
- 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 */
- #if defined USE_POP || defined USE_IMAP
-diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/mx.c mutt-1.5.10/mx.c
---- mutt-1.5.10.orig/mx.c 2005-10-07 09:29:54.000000000 +0200
-+++ mutt-1.5.10/mx.c 2005-10-07 09:30:06.000000000 +0200
-@@ -850,6 +850,47 @@
- return rc;
- }
-
-+/* move deleted mails to the trash folder */
-+static int trash_append (CONTEXT *ctx)
-+{
-+ CONTEXT *ctx_trash;
-+ int i;
-+ struct stat st, stc;
-+
-+ if (!TrashPath || !ctx->deleted)
-+ return 0;
-+
-+ if (!mutt_save_confirm (TrashPath, &st))
-+ {
-+ 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
-+ && 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)
- {
-@@ -1032,11 +1073,19 @@
-
- if (ctx->changed || ctx->deleted)
- {
-- if ((check = sync_mailbox (ctx, index_hint)) != 0)
-+ int trsh = 0;
-+
-+ if ((!ctx->deleted || (trsh = trash_append (ctx)) == 0)
-+ && (check = sync_mailbox (ctx, index_hint)) != 0)
- {
- ctx->closing = 0;
- return check;
- }
-+ if (trsh != 0)
-+ {
-+ ctx->closing = 0;
-+ return -1;
-+ }
- }
- }
-
-@@ -1214,8 +1263,12 @@
- if (ctx->magic == M_IMAP)
- rc = imap_sync_mailbox (ctx, purge, index_hint);
- else
--#endif
-+#endif /* enter this block unconditionally if IMAP is not used */
-+ {
-+ if (trash_append (ctx) == -1)
-+ return -1;
- rc = sync_mailbox (ctx, index_hint);
-+ }
- if (rc == 0)
- {
- #ifdef USE_IMAP
-diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/postpone.c mutt-1.5.10/postpone.c
---- mutt-1.5.10.orig/postpone.c 2005-02-03 19:47:53.000000000 +0100
-+++ mutt-1.5.10/postpone.c 2005-10-07 09:30:06.000000000 +0200
-@@ -279,6 +279,9 @@
- /* 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;
-
+++ /dev/null
---- crypt-autoselectkey/PATCHES Dec 2002 17:44:54 -0000 3.6
-+++ crypt-autoselectkey/PATCHES Feb 2004 13:19:46 -0000
-@@ -0,0 +1 @@
-+patch-1.5.6.dw.crypt-autoselectkey.1
---- crypt-autoselectkey/init.h Feb 2004 17:10:43 -0000 3.43
-+++ crypt-autoselectkey/init.h Feb 2004 13:19:46 -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 },
---- crypt-autoselectkey/mutt.h Feb 2004 17:10:43 -0000 3.23
-+++ crypt-autoselectkey/mutt.h Feb 2004 13:19:46 -0000
-@@ -431,2 +431,3 @@ enum
-
-+ OPTCRYPTAUTOSELECT,
- OPTCRYPTAUTOSIGN,
---- crypt-autoselectkey/pgpkey.c Oct 2003 19:55:39 -0000 3.8
-+++ crypt-autoselectkey/pgpkey.c Feb 2004 13:19:46 -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]))
- {
+++ /dev/null
---- mutt-1.3.23-orig/mutt_menu.h Sun Oct 28 19:35:26 2001
-+++ mutt-1.3.23/mutt_menu.h Tue Oct 30 16:45:06 2001
-@@ -45,6 +45,7 @@
- int menu; /* menu definition for keymap entries. */
- int offset; /* which screen row to start the index */
- int pagelen; /* number of entries per screen */
-+ int columns; /* number of columns in menu */
- int tagprefix;
-
- /* Setting dialog != NULL overrides normal menu behaviour.
---- mutt-1.3.23-orig/init.h Sun Oct 28 19:35:26 2001
-+++ mutt-1.3.23/init.h Tue Oct 30 22:49:46 2001
-@@ -499,6 +499,12 @@
- ** you use `+' or `=' for any other variables since expansion takes place
- ** during the `set' command.
- */
-+ { "folder_columns", DT_NUM, R_NONE, UL &FolderColumns, UL 1 },
-+ /*
-+ ** .pp
-+ ** Specifies the number of folder columns in folder browser.
-+ **
-+ */
- { "folder_format", DT_STR, R_INDEX, UL &FolderFormat, UL "%2C %t %N %F %2l %-8.8u %-8.8g %8s %d %f" },
- /*
- ** .pp
---- mutt-1.3.23-orig/globals.h Sun Oct 28 19:35:26 2001
-+++ mutt-1.3.23/globals.h Tue Oct 30 22:44:42 2001
-@@ -138,6 +138,7 @@
- WHERE unsigned short Counter INITVAL (0);
-
- WHERE short ConnectTimeout;
-+WHERE short FolderColumns;
- WHERE short HistSize;
- WHERE short PagerContext;
- WHERE short PagerIndexLines;
---- mutt-1.3.23-orig/browser.c Sun Oct 28 19:35:26 2001
-+++ mutt-1.3.23/browser.c Tue Oct 30 22:44:18 2001
-@@ -492,12 +492,13 @@
- }
-
- static void init_menu (struct browser_state *state, MUTTMENU *menu, char *title,
-- size_t titlelen, int buffy)
-+ size_t titlelen, int buffy, int columns)
- {
- char path[_POSIX_PATH_MAX];
-
- menu->max = state->entrylen;
--
-+ menu->columns = columns;
-+
- if(menu->current >= menu->max)
- menu->current = menu->max - 1;
- if (menu->current < 0)
-@@ -660,7 +661,7 @@
- menu->help = mutt_compile_help (helpstr, sizeof (helpstr), MENU_FOLDER,
- FolderHelp);
-
-- init_menu (&state, menu, title, sizeof (title), buffy);
-+ init_menu (&state, menu, title, sizeof (title), buffy, FolderColumns);
-
- FOREVER
- {
-@@ -791,7 +792,7 @@
- }
- menu->current = 0;
- menu->top = 0;
-- init_menu (&state, menu, title, sizeof (title), buffy);
-+ init_menu (&state, menu, title, sizeof (title), buffy, 1);
- break;
- }
- }
-@@ -890,7 +891,7 @@
- menu->data = state.entry;
- menu->current = 0;
- menu->top = 0;
-- init_menu (&state, menu, title, sizeof (title), buffy);
-+ init_menu (&state, menu, title, sizeof (title), buffy, 1);
- MAYBE_REDRAW (menu->redraw);
- }
- /* else leave error on screen */
-@@ -949,7 +950,7 @@
- sizeof (struct folder_file) * (state.entrylen - (nentry+1)));
- state.entrylen--;
- mutt_message _("Mailbox deleted.");
-- init_menu (&state, menu, title, sizeof (title), buffy);
-+ init_menu (&state, menu, title, sizeof (title), buffy, 1);
- MAYBE_REDRAW (menu->redraw);
- }
- }
-@@ -990,7 +991,7 @@
- menu->data = state.entry;
- menu->current = 0;
- menu->top = 0;
-- init_menu (&state, menu, title, sizeof (title), buffy);
-+ init_menu (&state, menu, title, sizeof (title), buffy, 1);
- }
- else
- #endif
-@@ -1021,7 +1022,7 @@
- }
- menu->current = 0;
- menu->top = 0;
-- init_menu (&state, menu, title, sizeof (title), buffy);
-+ init_menu (&state, menu, title, sizeof (title), buffy, 1);
- }
- else
- mutt_error (_("%s is not a directory."), buf);
-@@ -1078,12 +1079,12 @@
- imap_browse (LastDir, &state);
- browser_sort (&state);
- menu->data = state.entry;
-- init_menu (&state, menu, title, sizeof (title), buffy);
-+ init_menu (&state, menu, title, sizeof (title), buffy, 1);
- }
- else
- #endif
- if (examine_directory (menu, &state, LastDir, NULL) == 0)
-- init_menu (&state, menu, title, sizeof (title), buffy);
-+ init_menu (&state, menu, title, sizeof (title), buffy, 1);
- else
- {
- mutt_error _("Error scanning directory.");
-@@ -1168,7 +1169,7 @@
- #endif
- else if (examine_directory (menu, &state, LastDir, prefix) == -1)
- goto bail;
-- init_menu (&state, menu, title, sizeof (title), buffy);
-+ init_menu (&state, menu, title, sizeof (title), buffy, 1);
- break;
-
- case OP_BUFFY_LIST:
---- mutt-1.3.23-orig/menu.c Sun Oct 28 19:35:26 2001
-+++ mutt-1.3.23/menu.c Wed Oct 31 09:30:28 2001
-@@ -126,14 +126,14 @@
- menu->make_entry (s, l, menu, i);
- }
-
--void menu_pad_string (char *s, size_t l)
-+void menu_pad_string (MUTTMENU *menu, char *s, size_t l)
- {
- size_t n = mutt_strlen (s);
- int shift = option (OPTARROWCURSOR) ? 3 : 0;
-
- l--; /* save room for the terminal \0 */
-- if (l > COLS - shift)
-- l = COLS - shift;
-+ if (l > (COLS / menu->columns) - shift)
-+ l = (COLS / menu->columns) - shift;
-
- /* Let's just pad the string anyway ... */
- mutt_format_string (s, INT_MAX, l, l, 0, ' ', s, n, 1);
-@@ -191,69 +191,89 @@
- menu->redraw &= ~REDRAW_STATUS;
- }
-
--void menu_redraw_index (MUTTMENU *menu)
-+void menu_item_pos(MUTTMENU *menu, int item, int *row, int *col)
- {
-- char buf[STRING];
-- int i;
--
-- for (i = menu->top; i < menu->top + menu->pagelen; i++)
-- {
-- if (i < menu->max)
-- {
-- menu_make_entry (buf, sizeof (buf), menu, i);
-- menu_pad_string (buf, sizeof (buf));
-+ *row = (item - menu->top) % menu->pagelen;
-+ *col = (item - menu->top) / menu->pagelen;
-+}
-
-- if (option (OPTARROWCURSOR))
-- {
-- attrset (menu->color (i));
-- CLEARLINE (i - menu->top + menu->offset);
-+void menu_redraw_index (MUTTMENU *menu)
-+{
-+ char buf[STRING];
-+ int i;
-+ int row, col;
-
-- if (i == menu->current)
-+ for (i = menu->top; i < menu->top + (menu->pagelen * menu->columns); i++)
- {
-- SETCOLOR (MT_COLOR_INDICATOR);
-- addstr ("->");
-- attrset (menu->color (i));
-- addch (' ');
-+ menu_item_pos(menu, i, &row, &col);
-+ if (i < menu->max)
-+ {
-+ menu_make_entry (buf, sizeof (buf), menu, i);
-+ menu_pad_string (menu, buf, sizeof (buf));
-+
-+ if (option (OPTARROWCURSOR))
-+ {
-+ attrset (menu->color (i));
-+
-+ move(menu->offset + row, col * (COLS / menu->columns));
-+
-+ if (i == menu->current)
-+ {
-+ SETCOLOR (MT_COLOR_INDICATOR);
-+ addstr ("->");
-+ attrset (menu->color (i));
-+ addch (' ');
-+ }
-+ else
-+ move(row + menu->offset, col * COLS / menu->columns + 3);
-+
-+ print_enriched_string (menu->color(i), (unsigned char *) buf,
-+ 1);
-+ SETCOLOR (MT_COLOR_NORMAL);
-+ }
-+ else
-+ { /* !option(OPTARROWCURSOR) */
-+ if (i == menu->current)
-+ {
-+ SETCOLOR (MT_COLOR_INDICATOR);
-+ BKGDSET (MT_COLOR_INDICATOR);
-+ }
-+ else
-+ attrset (menu->color (i));
-+
-+ move(row + menu->offset, col * (COLS / menu->columns));
-+
-+ print_enriched_string (menu->color(i), (unsigned char *) buf,
-+ i != menu->current);
-+
-+ SETCOLOR (MT_COLOR_NORMAL);
-+ BKGDSET (MT_COLOR_NORMAL);
-+ }
-+ }
-+ else
-+ {
-+ if (col == 0)
-+ {
-+ move(row + menu->offset, col); clrtoeol();
-+ }
-+ }
- }
-- else
-- move (i - menu->top + menu->offset, 3);
--
-- print_enriched_string (menu->color(i), (unsigned char *) buf, 1);
-- SETCOLOR (MT_COLOR_NORMAL);
-- }
-- else
-- {
-- if (i == menu->current)
-- {
-- SETCOLOR (MT_COLOR_INDICATOR);
-- BKGDSET (MT_COLOR_INDICATOR);
-- }
-- else
-- attrset (menu->color (i));
--
-- 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;
-+ menu->redraw = 0;
- }
-
- void menu_redraw_motion (MUTTMENU *menu)
- {
-- char buf[STRING];
--
-+ char buf[STRING];
-+ int row, col;
-+
- if (menu->dialog)
- {
- menu->redraw &= ~REDRAW_MOTION;
- return;
- }
--
-- move (menu->oldcurrent + menu->offset - menu->top, 0);
-+
-+ menu_item_pos(menu, menu->oldcurrent, &row, &col);
-+ move(row + menu->offset, col * (COLS / menu->columns));
- SETCOLOR (MT_COLOR_NORMAL);
- BKGDSET (MT_COLOR_NORMAL);
-
-@@ -265,16 +285,18 @@
-
- if (menu->redraw & REDRAW_MOTION_RESYNCH)
- {
-- clrtoeol ();
-+ move(row + menu->offset, col * (COLS / menu->columns));
- menu_make_entry (buf, sizeof (buf), menu, menu->oldcurrent);
-- menu_pad_string (buf, sizeof (buf));
-- move (menu->oldcurrent + menu->offset - menu->top, 3);
-+ menu_pad_string (menu, buf, sizeof (buf));
-+ move(row + menu->offset, col * COLS / menu->columns + 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);
-+
-+ menu_item_pos(menu, menu->current, &row, &col);
-+ move(row + menu->offset, col * COLS / menu->columns);
- SETCOLOR (MT_COLOR_INDICATOR);
- addstr ("->");
- SETCOLOR (MT_COLOR_NORMAL);
-@@ -283,17 +305,19 @@
- {
- /* erase the current indicator */
- attrset (menu->color (menu->oldcurrent));
-- clrtoeol ();
-+ move(row + menu->offset, col * (COLS / menu->columns));
- menu_make_entry (buf, sizeof (buf), menu, menu->oldcurrent);
-- menu_pad_string (buf, sizeof (buf));
-+ menu_pad_string (menu, buf, sizeof (buf));
- print_enriched_string (menu->color(menu->oldcurrent), (unsigned char *) buf, 1);
-
-+
-+ menu_item_pos(menu, menu->current, &row, &col);
- /* now draw the new one to reflect the change */
- menu_make_entry (buf, sizeof (buf), menu, menu->current);
-- menu_pad_string (buf, sizeof (buf));
-+ menu_pad_string (menu, buf, sizeof (buf));
- SETCOLOR (MT_COLOR_INDICATOR);
- BKGDSET (MT_COLOR_INDICATOR);
-- CLEARLINE (menu->current - menu->top + menu->offset);
-+ move(row + menu->offset, col * (COLS / menu->columns));
- print_enriched_string (menu->color(menu->current), (unsigned char *) buf, 0);
- SETCOLOR (MT_COLOR_NORMAL);
- BKGDSET (MT_COLOR_NORMAL);
-@@ -304,21 +328,22 @@
- void menu_redraw_current (MUTTMENU *menu)
- {
- char buf[STRING];
-+ int row, col;
-
-- move (menu->current + menu->offset - menu->top, 0);
- menu_make_entry (buf, sizeof (buf), menu, menu->current);
-- menu_pad_string (buf, sizeof (buf));
-+ menu_pad_string (menu, buf, sizeof (buf));
-
-+ menu_item_pos(menu, menu->current, &row, &col);
- if (option (OPTARROWCURSOR))
- {
- int attr = menu->color (menu->current);
- attrset (attr);
-- clrtoeol ();
-+ move(row + menu->offset, col * (COLS / menu->columns));
- SETCOLOR (MT_COLOR_INDICATOR);
- addstr ("->");
- attrset (attr);
- addch (' ');
-- menu_pad_string (buf, sizeof (buf));
-+ menu_pad_string (menu, buf, sizeof (buf));
- print_enriched_string (menu->color(menu->current), (unsigned char *) buf, 1);
- SETCOLOR (MT_COLOR_NORMAL);
- }
-@@ -326,7 +351,7 @@
- {
- SETCOLOR (MT_COLOR_INDICATOR);
- BKGDSET (MT_COLOR_INDICATOR);
-- clrtoeol ();
-+ move(row + menu->offset, col * (COLS / menu->columns));
- print_enriched_string (menu->color(menu->current), (unsigned char *) buf, 0);
- SETCOLOR (MT_COLOR_NORMAL);
- BKGDSET (MT_COLOR_NORMAL);
-@@ -355,18 +380,18 @@
-
- void menu_check_recenter (MUTTMENU *menu)
- {
-- if (menu->max <= menu->pagelen && menu->top != 0)
-+ if (menu->max <= menu->pagelen * menu->columns && menu->top != 0)
- {
- menu->top = 0;
- set_option (OPTNEEDREDRAW);
- menu->redraw |= REDRAW_INDEX;
- }
-- else if (menu->current >= menu->top + menu->pagelen)
-+ else if (menu->current >= menu->top + menu->pagelen * menu->columns)
- {
- if (option (OPTMENUSCROLL) || (menu->pagelen <= 0))
-- menu->top = menu->current - menu->pagelen + 1;
-+ menu->top = menu->current - menu->pagelen * menu->columns + 1;
- else
-- menu->top += menu->pagelen * ((menu->current - menu->top) / menu->pagelen);
-+ menu->top += menu->pagelen * menu->columns * ((menu->current - menu->top) / (menu->pagelen * menu->columns));
- menu->redraw |= REDRAW_INDEX;
- }
- else if (menu->current < menu->top)
-@@ -375,7 +400,7 @@
- menu->top = menu->current;
- else
- {
-- menu->top -= menu->pagelen * ((menu->top + menu->pagelen - 1 - menu->current) / menu->pagelen);
-+ menu->top -= menu->pagelen * menu->columns * ((menu->top + menu->pagelen - 1 - menu->current) / menu->pagelen);
- if (menu->top < 0)
- menu->top = 0;
- }
-@@ -666,6 +691,7 @@
- p->pagelen = PAGELEN;
- p->color = default_color;
- p->search = menu_search_generic;
-+ p->columns = 1;
- return (p);
- }
-
+++ /dev/null
---- mutt-1.5.15/Makefile.am.orig 2007-06-03 12:32:52.028633000 +0200
-+++ mutt-1.5.15/Makefile.am 2007-06-03 13:05:48.801283592 +0200
-@@ -138,9 +138,9 @@
- rm -f $(DESTDIR)$(bindir)/mutt.dotlock ; \
- ln -sf $(DESTDIR)$(bindir)/mutt_dotlock $(DESTDIR)$(bindir)/mutt.dotlock ; \
- fi
-- if test -f $(DESTDIR)$(bindir)/mutt_dotlock && test x@DOTLOCK_GROUP@ != x ; then \
-- chgrp @DOTLOCK_GROUP@ $(DESTDIR)$(bindir)/mutt_dotlock && \
-- chmod @DOTLOCK_PERMISSION@ $(DESTDIR)$(bindir)/mutt_dotlock || \
-+ if test -f $(DESTDIR)$(bindir)/mutt_dotlock && test x$(DOTLOCK_GROUP) != x ; then \
-+ chgrp $(DOTLOCK_GROUP) $(DESTDIR)$(bindir)/mutt_dotlock && \
-+ chmod $(DOTLOCK_PERMISSION) $(DESTDIR)$(bindir)/mutt_dotlock || \
- { echo "Can't fix mutt_dotlock's permissions!" >&2 ; exit 1 ; } \
- fi
-
+++ /dev/null
-diff -Nur mutt-1.5.11.orig/configure.ac mutt-1.5.11/configure.ac
---- mutt-1.5.11.orig/configure.ac 2006-05-11 23:23:13.000000000 +0200
-+++ mutt-1.5.11/configure.ac 2006-05-12 00:58:13.000000000 +0200
-@@ -816,6 +816,32 @@
- fi])
- dnl -- end cache --
-
-+dnl -- home-etc --
-+AC_ARG_WITH(home-etc, [ --with-home-etc[=PFX] Use HOME-ETC library to allow user keeping it's configuration files in a non-standard place ],
-+ [
-+ if test "$with_home_etc" != "no"
-+ then
-+ if test "$with_home_etc" != "yes"
-+ then
-+ LDFLAGS="$LDFLAGS -L$with_home_etc/lib"
-+ fi
-+
-+ saved_LIBS="$LIBS"
-+
-+ AC_CHECK_LIB(home_etc, get_home_etc_static,,
-+ AC_MSG_ERROR([could not find libhome_etc]),)
-+
-+ AC_CHECK_HEADERS(home_etc.h)
-+
-+ MUTTLIBS="$MUTTLIBS -lhome_etc"
-+ LIBS="$saved_LIBS"
-+ AC_DEFINE(USE_HOME_ETC,1,
-+ [ Define if want to use the HOME-ETC library. ])
-+ need_home_etc=yes
-+ fi
-+ ])
-+AM_CONDITIONAL(USE_HOME_ETC, test x$need_home_etc = xyes)
-+
- if test "$need_md5" = "yes"
- then
- MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS md5c.o"
-diff -Nur mutt-1.5.11.orig/doc/mutt.man mutt-1.5.11/doc/mutt.man
---- mutt-1.5.11.orig/doc/mutt.man 2005-08-18 21:38:54.000000000 +0200
-+++ mutt-1.5.11/doc/mutt.man 2006-05-12 00:58:13.000000000 +0200
-@@ -122,6 +122,8 @@
- .IP "MAILDIR"
- Full path of the user's spool mailbox if MAIL is unset. Commonly used when the spool
- mailbox is a
-+.IP "HOME_ETC"
-+Path to alternative configuration directory.
- .B maildir (5)
- folder.
- .IP "MAILCAPS"
-@@ -138,17 +140,17 @@
- Specifies the editor to use when composing messages.
- .SH FILES
- .PP
--.IP "~/.muttrc or ~/.mutt/muttrc"
-+.IP "$HOME_ETC/.muttrc" or "$HOME_ETC/.mutt/muttrc" or "~/.muttrc" or "~/.mutt/muttrc"
- User configuration file.
- .IP "@sysconfdir@/Muttrc"
- System-wide configuration file.
- .IP "/tmp/muttXXXXXX"
- Temporary files created by Mutt.
--.IP "~/.mailcap"
-+.IP "~/.mailcap or $HOME_ETC/.mailcap"
- User definition for handling non-text MIME types.
- .IP "@sysconfdir@/mailcap"
- System definition for handling non-text MIME types.
--.IP "~/.mime.types"
-+.IP "~/.mime.types or $HOME_ETC/.mime.types"
- User's personal mapping between MIME types and file extensions.
- .IP "@sysconfdir@/mime.types"
- System mapping between MIME types and file extensions.
-diff -Nur mutt-1.5.11.orig/init.c mutt-1.5.11/init.c
---- mutt-1.5.11.orig/init.c 2006-05-11 23:23:13.000000000 +0200
-+++ mutt-1.5.11/init.c 2006-05-12 00:58:40.000000000 +0200
-@@ -35,7 +35,12 @@
- #include "mutt_ssl.h"
- #endif
-
--
-+#ifdef HAVE_HOME_ETC_H
-+# include <home_etc.h>
-+# define H_CFDIR _HEdir
-+#else
-+# define H_CFDIR Homedir
-+#endif
-
- #include "mx.h"
- #include "init.h"
-@@ -2334,7 +2339,21 @@
- else
- {
- /* Default search path from RFC1524 */
-- MailcapPath = safe_strdup ("~/.mailcap:" PKGDATADIR "/mailcap:" SYSCONFDIR "/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap");
-+
-+#define MAILCAPPATHS "~/.mailcap:" PKGDATADIR "/mailcap:" SYSCONFDIR "/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap"
-+#ifdef HAVE_HOME_ETC_H
-+
-+ MailcapPath = safe_malloc (mutt_strlen (MAILCAPPATHS) + mutt_strlen (_HEdir) + 2);
-+ if (_HEdir != NULL && (mutt_strlen (_HEdir)) > 0)
-+ sprintf (MailcapPath, "%s:%s", _HEdir, MAILCAPPATHS); /* __SPRINTF_CHECKED__ */
-+ else
-+ strcpy (MailcapPath, MAILCAPPATHS); /* __SPRCPY_CHECKED__ */
-+
-+#else
-+
-+ MailcapPath = safe_strdup (MAILCAPPATHS);
-+
-+#endif
- }
-
- Tempdir = safe_strdup ((p = getenv ("TMPDIR")) ? p : "/tmp");
-@@ -2981,15 +2981,15 @@
-
- if (!Muttrc)
- {
-- snprintf (buffer, sizeof(buffer), "%s/.muttrc-%s", NONULL(Homedir), MUTT_VERSION);
-+ snprintf (buffer, sizeof(buffer), "%s/.muttrc-%s", NONULL(H_CFDIR), MUTT_VERSION);
- if (access(buffer, F_OK) == -1)
-- snprintf (buffer, sizeof(buffer), "%s/.muttrc", NONULL(Homedir));
-+ snprintf (buffer, sizeof(buffer), "%s/.muttrc", NONULL(H_CFDIR));
- if (access(buffer, F_OK) == -1)
-- snprintf (buffer, sizeof (buffer), "%s/.mutt/muttrc-%s", NONULL(Homedir), MUTT_VERSION);
-+ snprintf (buffer, sizeof (buffer), "%s/.mutt/muttrc-%s", NONULL(H_CFDIR), MUTT_VERSION);
- if (access(buffer, F_OK) == -1)
-- snprintf (buffer, sizeof (buffer), "%s/.mutt/muttrc", NONULL(Homedir));
-+ snprintf (buffer, sizeof (buffer), "%s/.mutt/muttrc", NONULL(H_CFDIR));
- if (access(buffer, F_OK) == -1) /* default to .muttrc for alias_file */
-- snprintf (buffer, sizeof(buffer), "%s/.muttrc", NONULL(Homedir));
-+ snprintf (buffer, sizeof(buffer), "%s/.muttrc", NONULL(H_CFDIR));
-
- default_rc = 1;
- Muttrc = safe_strdup (buffer);
-@@ -2526,10 +2545,10 @@
- }
-
- uname (&u);
-- pathlen = strlen (Homedir) + sizeof("/.slrnfaces/")
-+ pathlen = strlen (H_CFDIR) + sizeof("/.slrnfaces/")
- + strlen (u.nodename) + 30;
- fifo = safe_malloc (pathlen);
-- sprintf (fifo, "%s/.slrnfaces", Homedir);
-+ sprintf (fifo, "%s/.slrnfaces", H_CFDIR);
- if (mkdir (fifo, 0700))
- {
- if (errno != EEXIST)
-@@ -2544,7 +2563,7 @@
- FILE *fp;
-
- /* We'll abuse fifo filename memory here. It's long enough. */
-- sprintf (fifo, "%s/.slrnfaces/README", Homedir);
-+ sprintf (fifo, "%s/.slrnfaces/README", H_CFDIR);
- if ((fp = fopen (fifo, "w")) != NULL)
- {
- fputs (_(
-@@ -2560,7 +2579,7 @@
- }
- }
-
-- status = snprintf (fifo, pathlen, "%s/.slrnfaces/%s.%ld", Homedir,
-+ status = snprintf (fifo, pathlen, "%s/.slrnfaces/%s.%ld", H_CFDIR,
- u.nodename, (long)getpid());
- if (status < 0)
- goto clean_face;
-diff -Nur mutt-1.5.11.orig/mutt_ssl.c mutt-1.5.11/mutt_ssl.c
---- mutt-1.5.11.orig/mutt_ssl.c 2005-08-03 11:17:46.000000000 +0200
-+++ mutt-1.5.11/mutt_ssl.c 2006-05-12 00:58:13.000000000 +0200
-@@ -58,6 +58,13 @@
- #define HAVE_ENTROPY() (!access(DEVRANDOM, R_OK) || entropy_byte_count >= 16)
- #endif
-
-+#ifdef HAVE_HOME_ETC_H
-+# include <home_etc.h>
-+# define H_CFDIR _HEdir
-+#else
-+# define H_CFDIR Homedir
-+#endif
-+
- /* keep a handle on accepted certificates in case we want to
- * open up another connection to the same server in this session */
- static STACK_OF(X509) *SslSessionCerts = NULL;
-@@ -162,7 +169,7 @@
- /* load entropy from egd sockets */
- #ifdef HAVE_RAND_EGD
- add_entropy (getenv ("EGDSOCKET"));
-- snprintf (path, sizeof(path), "%s/.entropy", NONULL(Homedir));
-+ snprintf (path, sizeof(path), "%s/.entropy", NONULL(H_CFDIR));
- add_entropy (path);
- add_entropy ("/tmp/entropy");
- #endif
-diff -Nur mutt-1.5.11.orig/sendlib.c mutt-1.5.11/sendlib.c
---- mutt-1.5.11.orig/sendlib.c 2006-05-11 23:23:13.000000000 +0200
-+++ mutt-1.5.11/sendlib.c 2006-05-12 00:58:13.000000000 +0200
-@@ -45,6 +45,13 @@
- #include <sys/wait.h>
- #include <fcntl.h>
-
-+#ifdef HAVE_HOME_ETC_H
-+# include <home_etc.h>
-+# define H_CFDIR _HEdir
-+#else
-+# define H_CFDIR Homedir
-+#endif
-+
- #ifdef HAVE_SYSEXITS_H
- #include <sysexits.h>
- #else /* Make sure EX_OK is defined <philiph@pobox.com> */
-@@ -908,9 +915,9 @@
-
- /* Given a file with path ``s'', see if there is a registered MIME type.
- * returns the major MIME type, and copies the subtype to ``d''. First look
-- * for ~/.mime.types, then look in a system mime.types if we can find one.
-- * The longest match is used so that we can match `ps.gz' when `gz' also
-- * exists.
-+ * for either $HOME_ETC/.mime.types or ~/.mime.types, then look in a system
-+ * mime.types if we can find one. The longest match is used so that we can
-+ * match `ps.gz' when `gz' also exists.
- */
-
- int mutt_lookup_mime_type (BODY *att, const char *path)
-@@ -939,7 +946,7 @@
- switch (count)
- {
- case 0:
-- snprintf (buf, sizeof (buf), "%s/.mime.types", NONULL(Homedir));
-+ snprintf (buf, sizeof (buf), "%s/.mime.types", NONULL(H_CFDIR));
- break;
- case 1:
- strfcpy (buf, SYSCONFDIR"/mime.types", sizeof(buf));
+++ /dev/null
---- mutt-1.5.17/imap/util.c.orig 2007-04-12 22:44:40.000000000 +0200
-+++ mutt-1.5.17/imap/util.c 2007-11-13 15:57:52.000000000 +0100
-@@ -262,13 +262,44 @@
- return 0;
- }
-
--/* silly helper for mailbox name string comparisons, because of INBOX */
-+/* Silly helper for mailbox name string comparisons, because of INBOX
-+ * and different folder delimiters. Warning: unlike strcmp this funtion
-+ * won't tell which mailbox is 'greater'. */
- int imap_mxcmp (const char* mx1, const char* mx2)
- {
-+ int result;
-+ int i,j;
-+ char c1,c2;
-+
- if (!ascii_strcasecmp (mx1, "INBOX") && !ascii_strcasecmp (mx2, "INBOX"))
- return 0;
--
-- return mutt_strcmp (mx1, mx2);
-+
-+ result = mutt_strcmp (mx1, mx2);
-+
-+ if (result == 0 || !ImapDelimChars || !ImapDelimChars[0]) {
-+ /* exactly equal or no ImapDelimChars -- we are done */
-+ return 0;
-+ }
-+
-+ if (!mx1 || !mx2) return 1;
-+
-+ /* compare with normalized delimiters
-+ * (so "INBOX.something" equals "INBOX./something") */
-+ for(i=0,j=0; mx1[i] && mx2[j]; i++, j++) {
-+ c1 = mx1[i];
-+ c2 = mx2[j];
-+ if (strchr(ImapDelimChars, c1)) {
-+ c1 = ImapDelimChars[0];
-+ while(mx1[i+1] && strchr(ImapDelimChars, mx1[i+1])) i+=1;
-+ }
-+ if (strchr(ImapDelimChars, c2)) {
-+ c2 = ImapDelimChars[0];
-+ while(mx2[j+1] && strchr(ImapDelimChars, mx2[j+1])) j+=1;
-+ }
-+ if (c1 != c2) return 1;
-+ }
-+ if (mx1[i] || mx2[j]) return 1;
-+ return 0;
- }
-
- /* imap_pretty_mailbox: called by mutt_pretty_mailbox to make IMAP paths
+++ /dev/null
---- mutt-1.5.17/imap/browse.c.orig 2007-05-29 01:19:39.000000000 +0200
-+++ mutt-1.5.17/imap/browse.c 2007-11-13 16:04:18.000000000 +0100
-@@ -230,7 +230,7 @@
-
- if ((status = imap_mboxcache_get (idata, mx.mbox, 0)))
- {
-- state->new = status->unseen;
-+ state->new = status->recent;
- state->messages = status->messages;
- }
-
+++ /dev/null
---- mutt-1.5.18/doc/Muttrc.head.in.orig 2006-08-23 22:29:05.494260250 +0200
-+++ mutt-1.5.18/doc/Muttrc.head 2006-08-23 22:29:30.383815750 +0200
-@@ -15,7 +15,7 @@
- macro attach,compose \cb "<pipe-entry> urlview<Enter>" "call urlview to extract URLs out of a message"
-
- # Show documentation when pressing F1
--macro generic,pager <F1> "<shell-escape> less @docdir@/manual.txt<Enter>" "show Mutt documentation"
-+macro generic,pager <F1> "<shell-escape> less @docdir@/manual.txt.gz<Enter>" "show Mutt documentation"
-
- # show the incoming mailboxes list (just like "mutt -y") and back when pressing "y"
- macro index,pager y "<change-folder>?<toggle-mailboxes>" "show incoming mailboxes list"
+++ /dev/null
---- mutt-1.2.5/muttbug.sh.in.foo Mon May 14 10:09:57 2001
-+++ mutt-1.2.5/muttbug.sh.in Mon May 14 10:12:41 2001
-@@ -85,13 +85,8 @@
- exec > /dev/tty
- exec < /dev/tty
-
--SCRATCH=${TMPDIR-/tmp}/`basename $0`.`hostname`.$$
--
--mkdir ${SCRATCH} || \
--{
-- echo "`basename $0`: Can't create temporary directory." >& 2 ;
-- exit 1 ;
--}
-+TMP=${TMPDIR-/tmp}/`basename $0`.`hostname`
-+SCRATCH=`mktemp -d $TMP.XXXXXX || exit 1`
-
- trap "rm -r -f ${SCRATCH} ; trap '' 0 ; exit" 0 1 2
-
+++ /dev/null
-diff -urN mutt-1.3.27.orig/browser.c mutt-1.3.27/browser.c
---- mutt-1.3.27.orig/browser.c Tue Dec 18 16:12:48 2001
-+++ mutt-1.3.27/browser.c Mon Feb 4 00:40:48 2002
-@@ -388,6 +388,10 @@
-
- while ((de = readdir (dp)) != NULL)
- {
-+ /* It can happen because of broken VFAT driver. */
-+ if (mutt_strcmp (de->d_name, "") == 0)
-+ continue;
-+
- if (mutt_strcmp (de->d_name, ".") == 0)
- continue; /* we don't need . */
-
+++ /dev/null
---- mutt-1.5.20/po/pl.po.b 2009-06-14 20:54:05.000000000 +0200
-+++ mutt-1.5.20/po/pl.po 2009-07-14 12:30:26.000000000 +0200
-@@ -2,6 +2,8 @@
- # Polskie teksty dla Mutta 1.x
- # 1998-2006 Pawe³ Dziekoñski
- # 1998-2002 Sergiusz Paw³owicz
-+# 2005-2008 Jakub Bogusz
-+# 2007-2009 Adam Go³êbiowski
- # Pre-translation has bean done using PePeSza,
- # get it from http://home.elka.pw.edu.pl/~pkolodz2/pepesza.html
- #
-@@ -96,18 +98,16 @@
- msgstr "Zapisz do pliku: "
-
- #: alias.c:361
--#, fuzzy
- msgid "Error reading alias file"
--msgstr "B³±d podczas próby przegl±dania pliku"
-+msgstr "B³±d podczas odczytu pliku aliasów"
-
- #: alias.c:383
- msgid "Alias added."
- msgstr "Alias dodany."
-
- #: alias.c:391
--#, fuzzy
- msgid "Error seeking in alias file"
--msgstr "B³±d podczas próby przegl±dania pliku"
-+msgstr "B³±d podczas przemieszczania po pliku aliasów"
-
- #: attach.c:113 attach.c:245 attach.c:477 attach.c:973
- msgid "Can't match nametemplate, continue?"
-@@ -890,12 +890,11 @@
-
- #: crypt-gpgme.c:1286
- msgid "aka: "
--msgstr ""
-+msgstr "aka: "
-
- #: crypt-gpgme.c:1297
--#, fuzzy
- msgid "created: "
--msgstr "Utworzyæ %s?"
-+msgstr "utworzony: "
-
- #: crypt-gpgme.c:1362
- msgid "Error getting key information: "
-@@ -906,24 +905,20 @@
- #. fingerprint and the key validity (which is neither fully or
- #. ultimate).
- #: crypt-gpgme.c:1369 crypt-gpgme.c:1384
--#, fuzzy
- msgid "Good signature from:"
- msgstr "Poprawny podpis z³o¿ony przez: "
-
- #: crypt-gpgme.c:1376
--#, fuzzy
- msgid "*BAD* signature from:"
--msgstr "Poprawny podpis z³o¿ony przez: "
-+msgstr "*Z£Y* podpis z³o¿ony przez: "
-
- #: crypt-gpgme.c:1392
--#, fuzzy
- msgid "Problem signature from:"
--msgstr "Poprawny podpis z³o¿ony przez: "
-+msgstr "Problematyczny podpis z³o¿ony przez: "
-
- #: crypt-gpgme.c:1393
--#, fuzzy
- msgid " expires: "
--msgstr " aka: "
-+msgstr " wygasa: "
-
- #. Note: We don't need a current time output because GPGME avoids
- #. such an attack by separating the meta information from the
-@@ -964,9 +959,9 @@
- "\n"
-
- #: crypt-gpgme.c:2079
--#, fuzzy, c-format
-+#, c-format
- msgid "Error extracting key data!\n"
--msgstr "B³±d sprawdzania klucza: "
-+msgstr "B³±d podczas pobierania danych o kluczu!\n"
-
- #: crypt-gpgme.c:2262
- #, c-format
-@@ -1863,9 +1858,8 @@
- msgstr "[-- Typ: %s/%s, Kodowanie: %s, Wielko¶æ: %s --]\n"
-
- #: handler.c:1204
--#, fuzzy
- msgid "One or more parts of this message could not be displayed"
--msgstr "Ostrze¿enie: fragment tej wiadomo¶ci nie zosta³ podpisany."
-+msgstr "Ostrze¿enie: co najmniej jeden fragment wiadomo¶ci nie móg³ byæ wy¶wietlony"
-
- #: handler.c:1256
- #, c-format
-@@ -1947,7 +1941,6 @@
- msgstr "Nie mo¿na otworzyæ pliku tymczasowego!"
-
- #: handler.c:1723
--#, fuzzy
- msgid "[-- This is an attachment "
- msgstr "[-- Ten za³±cznik typu %s/%s "
-
-@@ -2117,9 +2110,9 @@
- msgstr "Skrzynka zosta³a zamkniêta"
-
- #: imap/imap.c:126
--#, fuzzy, c-format
-+#, c-format
- msgid "CREATE failed: %s"
--msgstr "SSL nie powiod³o siê: %s"
-+msgstr "Polecenie CREATE nie powiod³o siê: %s"
-
- #: imap/imap.c:190
- #, c-format
-@@ -2361,9 +2354,9 @@
- msgstr "%s nie jest ustawiony"
-
- #: init.c:1909
--#, fuzzy, c-format
-+#, c-format
- msgid "Invalid value for option %s: \"%s\""
--msgstr "Niew³a¶ciwy dzieñ miesi±ca: %s"
-+msgstr "Niew³a¶ciwy warto¶æ dla opcji %s: \"%s\""
-
- #: init.c:2046
- #, c-format
-@@ -2527,14 +2520,13 @@
- "Aby zg³osiæ b³±d, odwied¼ stronê http://bugs.mutt.org/.\n"
-
- #: main.c:67
--#, fuzzy
- msgid ""
- "Copyright (C) 1996-2009 Michael R. Elkins and others.\n"
- "Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.\n"
- "Mutt is free software, and you are welcome to redistribute it\n"
- "under certain conditions; type `mutt -vv' for details.\n"
- msgstr ""
--"Copyright (C) 1996-2007 Michael R. Elkins i inni.\n"
-+"Copyright (C) 1996-2009 Michael R. Elkins i inni.\n"
- "Program nie jest objêty ¯ADN¡ gwarancj±; szczegó³y poznasz pisz±c 'mutt -"
- "vv'.\n"
- "Mutt jest darmowym oprogramowaniem, zapraszamy \n"
-@@ -2542,7 +2534,6 @@
- "vv'.\n"
-
- #: main.c:73
--#, fuzzy
- msgid ""
- "Copyright (C) 1996-2007 Michael R. Elkins <me@mutt.org>\n"
- "Copyright (C) 1996-2002 Brandon Long <blong@fiction.net>\n"
-@@ -2556,13 +2547,14 @@
- "Many others not mentioned here contributed code, fixes,\n"
- "and suggestions.\n"
- msgstr ""
--"Copyright (C) 1996-2006 Michael R. Elkins <me@mutt.org>\n"
-+"Copyright (C) 1996-2007 Michael R. Elkins <me@mutt.org>\n"
- "Copyright (C) 1996-2002 Brandon Long <blong@fiction.net>\n"
--"Copyright (C) 1997-2007 Thomas Roessler <roessler@does-not-exist.org>\n"
-+"Copyright (C) 1997-2008 Thomas Roessler <roessler@does-not-exist.org>\n"
- "Copyright (C) 1998-2005 Werner Koch <wk@isil.d.shuttle.de>\n"
--"Copyright (C) 1999-2007 Brendan Cully <brendan@kublai.com>\n"
-+"Copyright (C) 1999-2009 Brendan Cully <brendan@kublai.com>\n"
- "Copyright (C) 1999-2002 Tommi Komulainen <Tommi.Komulainen@iki.fi>\n"
- "Copyright (C) 2000-2002 Edmund Grimley Evans <edmundo@rano.org>\n"
-+"Copyright (C) 2006-2008 Rocco Rutte <pdmef@gmx.net>\n"
- "\n"
- "Wielu innych twórców, nie wspomnianych tutaj,\n"
- "wnios³o wiele nowego kodu, poprawek i sugestii.\n"
-@@ -2603,7 +2595,6 @@
- "1301, USA.\n"
-
- #: main.c:113
--#, fuzzy
- msgid ""
- "usage: mutt [<options>] [-z] [-f <file> | -yZ]\n"
- " mutt [<options>] [-x] [-Hi <file>] [-s <subj>] [-bc <addr>] [-a "
-@@ -2735,7 +2726,7 @@
-
- #: main.c:852
- msgid "Failed to parse mailto: link\n"
--msgstr ""
-+msgstr "Przetwarzanie odno¶nika mailto: nie powiod³o siê\n"
-
- #: main.c:864
- msgid "No recipients specified.\n"
-@@ -2882,9 +2873,8 @@
- msgstr "Sprawdzanie %s..."
-
- #: mh.c:1332 mh.c:1410
--#, fuzzy
- msgid "Could not flush message to disk"
--msgstr "Wys³anie listu nie powiod³o siê."
-+msgstr "Zapisane wiadomo¶ci na dysk nie powiod³o siê."
-
- #: mh.c:1377
- msgid "maildir_commit_message(): unable to set time on file"
-@@ -3012,24 +3002,22 @@
- msgstr "Certyfikat serwera utraci³ wa¿no¶æ"
-
- #: mutt_ssl.c:780
--#, fuzzy
- msgid "cannot get certificate subject"
--msgstr "Nie mo¿na pobraæ certyfikatu z docelowego hosta"
-+msgstr "nie mo¿na pobraæ tytu³ certyfikatu"
-
- #: mutt_ssl.c:790 mutt_ssl.c:799
--#, fuzzy
- msgid "cannot get certificate common name"
--msgstr "Nie mo¿na pobraæ certyfikatu z docelowego hosta"
-+msgstr "nie mo¿na pobraæ ogólnej nazwy certyfikatu"
-
- #: mutt_ssl.c:813
--#, fuzzy, c-format
-+#, c-format
- msgid "certificate owner does not match hostname %s"
--msgstr "W³a¶ciciel certyfikatu nie odpowiada nadawcy."
-+msgstr "w³a¶ciciel certyfikatu nie zgadza siê z hostem %s"
-
- #: mutt_ssl.c:854
--#, fuzzy, c-format
-+#, c-format
- msgid "Certificate host check failed: %s"
--msgstr "Certyfikat zosta³ zapisany"
-+msgstr "Weryfikacja hosta certyfikatu nie powiod³a siê: %s"
-
- #: mutt_ssl.c:932 mutt_ssl_gnutls.c:732
- msgid "This certificate belongs to:"
-@@ -3062,7 +3050,7 @@
- #: mutt_ssl.c:875 mutt_ssl_gnutls.c:854
- #, c-format
- msgid "SSL Certificate check (certificate %d of %d in chain)"
--msgstr ""
-+msgstr "Weryfikacja certyfikatu SSL (certyfikat %d z %d w ³añcuchu)"
-
- #: mutt_ssl.c:883 mutt_ssl_gnutls.c:863
- msgid "(r)eject, accept (o)nce, (a)ccept always"
-@@ -4281,7 +4269,7 @@
-
- #: smtp.c:258
- msgid "No from address given"
--msgstr ""
-+msgstr "Brak adresu nadawcy"
-
- #: smtp.c:314
- msgid "SMTP session failed: read error"
-@@ -4313,9 +4301,9 @@
- msgstr "Uwierzytelnianie SMTP wymaga SASL"
-
- #: smtp.c:493
--#, fuzzy, c-format
-+#, c-format
- msgid "%s authentication failed, trying next method"
--msgstr "Uwierzytelnianie SASL nie powiod³o siê"
-+msgstr "Uwierzytelnianie %s nie powiod³o siê"
-
- #: smtp.c:510
- msgid "SASL authentication failed"
+++ /dev/null
---- mutt-1.5.9/po/pt_BR.po.orig 2005-03-13 17:38:40.000000000 +0100
-+++ mutt-1.5.9/po/pt_BR.po 2005-03-31 16:54:59.167047152 +0200
-@@ -9,7 +9,7 @@
- "Language-Team: LIE-BR (http://lie-br.conectiva.com.br)\n"
- "MIME-Version: 1.0\n"
- "Content-Type: text/plain; charset=iso-8859-1\n"
--"Content-Transfer-Encoding:\n"
-+"Content-Transfer-Encoding: 8bit\n"
-
- #: account.c:148
- #, fuzzy, c-format
+++ /dev/null
-diff -udprP mutt-1.5.19.orig/compress.c mutt-1.5.19/compress.c
---- mutt-1.5.19.orig/compress.c 1970-01-01 03:00:00.000000000 +0300
-+++ mutt-1.5.19/compress.c 2009-01-06 19:16:04.000000000 +0200
-@@ -0,0 +1,490 @@
-+/*
-+ * Copyright (C) 1997 Alain Penders <Alain@Finale-Dev.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., 675 Mass Ave, Cambridge, MA 02139, USA.
-+ */
-+
-+#if HAVE_CONFIG_H
-+# include "config.h"
-+#endif
-+
-+#include "mutt.h"
-+
-+#ifdef USE_COMPRESSED
-+
-+#include "mx.h"
-+#include "mailbox.h"
-+#include "mutt_curses.h"
-+
-+#include <errno.h>
-+#include <string.h>
-+#include <unistd.h>
-+#include <sys/stat.h>
-+
-+typedef struct
-+{
-+ const char *close; /* close-hook command */
-+ const char *open; /* open-hook command */
-+ const char *append; /* append-hook command */
-+ off_t size; /* size of real folder */
-+} COMPRESS_INFO;
-+
-+char echo_cmd[HUGE_STRING];
-+
-+/* parameters:
-+ * ctx - context to lock
-+ * excl - exclusive lock?
-+ * retry - should retry if unable to lock?
-+ */
-+int mbox_lock_compressed (CONTEXT *ctx, FILE *fp, int excl, int retry)
-+{
-+ int r;
-+
-+ if ((r = mx_lock_file (ctx->realpath, fileno (fp), excl, 1, retry)) == 0)
-+ ctx->locked = 1;
-+ else if (retry && !excl)
-+ {
-+ ctx->readonly = 1;
-+ return 0;
-+ }
-+
-+ return (r);
-+}
-+
-+void mbox_unlock_compressed (CONTEXT *ctx, FILE *fp)
-+{
-+ if (ctx->locked)
-+ {
-+ fflush (fp);
-+
-+ mx_unlock_file (ctx->realpath, fileno (fp), 1);
-+ ctx->locked = 0;
-+ }
-+}
-+
-+static int is_new (const char *path)
-+{
-+ return (access (path, W_OK) != 0 && errno == ENOENT) ? 1 : 0;
-+}
-+
-+static const char* find_compress_hook (int type, const char *path)
-+{
-+ const char* c = mutt_find_hook (type, path);
-+ return (!c || !*c) ? NULL : c;
-+}
-+
-+int mutt_can_read_compressed (const char *path)
-+{
-+ return find_compress_hook (M_OPENHOOK, path) ? 1 : 0;
-+}
-+
-+/* if the file is new, we really do not append, but create, and so use
-+ * close-hook, and not append-hook
-+ */
-+static const char* get_append_command (const char *path, const CONTEXT* ctx)
-+{
-+ COMPRESS_INFO *ci = (COMPRESS_INFO *) ctx->compressinfo;
-+ return (is_new (path)) ? ci->close : ci->append;
-+}
-+
-+int mutt_can_append_compressed (const char *path)
-+{
-+ int magic;
-+
-+ if (is_new (path))
-+ return (find_compress_hook (M_CLOSEHOOK, path) ? 1 : 0);
-+
-+ magic = mx_get_magic (path);
-+
-+ if (magic != 0 && magic != M_COMPRESSED)
-+ return 0;
-+
-+ return (find_compress_hook (M_APPENDHOOK, path)
-+ || (find_compress_hook (M_OPENHOOK, path)
-+ && find_compress_hook (M_CLOSEHOOK, path))) ? 1 : 0;
-+}
-+
-+/* open a compressed mailbox */
-+static COMPRESS_INFO *set_compress_info (CONTEXT *ctx)
-+{
-+ COMPRESS_INFO *ci;
-+
-+ /* Now lets uncompress this thing */
-+ ci = safe_malloc (sizeof (COMPRESS_INFO));
-+ ctx->compressinfo = (void*) ci;
-+ ci->append = find_compress_hook (M_APPENDHOOK, ctx->path);
-+ ci->open = find_compress_hook (M_OPENHOOK, ctx->path);
-+ ci->close = find_compress_hook (M_CLOSEHOOK, ctx->path);
-+ return ci;
-+}
-+
-+static void set_path (CONTEXT* ctx)
-+{
-+ char tmppath[_POSIX_PATH_MAX];
-+
-+ /* Setup the right paths */
-+ ctx->realpath = ctx->path;
-+
-+ /* Uncompress to /tmp */
-+ mutt_mktemp (tmppath, sizeof(tmppath));
-+ ctx->path = safe_malloc (strlen (tmppath) + 1);
-+ strcpy (ctx->path, tmppath);
-+}
-+
-+static int get_size (const char* path)
-+{
-+ struct stat sb;
-+ if (stat (path, &sb) != 0)
-+ return 0;
-+ return (sb.st_size);
-+}
-+
-+static void store_size (CONTEXT* ctx)
-+{
-+ COMPRESS_INFO *ci = (COMPRESS_INFO *) ctx->compressinfo;
-+ ci->size = get_size (ctx->realpath);
-+}
-+
-+static const char *
-+compresshook_format_str (char *dest, size_t destlen, size_t col, char op,
-+ const char *src, const char *fmt, const char *ifstring,
-+ const char *elsestring, unsigned long data,
-+ format_flag flags)
-+{
-+ char tmp[SHORT_STRING];
-+
-+ CONTEXT *ctx = (CONTEXT *) data;
-+ switch (op)
-+ {
-+ case 'f':
-+ snprintf (tmp, sizeof (tmp), "%%%ss", fmt);
-+ snprintf (dest, destlen, tmp, ctx->realpath);
-+ break;
-+ case 't':
-+ snprintf (tmp, sizeof (tmp), "%%%ss", fmt);
-+ snprintf (dest, destlen, tmp, ctx->path);
-+ break;
-+ }
-+ return (src);
-+}
-+
-+/* check that the command has both %f and %t
-+ * 0 means OK, -1 means error
-+ */
-+int mutt_test_compress_command (const char* cmd)
-+{
-+ return (strstr (cmd, "%f") && strstr (cmd, "%t")) ? 0 : -1;
-+}
-+
-+static char *get_compression_cmd (const char* cmd, const CONTEXT* ctx)
-+{
-+ char expanded[_POSIX_PATH_MAX];
-+ mutt_FormatString (expanded, sizeof (expanded), 0, cmd, compresshook_format_str,
-+ (unsigned long) ctx, 0);
-+ return safe_strdup (expanded);
-+}
-+
-+int mutt_check_mailbox_compressed (CONTEXT* ctx)
-+{
-+ COMPRESS_INFO *ci = (COMPRESS_INFO *) ctx->compressinfo;
-+ if (ci->size != get_size (ctx->realpath))
-+ {
-+ FREE (&ctx->compressinfo);
-+ FREE (&ctx->realpath);
-+ mutt_error _("Mailbox was corrupted!");
-+ return (-1);
-+ }
-+ return (0);
-+}
-+
-+int mutt_open_read_compressed (CONTEXT *ctx)
-+{
-+ char *cmd;
-+ FILE *fp;
-+ int rc;
-+
-+ COMPRESS_INFO *ci = set_compress_info (ctx);
-+ if (!ci->open) {
-+ ctx->magic = 0;
-+ FREE (ctx->compressinfo);
-+ return (-1);
-+ }
-+ if (!ci->close || access (ctx->path, W_OK) != 0)
-+ ctx->readonly = 1;
-+
-+ set_path (ctx);
-+ store_size (ctx);
-+
-+ if (!ctx->quiet)
-+ mutt_message (_("Decompressing %s..."), ctx->realpath);
-+
-+ cmd = get_compression_cmd (ci->open, ctx);
-+ if (cmd == NULL)
-+ return (-1);
-+ dprint (2, (debugfile, "DecompressCmd: '%s'\n", cmd));
-+
-+ if ((fp = fopen (ctx->realpath, "r")) == NULL)
-+ {
-+ mutt_perror (ctx->realpath);
-+ FREE (&cmd);
-+ return (-1);
-+ }
-+ mutt_block_signals ();
-+ if (mbox_lock_compressed (ctx, fp, 0, 1) == -1)
-+ {
-+ fclose (fp);
-+ mutt_unblock_signals ();
-+ mutt_error _("Unable to lock mailbox!");
-+ FREE (&cmd);
-+ return (-1);
-+ }
-+
-+ endwin ();
-+ fflush (stdout);
-+ sprintf(echo_cmd,_("echo Decompressing %s..."),ctx->realpath);
-+ mutt_system(echo_cmd);
-+ rc = mutt_system (cmd);
-+ mbox_unlock_compressed (ctx, fp);
-+ mutt_unblock_signals ();
-+ fclose (fp);
-+
-+ if (rc)
-+ {
-+ mutt_any_key_to_continue (NULL);
-+ ctx->magic = 0;
-+ FREE (ctx->compressinfo);
-+ mutt_error (_("Error executing: %s : unable to open the mailbox!\n"), cmd);
-+ }
-+ FREE (&cmd);
-+ if (rc)
-+ return (-1);
-+
-+ if (mutt_check_mailbox_compressed (ctx))
-+ return (-1);
-+
-+ ctx->magic = mx_get_magic (ctx->path);
-+
-+ return (0);
-+}
-+
-+void restore_path (CONTEXT* ctx)
-+{
-+ FREE (&ctx->path);
-+ ctx->path = ctx->realpath;
-+}
-+
-+/* remove the temporary mailbox */
-+void remove_file (CONTEXT* ctx)
-+{
-+ if (ctx->magic == M_MBOX || ctx->magic == M_MMDF)
-+ remove (ctx->path);
-+}
-+
-+int mutt_open_append_compressed (CONTEXT *ctx)
-+{
-+ FILE *fh;
-+ COMPRESS_INFO *ci = set_compress_info (ctx);
-+
-+ if (!get_append_command (ctx->path, ctx))
-+ {
-+ if (ci->open && ci->close)
-+ return (mutt_open_read_compressed (ctx));
-+
-+ ctx->magic = 0;
-+ FREE (&ctx->compressinfo);
-+ return (-1);
-+ }
-+
-+ set_path (ctx);
-+
-+ ctx->magic = DefaultMagic;
-+
-+ if (!is_new (ctx->realpath))
-+ if (ctx->magic == M_MBOX || ctx->magic == M_MMDF)
-+ if ((fh = fopen (ctx->path, "w")))
-+ fclose (fh);
-+ /* No error checking - the parent function will catch it */
-+
-+ return (0);
-+}
-+
-+/* close a compressed mailbox */
-+void mutt_fast_close_compressed (CONTEXT *ctx)
-+{
-+ dprint (2, (debugfile, "mutt_fast_close_compressed called on '%s'\n",
-+ ctx->path));
-+
-+ if (ctx->compressinfo)
-+ {
-+ if (ctx->fp)
-+ fclose (ctx->fp);
-+ ctx->fp = NULL;
-+ /* if the folder was removed, remove the gzipped folder too */
-+ if (access (ctx->path, F_OK) != 0 && ! option (OPTSAVEEMPTY))
-+ remove (ctx->realpath);
-+ else
-+ remove_file (ctx);
-+
-+ restore_path (ctx);
-+ FREE (&ctx->compressinfo);
-+ }
-+}
-+
-+/* return 0 on success, -1 on failure */
-+int mutt_sync_compressed (CONTEXT* ctx)
-+{
-+ char *cmd;
-+ int rc = 0;
-+ FILE *fp;
-+ COMPRESS_INFO *ci = (COMPRESS_INFO *) ctx->compressinfo;
-+
-+ if (!ctx->quiet)
-+ mutt_message (_("Compressing %s..."), ctx->realpath);
-+
-+ cmd = get_compression_cmd (ci->close, ctx);
-+ if (cmd == NULL)
-+ return (-1);
-+
-+ if ((fp = fopen (ctx->realpath, "a")) == NULL)
-+ {
-+ mutt_perror (ctx->realpath);
-+ FREE (&cmd);
-+ return (-1);
-+ }
-+ mutt_block_signals ();
-+ if (mbox_lock_compressed (ctx, fp, 1, 1) == -1)
-+ {
-+ fclose (fp);
-+ mutt_unblock_signals ();
-+ mutt_error _("Unable to lock mailbox!");
-+
-+ store_size (ctx);
-+
-+ FREE (&cmd);
-+ return (-1);
-+ }
-+
-+ dprint (2, (debugfile, "CompressCommand: '%s'\n", cmd));
-+
-+ endwin ();
-+ fflush (stdout);
-+ sprintf(echo_cmd,_("echo Compressing %s..."), ctx->realpath);
-+ mutt_system(echo_cmd);
-+ if (mutt_system (cmd))
-+ {
-+ mutt_any_key_to_continue (NULL);
-+ mutt_error (_("%s: Error compressing mailbox! Original mailbox deleted, uncompressed one kept!\n"), ctx->path);
-+ rc = -1;
-+ }
-+
-+ mbox_unlock_compressed (ctx, fp);
-+ mutt_unblock_signals ();
-+ fclose (fp);
-+
-+ FREE (&cmd);
-+
-+ store_size (ctx);
-+
-+ return (rc);
-+}
-+
-+int mutt_slow_close_compressed (CONTEXT *ctx)
-+{
-+ FILE *fp;
-+ const char *append;
-+ char *cmd;
-+ COMPRESS_INFO *ci = (COMPRESS_INFO *) ctx->compressinfo;
-+
-+ dprint (2, (debugfile, "mutt_slow_close_compressed called on '%s'\n",
-+ ctx->path));
-+
-+ if (! (ctx->append
-+ && ((append = get_append_command (ctx->realpath, ctx))
-+ || (append = ci->close))))
-+ { /* if we can not or should not append,
-+ * we only have to remove the compressed info, because sync was already
-+ * called
-+ */
-+ mutt_fast_close_compressed (ctx);
-+ return (0);
-+ }
-+
-+ if (ctx->fp)
-+ fclose (ctx->fp);
-+ ctx->fp = NULL;
-+
-+ if (!ctx->quiet)
-+ {
-+ if (append == ci->close)
-+ mutt_message (_("Compressing %s..."), ctx->realpath);
-+ else
-+ mutt_message (_("Compressed-appending to %s..."), ctx->realpath);
-+ }
-+
-+ cmd = get_compression_cmd (append, ctx);
-+ if (cmd == NULL)
-+ return (-1);
-+
-+ if ((fp = fopen (ctx->realpath, "a")) == NULL)
-+ {
-+ mutt_perror (ctx->realpath);
-+ FREE (&cmd);
-+ return (-1);
-+ }
-+ mutt_block_signals ();
-+ if (mbox_lock_compressed (ctx, fp, 1, 1) == -1)
-+ {
-+ fclose (fp);
-+ mutt_unblock_signals ();
-+ mutt_error _("Unable to lock mailbox!");
-+ FREE (&cmd);
-+ return (-1);
-+ }
-+
-+ dprint (2, (debugfile, "CompressCmd: '%s'\n", cmd));
-+
-+ endwin ();
-+ fflush (stdout);
-+
-+ if (append == ci->close)
-+ sprintf(echo_cmd,_("echo Compressing %s..."), ctx->realpath);
-+ else
-+ sprintf(echo_cmd,_("echo Compressed-appending to %s..."), ctx->realpath);
-+ mutt_system(echo_cmd);
-+
-+ if (mutt_system (cmd))
-+ {
-+ mutt_any_key_to_continue (NULL);
-+ mutt_error (_(" %s: Error compressing mailbox! Uncompressed one kept!\n"),
-+ ctx->path);
-+ FREE (&cmd);
-+ mbox_unlock_compressed (ctx, fp);
-+ mutt_unblock_signals ();
-+ fclose (fp);
-+ return (-1);
-+ }
-+
-+ mbox_unlock_compressed (ctx, fp);
-+ mutt_unblock_signals ();
-+ fclose (fp);
-+ remove_file (ctx);
-+ restore_path (ctx);
-+ FREE (&cmd);
-+ FREE (&ctx->compressinfo);
-+
-+ return (0);
-+}
-+
-+#endif /* USE_COMPRESSED */
-diff -udprP mutt-1.5.19.orig/compress.h mutt-1.5.19/compress.h
---- mutt-1.5.19.orig/compress.h 1970-01-01 03:00:00.000000000 +0300
-+++ mutt-1.5.19/compress.h 2009-01-06 19:16:04.000000000 +0200
-@@ -0,0 +1,27 @@
-+/*
-+ * Copyright (C) 1997 Alain Penders <Alain@Finale-Dev.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., 675 Mass Ave, Cambridge, MA 02139, USA.
-+ */
-+
-+int mutt_can_read_compressed (const char *);
-+int mutt_can_append_compressed (const char *);
-+int mutt_open_read_compressed (CONTEXT *);
-+int mutt_open_append_compressed (CONTEXT *);
-+int mutt_slow_close_compressed (CONTEXT *);
-+int mutt_sync_compressed (CONTEXT *);
-+int mutt_test_compress_command (const char *);
-+int mutt_check_mailbox_compressed (CONTEXT *);
-+void mutt_fast_close_compressed (CONTEXT *);
-diff -udprP mutt-1.5.19.orig/config.h.in mutt-1.5.19/config.h.in
---- mutt-1.5.19.orig/config.h.in 2008-11-18 01:54:00.000000000 +0200
-+++ mutt-1.5.19/config.h.in 2009-01-06 19:16:04.000000000 +0200
-@@ -521,6 +521,9 @@
-
- /* Define to enable Sun mailtool attachments support. */
- #undef SUN_ATTACHMENT
-+
-+/* The compressed mailboxes support */
-+#undef USE_COMPRESSED
-
- /* Define to use dotlocking for mailboxes. */
- #undef USE_DOTLOCK
-diff -udprP mutt-1.5.19.orig/configure mutt-1.5.19/configure
---- mutt-1.5.19.orig/configure 2008-11-18 01:53:41.000000000 +0200
-+++ mutt-1.5.19/configure 2009-01-06 19:16:04.000000000 +0200
-@@ -1366,6 +1366,7 @@ Optional Features:
- --disable-warnings Turn off compiler warnings (not recommended)
- --enable-nfs-fix Work around an NFS with broken attributes caching
- --enable-mailtool Enable Sun mailtool attachments support
-+ --enable-compressed Enable compressed folders support
- --enable-locales-fix The result of isprint() is unreliable
- --enable-exact-address Enable regeneration of email addresses
- --enable-hcache Enable header caching
-@@ -12978,6 +12979,18 @@ echo "${ECHO_T}$mutt_cv_regex_broken" >&
- fi
- fi
-
-+
-+# Check whether --enable-compressed or --disable-compressed was given.
-+if test "${enable_compressed+set}" = set; then
-+ enableval="$enable_compressed"
-+ if test x$enableval = xyes; then
-+ cat >> confdefs.h <<\EOF
-+#define USE_COMPRESSED 1
-+EOF
-+
-+ fi
-+fi
-+
- if test $mutt_cv_regex = yes; then
-
- cat >>confdefs.h <<\_ACEOF
-diff -udprP mutt-1.5.19.orig/configure.ac mutt-1.5.19/configure.ac
---- mutt-1.5.19.orig/configure.ac 2008-11-17 22:15:26.000000000 +0200
-+++ mutt-1.5.19/configure.ac 2009-01-06 19:16:04.000000000 +0200
-@@ -789,6 +789,11 @@ AC_ARG_ENABLE(mailtool, AC_HELP_STRING([
- AC_DEFINE(SUN_ATTACHMENT,1,[ Define to enable Sun mailtool attachments support. ])
- fi])
-
-+AC_ARG_ENABLE(compressed, AC_HELP_STRING([--enable-compressed], [Enable compressed folders support]),
-+ [if test x$enableval = xyes; then
-+ AC_DEFINE(USE_COMPRESSED,1,[ Define to enable compressed folders support. ])
-+ fi])
-+
- AC_ARG_ENABLE(locales-fix, AC_HELP_STRING([--enable-locales-fix], [The result of isprint() is unreliable]),
- [if test x$enableval = xyes; then
- AC_DEFINE(LOCALES_HACK,1,[ Define if the result of isprint() is unreliable. ])
-diff -udprP mutt-1.5.19.orig/curs_main.c mutt-1.5.19/curs_main.c
---- mutt-1.5.19.orig/curs_main.c 2009-01-05 21:20:53.000000000 +0200
-+++ mutt-1.5.19/curs_main.c 2009-01-06 19:16:04.000000000 +0200
-@@ -1108,6 +1108,11 @@ int mutt_index_menu (void)
- {
- int check;
-
-+#ifdef USE_COMPRESSED
-+ if (Context->compressinfo && Context->realpath)
-+ mutt_str_replace (&LastFolder, Context->realpath);
-+ else
-+#endif
- mutt_str_replace (&LastFolder, Context->path);
- oldcount = Context ? Context->msgcount : 0;
-
---- mutt-1.5.20.b/doc/Makefile.am 2009-06-01 04:23:14.000000000 +0200
-+++ mutt-1.5.20/doc/Makefile.am 2009-07-14 12:36:06.000000000 +0200
-@@ -31,7 +31,8 @@
-
- CHUNKED_DOCFILES = index.html intro.html gettingstarted.html \
- configuration.html mimesupport.html advancedusage.html \
-- optionalfeatures.html security.html tuning.html reference.html miscellany.html
-+ optionalfeatures.html security.html tuning.html reference.html miscellany.html \
-+ compressed-folders.html
-
- HTML_DOCFILES = manual.html $(CHUNKED_DOCFILES)
-
---- mutt-1.5.20.b/doc/Makefile.in 2009-06-09 08:50:43.000000000 +0200
-+++ mutt-1.5.20/doc/Makefile.in 2009-07-14 12:36:53.000000000 +0200
-@@ -235,7 +235,8 @@
-
- CHUNKED_DOCFILES = index.html intro.html gettingstarted.html \
- configuration.html mimesupport.html advancedusage.html \
-- optionalfeatures.html security.html tuning.html reference.html miscellany.html
-+ optionalfeatures.html security.html tuning.html reference.html miscellany.html \
-+ compressed-folders.html
-
- HTML_DOCFILES = manual.html $(CHUNKED_DOCFILES)
- BUILT_DISTFILES = stamp-doc-xml stamp-doc-chunked manual.txt $(HTML_DOCFILES)
-diff -udprP mutt-1.5.19.orig/doc/manual.xml.head mutt-1.5.19/doc/manual.xml.head
---- mutt-1.5.19.orig/doc/manual.xml.head 2009-01-05 21:20:53.000000000 +0200
-+++ mutt-1.5.19/doc/manual.xml.head 2009-01-06 19:35:41.000000000 +0200
-@@ -4639,6 +4639,24 @@ configuration option/command. See
- <link linkend="fcc-save-hook">fcc-save-hook</link>
- </para>
- </listitem>
-+<listitem>
-+
-+<para>
-+<link linkend="open-hook">open-hook</link>
-+</para>
-+</listitem>
-+<listitem>
-+
-+<para>
-+<link linkend="close-hook">close-hook</link>
-+</para>
-+</listitem>
-+<listitem>
-+
-+<para>
-+<link linkend="append-hook">append-hook</link>
-+</para>
-+</listitem>
-
- </itemizedlist>
-
-@@ -5138,6 +5156,254 @@ macro pager \cb |urlview\n
-
- </chapter>
-
-+<chapter id="compressed-folders">
-+<title>Compressed folders Support (OPTIONAL)</title>
-+
-+<para>
-+If Mutt was compiled with compressed folders support (by running the
-+<emphasis>configure</emphasis> script with the
-+<emphasis>--enable-compressed</emphasis> flag), Mutt can open folders
-+stored in an arbitrary format, provided that the user has a script to
-+convert from/to this format to one of the accepted.
-+</para>
-+
-+<para>
-+The most common use is to open compressed archived folders e.g. with
-+gzip.
-+</para>
-+
-+<para>
-+In addition, the user can provide a script that gets a folder in an
-+accepted format and appends its context to the folder in the
-+user-defined format, which may be faster than converting the entire
-+folder to the accepted format, appending to it and converting back to
-+the user-defined format.
-+</para>
-+
-+<para>
-+There are three hooks defined
-+(<link linkend="open-hook">open-hook</link>,
-+<link linkend="close-hook">close-hook</link> and
-+<link linkend="append-hook">append-hook</link>) which define commands
-+to uncompress and compress a folder and to append messages to an
-+existing compressed folder respectively.
-+</para>
-+
-+<para>
-+For example:
-+
-+<screen>
-+open-hook \\.gz$ "gzip -cd %f > %t"
-+close-hook \\.gz$ "gzip -c %t > %f"
-+append-hook \\.gz$ "gzip -c %t >> %f"
-+</screen>
-+</para>
-+
-+<para>
-+You do not have to specify all of the commands. If you omit
-+<link linkend="append-hook">append-hook</link>, the folder will be open
-+and closed again each time you will add to it. If you omit
-+<link linkend="close-hook">close-hook</link> (or give empty command),
-+the folder will be open in the mode. If you specify
-+<link linkend="append-hook">append-hook</link> though you'll be able to
-+append to the folder.
-+</para>
-+
-+<para>
-+Note that Mutt will only try to use hooks if the file is not in one of
-+the accepted formats. In particular, if the file is empty, mutt
-+supposes it is not compressed. This is important because it allows the
-+use of programs that do not have well defined extensions. Just use
-+``.'' as a regexp. But this may be surprising if your compressing
-+script produces empty files. In this situation, unset
-+<link linkend="save-empty">$save_empty</link>, so that
-+the compressed file will be removed if you delete all of the messages.
-+</para>
-+
-+<sect1 id="open-hook">
-+<title>Open a compressed mailbox for reading</title>
-+
-+<para>
-+Usage: <literal>open-hook</literal> <emphasis>regexp</emphasis> <emphasis>command</emphasis>
-+</para>
-+
-+<para>
-+The <emphasis>command</emphasis> is the command that can be used for
-+opening the folders whose names match <emphasis>regexp</emphasis>.
-+</para>
-+
-+<para>
-+The <emphasis>command</emphasis> string is the printf-like format
-+string, and it should accept two parameters: %f, which is
-+replaced with the (compressed) folder name, and %t which is
-+replaced with the name of the temporary folder to which to write.
-+</para>
-+
-+<para>
-+%f and %t can be repeated any number of times in the
-+command string, and all of the entries are replaced with the
-+appropriate folder name. In addition, %% is replaced by
-+%, as in printf, and any other %anything is left as is.
-+</para>
-+
-+<para>
-+The <emphasis>command</emphasis> should <emphasis role="bold">not</emphasis>
-+remove the original compressed file. The <emphasis>command</emphasis>
-+should return non-zero exit status if it fails, so mutt knows
-+something's wrong.
-+</para>
-+
-+<para>
-+Example:
-+
-+<screen>
-+open-hook \\.gz$ "gzip -cd %f > %t"
-+</screen>
-+</para>
-+
-+<para>
-+If the <emphasis>command</emphasis> is empty, this operation is
-+disabled for this file type.
-+</para>
-+
-+</sect1>
-+
-+<sect1 id="close-hook">
-+<title>Write a compressed mailbox</title>
-+
-+<para>
-+Usage: <literal>close-hook</literal> <emphasis>regexp</emphasis> <emphasis>command</emphasis>
-+</para>
-+
-+<para>
-+This is used to close the folder that was open with the
-+<link linkend="open-hook">open-hook</link> command after some changes
-+were made to it.
-+</para>
-+
-+<para>
-+The <emphasis>command</emphasis> string is the command that can be
-+used for closing the folders whose names match <emphasis>regexp</emphasis>.
-+It has the same format as in the <link linkend="open-hook">open-hook</link>
-+command. Temporary folder in this case is the folder previously
-+produced by the <link linkend="open-hook">open-hook</link> command.
-+</para>
-+
-+<para>
-+The <emphasis>command</emphasis> should <emphasis role="bold">not</emphasis>
-+remove the decompressed file. The <emphasis>command</emphasis> should
-+return non-zero exit status if it fails, so mutt knows something's
-+wrong.
-+</para>
-+
-+<para>
-+Example:
-+
-+<screen>
-+close-hook \\.gz$ "gzip -c %t > %f"
-+</screen>
-+</para>
-+
-+<para>
-+If the <emphasis>command</emphasis> is empty, this operation is
-+disabled for this file type, and the file can only be open in the
-+readonly mode.
-+</para>
-+
-+<para>
-+<link linkend="close-hook">close-hook</link> is not called when you
-+exit from the folder if the folder was not changed.
-+</para>
-+
-+</sect1>
-+
-+<sect1 id="append-hook">
-+<title>Append a message to a compressed mailbox</title>
-+
-+<para>
-+Usage: <literal>append-hook</literal> <emphasis>regexp</emphasis> <emphasis>command</emphasis>
-+</para>
-+
-+<para>
-+This command is used for saving to an existing compressed folder.
-+The <emphasis>command</emphasis> is the command that can be used for
-+appending to the folders whose names match <emphasis>regexp</emphasis>.
-+It has the same format as in the <link linkend="open-hook">open-hook</link>
-+command. The temporary folder in this case contains the messages that
-+are being appended.
-+</para>
-+
-+<para>
-+The <emphasis>command</emphasis> should <emphasis role="bold">not</emphasis>
-+remove the decompressed file. The <emphasis>command</emphasis> should
-+return non-zero exit status if it fails, so mutt knows something's
-+wrong.
-+</para>
-+
-+<para>
-+Example:
-+
-+<screen>
-+append-hook \\.gz$ "gzip -c %t >> %f"
-+</screen>
-+</para>
-+
-+<para>
-+When <link linkend="append-hook">append-hook</link> is used, the folder
-+is not opened, which saves time, but this means that we can not find
-+out what the folder type is. Thus the default
-+(<link linkend="mbox-type">$mbox_type</link>) type is
-+always supposed (i.e. this is the format used for the temporary
-+folder).
-+</para>
-+
-+<para>
-+If the file does not exist when you save to it,
-+<link linkend="close-hook">close-hook</link> is called, and not
-+<link linkend="append-hook">append-hook</link>.
-+<link linkend="append-hook">append-hook</link> is only for appending
-+to existing folders.
-+</para>
-+
-+<para>
-+If the <emphasis>command</emphasis> is empty, this operation is
-+disabled for this file type. In this case, the folder will be open and
-+closed again (using <link linkend="open-hook">open-hook</link> and
-+<link linkend="close-hook">close-hook</link> respectively) each time
-+you will add to it.
-+</para>
-+
-+</sect1>
-+
-+<sect1>
-+<title>Encrypted folders</title>
-+
-+<para>
-+The compressed folders support can also be used to handle encrypted
-+folders. If you want to encrypt a folder with PGP, you may want to use
-+the following hooks:
-+
-+<screen>
-+open-hook \\.pgp$ "pgp -f < %f > %t"
-+close-hook \\.pgp$ "pgp -fe YourPgpUserIdOrKeyId < %t > %f"
-+</screen>
-+</para>
-+
-+<para>
-+Please note, that PGP does not support appending to an encrypted
-+folder, so there is no append-hook defined.
-+</para>
-+
-+<para>
-+<emphasis role="bold">Note:</emphasis> the folder is temporary stored
-+decrypted in the /tmp directory, where it can be read by your system
-+administrator. So think about the security aspects of this.
-+</para>
-+
-+</sect1>
-+
-+</chapter>
-+
- <chapter id="mimesupport">
- <title>Mutt's MIME Support</title>
-
-@@ -6942,6 +7208,18 @@ The following are the commands understoo
-
- <listitem>
- <cmdsynopsis>
-+<command><link linkend="append-hook">append-hook</link></command>
-+<arg choice="plain">
-+<replaceable class="parameter">pattern</replaceable>
-+</arg>
-+<arg choice="plain">
-+<replaceable class="parameter">command</replaceable>
-+</arg>
-+</cmdsynopsis>
-+</listitem>
-+
-+<listitem>
-+<cmdsynopsis>
- <command><link linkend="auto-view">auto_view</link></command>
- <arg choice="plain">
- <replaceable>mimetype</replaceable>
-@@ -7007,6 +7285,18 @@ The following are the commands understoo
-
- <listitem>
- <cmdsynopsis>
-+<command><link linkend="close-hook">close-hook</link></command>
-+<arg choice="plain">
-+<replaceable class="parameter">pattern</replaceable>
-+</arg>
-+<arg choice="plain">
-+<replaceable class="parameter">command</replaceable>
-+</arg>
-+</cmdsynopsis>
-+</listitem>
-+
-+<listitem>
-+<cmdsynopsis>
- <command><link linkend="color">color</link></command>
- <arg choice="plain">
- <replaceable class="parameter">object</replaceable>
-@@ -7421,6 +7711,18 @@ The following are the commands understoo
-
- <listitem>
- <cmdsynopsis>
-+<command><link linkend="open-hook">open-hook</link></command>
-+<arg choice="plain">
-+<replaceable class="parameter">pattern</replaceable>
-+</arg>
-+<arg choice="plain">
-+<replaceable class="parameter">command</replaceable>
-+</arg>
-+</cmdsynopsis>
-+</listitem>
-+
-+<listitem>
-+<cmdsynopsis>
- <command><link linkend="crypt-hook">crypt-hook</link></command>
- <arg choice="plain">
- <replaceable class="parameter">pattern</replaceable>
-diff -udprP mutt-1.5.19.orig/doc/Muttrc.head mutt-1.5.19/doc/Muttrc.head
---- mutt-1.5.19.orig/doc/Muttrc.head 2008-06-14 03:08:43.000000000 +0300
-+++ mutt-1.5.19/doc/Muttrc.head 2009-01-06 19:16:04.000000000 +0200
-@@ -29,6 +29,17 @@ macro generic,pager <F1> "<shell-escape>
- macro index,pager y "<change-folder>?<toggle-mailboxes>" "show incoming mailboxes list"
- bind browser y exit
-
-+# Use folders which match on \\.gz$ as gzipped folders:
-+open-hook \\.gz$ "gzip -cd %f > %t"
-+close-hook \\.gz$ "gzip -c %t > %f"
-+append-hook \\.gz$ "gzip -c %t >> %f"
-+open-hook \\.bz2$ "bzip2 -cd %f > %t"
-+close-hook \\.bz2$ "bzip2 -c %t > %f"
-+append-hook \\.bz2$ "bzip2 -c %t >> %f"
-+open-hook \\.xz$ "xz -cd %f > %t"
-+close-hook \\.xz$ "xz -c %t > %f"
-+append-hook \\.xz$ "xz -c %t >> %f"
-+
- # If Mutt is unable to determine your site's domain name correctly, you can
- # set the default here.
- #
-diff -udprP mutt-1.5.19.orig/doc/muttrc.man.head mutt-1.5.19/doc/muttrc.man.head
---- mutt-1.5.19.orig/doc/muttrc.man.head 2008-11-26 20:48:48.000000000 +0200
-+++ mutt-1.5.19/doc/muttrc.man.head 2009-01-06 19:16:04.000000000 +0200
-@@ -345,6 +345,24 @@ specify the ID of the public key to be u
- to a certain recipient. The meaning of "key ID" is to be taken
- broadly: This can be a different e-mail address, a numerical key ID,
- or even just an arbitrary search string.
-+.PP
-+.nf
-+\fBopen-hook\fP \fIregexp\fP "\fIcommand\fP"
-+\fBclose-hook\fP \fIregexp\fP "\fIcommand\fP"
-+\fBappend-hook\fP \fIregexp\fP "\fIcommand\fP"
-+.fi
-+.IP
-+These commands provide a way to handle compressed folders. The given
-+\fBregexp\fP specifies which folders are taken as compressed (e.g.
-+"\fI\\\\.gz$\fP"). The commands tell Mutt how to uncompress a folder
-+(\fBopen-hook\fP), compress a folder (\fBclose-hook\fP) or append a
-+compressed mail to a compressed folder (\fBappend-hook\fP). The
-+\fIcommand\fP string is the
-+.BR printf (3)
-+like format string, and it should accept two parameters: \fB%f\fP,
-+which is replaced with the (compressed) folder name, and \fB%t\fP
-+which is replaced with the name of the temporary folder to which to
-+write.
- .TP
- \fBpush\fP \fIstring\fP
- This command adds the named \fIstring\fP to the keyboard buffer.
-diff -udprP mutt-1.5.19.orig/hook.c mutt-1.5.19/hook.c
---- mutt-1.5.19.orig/hook.c 2009-01-05 21:20:53.000000000 +0200
-+++ mutt-1.5.19/hook.c 2009-01-06 19:16:04.000000000 +0200
-@@ -24,6 +24,10 @@
- #include "mailbox.h"
- #include "mutt_crypt.h"
-
-+#ifdef USE_COMPRESSED
-+#include "compress.h"
-+#endif
-+
- #include <limits.h>
- #include <string.h>
- #include <stdlib.h>
-@@ -92,6 +96,16 @@ int mutt_parse_hook (BUFFER *buf, BUFFER
- memset (&pattern, 0, sizeof (pattern));
- pattern.data = safe_strdup (path);
- }
-+#ifdef USE_COMPRESSED
-+ else if (data & (M_APPENDHOOK | M_OPENHOOK | M_CLOSEHOOK))
-+ {
-+ if (mutt_test_compress_command (command.data))
-+ {
-+ strfcpy (err->data, _("bad formatted command string"), err->dsize);
-+ return (-1);
-+ }
-+ }
-+#endif
- else if (DefaultHook && !(data & (M_CHARSETHOOK | M_ICONVHOOK | M_ACCOUNTHOOK))
- && (!WithCrypto || !(data & M_CRYPTHOOK))
- )
-diff -udprP mutt-1.5.19.orig/init.h mutt-1.5.19/init.h
---- mutt-1.5.19.orig/init.h 2009-01-05 21:20:53.000000000 +0200
-+++ mutt-1.5.19/init.h 2009-01-06 19:16:04.000000000 +0200
-@@ -3398,6 +3398,11 @@ struct command_t Commands[] = {
- { "fcc-hook", mutt_parse_hook, M_FCCHOOK },
- { "fcc-save-hook", mutt_parse_hook, M_FCCHOOK | M_SAVEHOOK },
- { "folder-hook", mutt_parse_hook, M_FOLDERHOOK },
-+#ifdef USE_COMPRESSED
-+ { "open-hook", mutt_parse_hook, M_OPENHOOK },
-+ { "close-hook", mutt_parse_hook, M_CLOSEHOOK },
-+ { "append-hook", mutt_parse_hook, M_APPENDHOOK },
-+#endif
- { "group", parse_group, M_GROUP },
- { "ungroup", parse_ungroup, M_UNGROUP },
- { "hdr_order", parse_list, UL &HeaderOrderList },
-diff -udprP mutt-1.5.19.orig/main.c mutt-1.5.19/main.c
---- mutt-1.5.19.orig/main.c 2009-01-04 01:27:10.000000000 +0200
-+++ mutt-1.5.19/main.c 2009-01-06 19:16:04.000000000 +0200
-@@ -311,6 +311,12 @@ static void show_version (void)
- "-USE_GNU_REGEX "
- #endif
-
-+#ifdef USE_COMPRESSED
-+ "+COMPRESSED "
-+#else
-+ "-COMPRESSED "
-+#endif
-+
- "\n"
-
- #ifdef HAVE_COLOR
-diff -udprP mutt-1.5.19.orig/Makefile.am mutt-1.5.19/Makefile.am
---- mutt-1.5.19.orig/Makefile.am 2009-01-05 21:20:53.000000000 +0200
-+++ mutt-1.5.19/Makefile.am 2009-01-06 19:16:04.000000000 +0200
-@@ -18,6 +18,7 @@ BUILT_SOURCES = keymap_defs.h patchlist.
- bin_PROGRAMS = mutt @DOTLOCK_TARGET@ @PGPAUX_TARGET@
- mutt_SOURCES = \
- addrbook.c alias.c attach.c base64.c browser.c buffy.c color.c \
-+ compress.c \
- crypt.c cryptglue.c \
- commands.c complete.c compose.c copy.c curs_lib.c curs_main.c date.c \
- edit.c enter.c flags.c init.c filter.c from.c \
-@@ -58,6 +59,7 @@ EXTRA_mutt_SOURCES = account.c bcache.c
-
- EXTRA_DIST = COPYRIGHT GPL OPS OPS.PGP OPS.CRYPT OPS.SMIME TODO UPDATING \
- configure account.h \
-+ compress.h \
- attach.h buffy.h charset.h copy.h crypthash.h dotlock.h functions.h gen_defs \
- globals.h hash.h history.h init.h keymap.h mutt_crypt.h \
- mailbox.h mapping.h md5.h mime.h mutt.h mutt_curses.h mutt_menu.h \
-diff -udprP mutt-1.5.19.orig/Makefile.in mutt-1.5.19/Makefile.in
---- mutt-1.5.19.orig/Makefile.in 2009-01-05 21:24:13.000000000 +0200
-+++ mutt-1.5.19/Makefile.in 2009-01-06 19:16:04.000000000 +0200
-@@ -14,6 +14,10 @@
-
- @SET_MAKE@
-
-+mutt_SOURCES += compress.c
-+EXTRA_DIST += compress.h
-+mutt_OBJECTS += compress.o
-+
-
- VPATH = @srcdir@
- pkgdatadir = $(datadir)/@PACKAGE@
-diff -udprP mutt-1.5.19.orig/mbox.c mutt-1.5.19/mbox.c
---- mutt-1.5.19.orig/mbox.c 2008-08-15 21:30:12.000000000 +0300
-+++ mutt-1.5.19/mbox.c 2009-01-06 19:16:04.000000000 +0200
-@@ -29,6 +29,10 @@
- #include "copy.h"
- #include "mutt_curses.h"
-
-+#ifdef USE_COMPRESSED
-+#include "compress.h"
-+#endif
-+
- #include <sys/stat.h>
- #include <dirent.h>
- #include <string.h>
-@@ -1038,6 +1042,12 @@ bail: /* Come here in case of disaster
- int mbox_close_mailbox (CONTEXT *ctx)
- {
- mx_unlock_file (ctx->path, fileno (ctx->fp), 1);
-+
-+#ifdef USE_COMPRESSED
-+ if (ctx->compressinfo)
-+ mutt_slow_close_compressed (ctx);
-+#endif
-+
- mutt_unblock_signals ();
- mx_fastclose_mailbox (ctx);
- return 0;
-diff -udprP mutt-1.5.19.orig/mutt.h mutt-1.5.19/mutt.h
---- mutt-1.5.19.orig/mutt.h 2008-09-26 01:00:03.000000000 +0300
-+++ mutt-1.5.19/mutt.h 2009-01-06 19:16:04.000000000 +0200
-@@ -140,6 +140,11 @@ typedef enum
- #define M_ACCOUNTHOOK (1<<9)
- #define M_REPLYHOOK (1<<10)
- #define M_SEND2HOOK (1<<11)
-+#ifdef USE_COMPRESSED
-+#define M_OPENHOOK (1<<12)
-+#define M_APPENDHOOK (1<<13)
-+#define M_CLOSEHOOK (1<<14)
-+#endif
-
- /* tree characters for linearize_tree and print_enriched_string */
- #define M_TREE_LLCORNER 1
-@@ -869,6 +874,11 @@ typedef struct _context
-
- unsigned char rights[(RIGHTSMAX + 7)/8]; /* ACL bits */
-
-+#ifdef USE_COMPRESSED
-+ void *compressinfo; /* compressed mbox module private data */
-+ char *realpath; /* path to compressed mailbox */
-+#endif /* USE_COMPRESSED */
-+
- unsigned int locked : 1; /* is the mailbox locked? */
- unsigned int changed : 1; /* mailbox has been modified */
- unsigned int readonly : 1; /* don't allow changes to the mailbox */
-diff -udprP mutt-1.5.19.orig/mx.c mutt-1.5.19/mx.c
---- mutt-1.5.19.orig/mx.c 2009-01-05 21:20:53.000000000 +0200
-+++ mutt-1.5.19/mx.c 2009-01-06 19:16:04.000000000 +0200
-@@ -30,6 +30,10 @@
- #include "keymap.h"
- #include "url.h"
-
-+#ifdef USE_COMPRESSED
-+#include "compress.h"
-+#endif
-+
- #ifdef USE_IMAP
- #include "imap.h"
- #endif
-@@ -445,6 +449,11 @@ int mx_get_magic (const char *path)
- return (-1);
- }
-
-+#ifdef USE_COMPRESSED
-+ if (magic == 0 && mutt_can_read_compressed (path))
-+ return M_COMPRESSED;
-+#endif
-+
- return (magic);
- }
-
-@@ -484,6 +493,13 @@ static int mx_open_mailbox_append (CONTE
- {
- struct stat sb;
-
-+#ifdef USE_COMPRESSED
-+ /* special case for appending to compressed folders -
-+ * even if we can not open them for reading */
-+ if (mutt_can_append_compressed (ctx->path))
-+ mutt_open_append_compressed (ctx);
-+#endif
-+
- ctx->append = 1;
-
- #ifdef USE_IMAP
-@@ -648,6 +664,11 @@ CONTEXT *mx_open_mailbox (const char *pa
-
- ctx->magic = mx_get_magic (path);
-
-+#ifdef USE_COMPRESSED
-+ if (ctx->magic == M_COMPRESSED)
-+ mutt_open_read_compressed (ctx);
-+#endif
-+
- if(ctx->magic == 0)
- mutt_error (_("%s is not a mailbox."), path);
-
-@@ -748,6 +769,10 @@ void mx_fastclose_mailbox (CONTEXT *ctx)
- mutt_free_header (&ctx->hdrs[i]);
- FREE (&ctx->hdrs);
- FREE (&ctx->v2r);
-+#ifdef USE_COMPRESSED
-+ if (ctx->compressinfo)
-+ mutt_fast_close_compressed (ctx);
-+#endif
- FREE (&ctx->path);
- FREE (&ctx->pattern);
- if (ctx->limit_pattern)
-@@ -800,6 +825,12 @@ static int sync_mailbox (CONTEXT *ctx, i
-
- if (tmp && tmp->new == 0)
- mutt_update_mailbox (tmp);
-+
-+#ifdef USE_COMPRESSED
-+ if (rc == 0 && ctx->compressinfo)
-+ return mutt_sync_compressed (ctx);
-+#endif
-+
- return rc;
- }
-
-@@ -1001,6 +1032,11 @@ int mx_close_mailbox (CONTEXT *ctx, int
- !mutt_is_spool(ctx->path) && !option (OPTSAVEEMPTY))
- mx_unlink_empty (ctx->path);
-
-+#ifdef USE_COMPRESSED
-+ if (ctx->compressinfo && mutt_slow_close_compressed (ctx))
-+ return (-1);
-+#endif
-+
- mx_fastclose_mailbox (ctx);
-
- return 0;
-@@ -1310,6 +1346,11 @@ int mx_check_mailbox (CONTEXT *ctx, int
- {
- int rc;
-
-+#ifdef USE_COMPRESSED
-+ if (ctx->compressinfo)
-+ return mutt_check_mailbox_compressed (ctx);
-+#endif
-+
- if (ctx)
- {
- if (ctx->locked) lock = 0;
-diff -udprP mutt-1.5.19.orig/mx.h mutt-1.5.19/mx.h
---- mutt-1.5.19.orig/mx.h 2008-03-19 22:07:06.000000000 +0200
-+++ mutt-1.5.19/mx.h 2009-01-06 19:16:04.000000000 +0200
-@@ -40,6 +40,9 @@ enum
- M_MAILDIR,
- M_IMAP,
- M_POP
-+#ifdef USE_COMPRESSED
-+ , M_COMPRESSED
-+#endif
- };
-
- WHERE short DefaultMagic INITVAL (M_MBOX);
-diff -udprP mutt-1.5.19.orig/PATCHES mutt-1.5.19/PATCHES
---- mutt-1.5.19.orig/PATCHES 2008-03-19 22:07:06.000000000 +0200
-+++ mutt-1.5.19/PATCHES 2009-01-06 19:16:04.000000000 +0200
-@@ -0,0 +1 @@
-+rr.compressed
-diff -udprP mutt-1.5.19.orig/po/POTFILES.in mutt-1.5.19/po/POTFILES.in
---- mutt-1.5.19.orig/po/POTFILES.in 2008-03-19 22:07:57.000000000 +0200
-+++ mutt-1.5.19/po/POTFILES.in 2009-01-06 19:16:04.000000000 +0200
-@@ -8,6 +8,7 @@ charset.c
- color.c
- commands.c
- compose.c
-+compress.c
- crypt-gpgme.c
- crypt.c
- cryptglue.c
-diff -udprP mutt-1.5.19.orig/status.c mutt-1.5.19/status.c
---- mutt-1.5.19.orig/status.c 2009-01-05 21:20:53.000000000 +0200
-+++ mutt-1.5.19/status.c 2009-01-06 19:16:04.000000000 +0200
-@@ -96,6 +96,14 @@ status_format_str (char *buf, size_t buf
-
- case 'f':
- snprintf (fmt, sizeof(fmt), "%%%ss", prefix);
-+#ifdef USE_COMPRESSED
-+ if (Context && Context->compressinfo && Context->realpath)
-+ {
-+ strfcpy (tmp, Context->realpath, sizeof (tmp));
-+ mutt_pretty_mailbox (tmp, sizeof (tmp));
-+ }
-+ else
-+#endif
- if (Context && Context->path)
- {
- strfcpy (tmp, Context->path, sizeof (tmp));
+++ /dev/null
---- mutt-1.5.19/contrib/smime.rc~ 2008-03-19 21:07:57.000000000 +0100
-+++ mutt-1.5.19/contrib/smime.rc 2009-04-13 19:29:03.515858795 +0200
-@@ -4,7 +4,7 @@
-
- # If you compiled mutt with support for both PGP and S/MIME, PGP
- # will be the default method unless the following option is set
--set smime_is_default
-+# set smime_is_default
-
- # Uncoment this if you don't want to set labels for certificates you add.
- # unset smime_ask_cert_label
-@@ -13,30 +13,31 @@
- set smime_timeout=300
-
- # Global crypto options -- these affect PGP operations as well.
--set crypt_autosign = yes
--set crypt_replyencrypt = yes
--set crypt_replysign = yes
--set crypt_replysignencrypted = yes
-+# set crypt_autosign = yes
-+# set crypt_replyencrypt = yes
-+# set crypt_replysign = yes
-+# set crypt_replysignencrypted = yes
- set crypt_verify_sig = yes
-
- # Section A: Key Management.
-
- # 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"
-
- # Uncommen 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
-
- # Path to a file or directory with trusted certificates
--set smime_ca_location="~/.smime/ca-bundle.crt"
-+# set smime_ca_location="~/.smime/ca-bundle.crt"
-+set smime_ca_location="/etc/certs/ca-certificates.crt"
-
- # Path to where all known certificates go. (must exist!)
--set smime_certificates="~/.smime/certificates"
-+# set smime_certificates="~/.smime/certificates"
-
- # Path to where all private keys go. (must exist!)
--set smime_keys="~/.smime/keys"
-+# set smime_keys="~/.smime/keys"
-
- # These are used to extract a certificate from a message.
- # First generate a PKCS#7 structure from the message.
+++ /dev/null
-diff -udprP mutt-1.5.19.orig/globals.h mutt-1.5.19/globals.h
---- mutt-1.5.19.orig/globals.h 2009-01-04 01:27:10.000000000 +0200
-+++ mutt-1.5.19/globals.h 2009-01-06 19:40:35.000000000 +0200
-@@ -24,6 +24,8 @@ WHERE CONTEXT *Context;
- WHERE char Errorbuf[STRING];
- WHERE char AttachmentMarker[STRING];
-
-+WHERE char Quotebuf[SHORT_STRING];
-+
- #if defined(DL_STANDALONE) && defined(USE_DOTLOCK)
- WHERE char *MuttDotlock;
- #endif
-diff -udprP mutt-1.5.19.orig/handler.c mutt-1.5.19/handler.c
---- mutt-1.5.19.orig/handler.c 2009-01-05 21:20:53.000000000 +0200
-+++ mutt-1.5.19/handler.c 2009-01-06 19:40:35.000000000 +0200
-@@ -90,6 +90,8 @@ static void mutt_convert_to_state(iconv_
- if (ob != bufo)
- state_prefix_put (bufo, ob - bufo, s);
- }
-+ if (Quotebuf[0] != '\0')
-+ state_prefix_putc ('\n', s);
- return;
- }
-
-@@ -1473,6 +1475,8 @@ void mutt_decode_attachment (BODY *b, ST
- int istext = mutt_is_text_part (b);
- iconv_t cd = (iconv_t)(-1);
-
-+ Quotebuf[0] = '\0';
-+
- if (istext && s->flags & M_CHARCONV)
- {
- char *charset = mutt_get_parameter ("charset", b->parameter);
-@@ -1542,7 +1546,7 @@ int mutt_body_handler (BODY *b, STATE *s
- */
- if ((WithCrypto & APPLICATION_PGP) && mutt_is_application_pgp (b))
- handler = crypt_pgp_application_pgp_handler;
-- else if (ascii_strcasecmp ("flowed", mutt_get_parameter ("format", b->parameter)) == 0)
-+ else if (ascii_strcasecmp ("flowed", mutt_get_parameter ("format", b->parameter)) == 0 && !s->prefix)
- handler = rfc3676_handler;
- else
- plaintext = 1;
-diff -udprP mutt-1.5.19.orig/init.h mutt-1.5.19/init.h
---- mutt-1.5.19.orig/init.h 2009-01-05 21:20:53.000000000 +0200
-+++ mutt-1.5.19/init.h 2009-01-06 19:40:35.000000000 +0200
-@@ -2451,6 +2451,19 @@ struct option_t MuttVars[] = {
- ** have no effect, and if it is set to \fIask-yes\fP or \fIask-no\fP, you are
- ** prompted for confirmation when you try to quit.
- */
-+ { "quote_empty", DT_BOOL, R_NONE, OPTQUOTEEMPTY, 1 },
-+ /*
-+ ** .pp
-+ ** Controls whether or not empty lines will be quoted using
-+ ** ``$indent_string''.
-+ */
-+ { "quote_quoted", DT_BOOL, R_NONE, OPTQUOTEQUOTED, 0 },
-+ /*
-+ ** .pp
-+ ** Controls how quoted lines will be quoted. If set, one quote
-+ ** character will be added to the end of existing prefix. Otherwise,
-+ ** quoted lines will be prepended by ``$indent_string''.
-+ */
- { "quote_regexp", DT_RX, R_PAGER, UL &QuoteRegexp, UL "^([ \t]*[|>:}#])+" },
- /*
- ** .pp
-diff -udprP mutt-1.5.19.orig/mutt.h mutt-1.5.19/mutt.h
---- mutt-1.5.19.orig/mutt.h 2008-09-26 01:00:03.000000000 +0300
-+++ mutt-1.5.19/mutt.h 2009-01-06 19:40:35.000000000 +0200
-@@ -398,6 +398,8 @@ enum
- OPTPRINTDECODE,
- OPTPRINTSPLIT,
- OPTPROMPTAFTER,
-+ OPTQUOTEEMPTY,
-+ OPTQUOTEQUOTED,
- OPTREADONLY,
- OPTREPLYSELF,
- OPTRESOLVE,
-diff -udprP mutt-1.5.19.orig/muttlib.c mutt-1.5.19/muttlib.c
---- mutt-1.5.19.orig/muttlib.c 2009-01-05 21:20:53.000000000 +0200
-+++ mutt-1.5.19/muttlib.c 2009-01-06 19:40:35.000000000 +0200
-@@ -1497,15 +1497,45 @@ void state_prefix_putc (char c, STATE *s
- {
- if (s->flags & M_PENDINGPREFIX)
- {
-- state_reset_prefix (s);
-- if (s->prefix)
-- state_puts (s->prefix, s);
-- }
-+ int i;
-
-- state_putc (c, s);
-+ i = strlen (Quotebuf);
-+ Quotebuf[i++] = c;
-+ Quotebuf[i] = '\0';
-+ if (i == sizeof (Quotebuf) - 1 || c == '\n')
-+ {
-+ char buf[2 * SHORT_STRING];
-+ int j = 0, offset = 0;
-+ regmatch_t pmatch[1];
-+
-+ state_reset_prefix (s);
-+ while (regexec ((regex_t *) QuoteRegexp.rx, &Quotebuf[offset], 1, pmatch, 0) == 0)
-+ offset += pmatch->rm_eo;
-+
-+ if (!option (OPTQUOTEEMPTY) && Quotebuf[0] == '\n')
-+ strcpy (buf, Quotebuf);
-+ else if (option (OPTQUOTEQUOTED) && offset)
-+ {
-+ for (i = 0; i < offset; i++)
-+ if (Quotebuf[i] != ' ')
-+ j = i;
-+ strncpy (buf, Quotebuf, j + 1);
-+ strcpy (buf + j + 1, Quotebuf + j);
-+ }
-+ else
-+ snprintf (buf, sizeof (buf), "%s%s", NONULL(s->prefix), Quotebuf);
-+
-+ state_puts (buf, s);
-+ }
-+ }
-+ else
-+ state_putc (c, s);
-
- if (c == '\n')
-+ {
- state_set_prefix (s);
-+ Quotebuf[0] = '\0';
-+ }
- }
-
- int state_printf (STATE *s, const char *fmt, ...)
-diff -udprP mutt-1.5.19.orig/PATCHES mutt-1.5.19/PATCHES
---- mutt-1.5.19.orig/PATCHES 2008-03-19 22:07:06.000000000 +0200
-+++ mutt-1.5.19/PATCHES 2009-01-06 19:40:35.000000000 +0200
-@@ -0,0 +1 @@
-+vvv.quote
+++ /dev/null
-x-face patch for Mutt 1.5.6
-
-Copied from Debian's slrnface package:
-
- http://dave.willfork.com/slrnface/
- Upstream Author: Drazen Kacar <dave@arsdigita.com>
- Copyright: /usr/share/common-licenses/GPL
-
-
---- mutt-1.4./README.xface Thu Jan 1 01:00:00 1970
-+++ mutt-1.4/README.xface Sat Aug 24 02:29:23 2002
-@@ -0,0 +1,80 @@
-+This is slrnface, a small helper utility which displays X-Faces on behalf
-+of programs like slrn and mutt when they are run in the X11 terminal
-+emulator.
-+
-+Requirements:
-+
-+a) X11.
-+b) Terminal emulator which sets WINDOWID environment variable. Most of the
-+ ones in common use will set it. If you're using some terminal emulator
-+ which doesn't have this capability, you'll have to set it yourself.
-+
-+How to build:
-+
-+a) Install libcompface. I recommend getting the source from the nearest
-+ Debian GNU/Linux mirror because there's a patch which adds the
-+ ability to output XBM image, as well as the historic brain dead
-+ format. Slrnface doesn't use that feature, but it might be handy for
-+ something else.
-+
-+b) Edit Makefile.
-+
-+c) Invoke make.
-+
-+d) Install with "make install".
-+
-+Upgrading from version 1.x:
-+
-+ If you have used one of the older versions of slrnface, you probably
-+ have .slrnface file in your home directory. You can delete it, because
-+ the new version doesn't use it any more. Instead, the pipes will be
-+ created in $HOME/.slrnfaces directory. There are no other user visible
-+ changes.
-+
-+Using slrnface with slrn:
-+
-+ This version requires S-Lang 1.4 or later and slrn 0.9.7.4. It might
-+ work with slrn 0.9.7.3, but I haven't tested that configuration. It
-+ will not work properly with older versions.
-+
-+ In case you can't or won't upgrade, take a look at the slrnface home
-+ page. You'll find older versions which might work with what you have.
-+
-+ Take a look at slrnface.sl, edit if you want and then include it in
-+ your .slrnrc, like this:
-+
-+ interpret slrnface.sl
-+
-+ Run slrn.
-+
-+Using slrnface with mutt:
-+
-+ Mutt doesn't have a way to use some kind of embeded interpreter, like
-+ S-Lang. Since Mutt's current capabilities are not good enough for our
-+ purposes, a patch for the source is provided. It has been tested with
-+ mutt 1.4, but it should work with the 1.3.x series, if x is high
-+ enough.
-+
-+ Uncompress mutt 1.4 source and apply mutt.patch from the slrnface
-+ distribution.
-+
-+ Compile mutt as usual.
-+
-+ Edit your ~/.muttrc and add:
-+
-+ set xface=yes
-+
-+ Run mutt.
-+
-+If you think X-Faces are not placed at the appropriate location on your
-+terminal emulator window or you don't like the colors, set some X resources.
-+Read the man page for more information. Additional documentation is in the
-+doc directory.
-+
-+Licence: GPL. See file called COPYING.
-+
-+Special thanks to Mark R. Bowyer for proofreading the man page.
-+
-+Home page: http://dave.willfork.com/slrnface/
-+
-+dave@willfork.com
-diff -urp ../MUTT/mutt/PATCHES mutt/PATCHES
---- ../MUTT/mutt/PATCHES 2002-12-09 18:44:54.000000000 +0100
-+++ mutt/PATCHES 2004-07-21 16:02:16.000000000 +0200
-@@ -0,0 +1 @@
-+patch-1.5.6.cb.xface.1
-diff -urp ../MUTT/mutt/globals.h mutt/globals.h
---- ../MUTT/mutt/globals.h.orig 2007-03-26 14:49:03.226880430 +0200
-+++ mutt/globals.h 2007-03-26 14:51:13.227945753 +0200
-@@ -218,6 +218,8 @@
- WHERE ALIAS *Aliases INITVAL (0);
- WHERE LIST *UserHeader INITVAL (0);
-
-+WHERE int slrnface_fd INITVAL (-1);
-+
- /*-- formerly in pgp.h --*/
- WHERE REGEXP PgpGoodSign;
- WHERE char *PgpSignAs;
-diff -urp ../MUTT/mutt/init.c mutt/init.c
---- ../MUTT/mutt/init.c 2004-07-18 01:25:28.000000000 +0200
-+++ mutt/init.c 2004-07-21 13:33:47.000000000 +0200
-@@ -43,6 +43,8 @@
- #include <string.h>
- #include <sys/utsname.h>
- #include <errno.h>
-+#include <sys/types.h>
-+#include <fcntl.h>
- #include <sys/wait.h>
-
- void toggle_quadoption (int opt)
-@@ -2356,3 +2358,131 @@ int mutt_get_hook_type (const char *name
- return c->data;
- return 0;
- }
-+
-+void mutt_start_slrnface(void)
-+{
-+ char *fifo;
-+ int pathlen, status;
-+ pid_t pid, pidst;
-+ struct utsname u;
-+
-+ if (!option(OPTXFACE))
-+ return;
-+
-+ /*
-+ * If we don't have display, there's no point. The user probably knows,
-+ * so fail silently.
-+ */
-+ if (!getenv("DISPLAY"))
-+ return;
-+ /* If there is no WINDOWID, complain. */
-+ if (!getenv ("WINDOWID"))
-+ {
-+ mutt_error (_("Cannot run slrnface: WINDOWID not found in environment."));
-+ return;
-+ }
-+
-+ uname (&u);
-+ pathlen = strlen (Homedir) + sizeof("/.slrnfaces/")
-+ + strlen (u.nodename) + 30;
-+ fifo = safe_malloc (pathlen);
-+ sprintf (fifo, "%s/.slrnfaces", Homedir);
-+ if (mkdir (fifo, 0700))
-+ {
-+ if (errno != EEXIST)
-+ {
-+ mutt_error (_("Cannot run slrnface: failed to create %s: %s."),
-+ fifo, strerror(errno));
-+ return;
-+ }
-+ }
-+ else
-+ {
-+ FILE *fp;
-+
-+ /* We'll abuse fifo filename memory here. It's long enough. */
-+ sprintf (fifo, "%s/.slrnfaces/README", Homedir);
-+ if ((fp = fopen (fifo, "w")) != NULL)
-+ {
-+ fputs (_(
-+"This directory is used to create named pipes for communication between\n"
-+"slrnface and its parent process. It should normally be empty because\n"
-+"the pipe is deleted right after it has been opened by both processes.\n\n"
-+"File names generated by slrnface have the form \"hostname.pid\". It is\n"
-+"probably an error if they linger here longer than a fraction of a second.\n\n"
-+"However, if the directory is mounted from an NFS server, you might see\n"
-+"special files created by your NFS server while slrnface is running.\n"
-+"Do not try to remove them.\n"), fp);
-+ fclose (fp);
-+ }
-+ }
-+
-+ status = snprintf (fifo, pathlen, "%s/.slrnfaces/%s.%ld", Homedir,
-+ u.nodename, (long)getpid());
-+ if (status < 0)
-+ goto clean_face;
-+
-+ unlink (fifo);
-+ if (mkfifo (fifo, 0600) < 0)
-+ {
-+ mutt_error (_("Cannot run slrnface, failed to create %s: %s."), fifo,
-+ strerror(errno));
-+ goto clean_face;
-+ }
-+
-+ pid = fork();
-+ switch (pid)
-+ {
-+ case -1: break;
-+ case 0: execlp ("slrnface", "slrnface", fifo, (char *)0);
-+ /* This is child, exit on error. */
-+ _exit (10);
-+ default: do {
-+ pidst = waitpid (pid, &status, 0);
-+ } while (pidst == -1 && errno == EINTR);
-+
-+ if (!WIFEXITED (status))
-+ mutt_error (_("Slrnface abnormaly exited, code %d."), status);
-+ else
-+ {
-+ char *message;
-+
-+ switch (WEXITSTATUS (status))
-+ {
-+ case 0: /* All fine, open the pipe */
-+ slrnface_fd = open (fifo, O_WRONLY, 0600);
-+ write (slrnface_fd, "start\n", sizeof "start");
-+ goto clean_face;
-+ case 1: message = "couldn't connect to display";
-+ break;
-+ case 2: message = "WINDOWID not found in environment";
-+ break;
-+ case 3: message = "couldn't find controlling terminal";
-+ break;
-+ case 4: message = "terminal doesn't export width and height";
-+ break;
-+ case 5: message = "cannot open FIFO";
-+ break;
-+ case 6: message = "fork() failed";
-+ break;
-+ case 10: message = "executable not found";
-+ break;
-+ default: message = "unknown error";
-+ }
-+ mutt_error (_("Slrnface failed: %s."), message);
-+ }
-+ }
-+
-+clean_face:
-+ unlink (fifo);
-+ free (fifo);
-+}
-+
-+void mutt_stop_slrnface(void)
-+{
-+ if (slrnface_fd >= 0)
-+ close(slrnface_fd);
-+ slrnface_fd = -1;
-+
-+ /* FIFO has been unlinked in the startup function. */
-+}
-diff -urp ../MUTT/mutt/init.h mutt/init.h
---- ../MUTT/mutt/init.h 2004-07-21 13:33:02.000000000 +0200
-+++ mutt/init.h 2004-07-21 13:33:47.000000000 +0200
-@@ -2736,6 +2736,12 @@ struct option_t MuttVars[] = {
- ** Controls whether mutt writes out the Bcc header when preparing
- ** messages to be sent. Exim users may wish to use this.
- */
-+ { "xface", DT_BOOL, R_NONE, OPTXFACE, 0 },
-+ /*
-+ ** .pp
-+ ** Controls whether mutt uses slrnface to display X-Faces when run
-+ ** in an X11 terminal emulator.
-+ */
- /*--*/
- { NULL }
- };
-diff -urp ../MUTT/mutt/main.c mutt/main.c
---- ../MUTT/mutt/main.c 2004-06-18 17:24:22.000000000 +0200
-+++ mutt/main.c 2004-07-21 13:33:47.000000000 +0200
-@@ -905,6 +905,8 @@ int main (int argc, char **argv)
-
- mutt_folder_hook (folder);
-
-+ mutt_start_slrnface();
-+
- if((Context = mx_open_mailbox (folder, ((flags & M_RO) || option (OPTREADONLY)) ? M_READONLY : 0, NULL))
- || !explicit_folder)
- {
-@@ -913,6 +915,8 @@ int main (int argc, char **argv)
- FREE (&Context);
- }
- mutt_endwin (Errorbuf);
-+
-+ mutt_stop_slrnface();
- }
-
- exit (0);
-diff -urp ../MUTT/mutt/mutt.h mutt/mutt.h
---- ../MUTT/mutt/mutt.h 2004-07-21 13:33:02.000000000 +0200
-+++ mutt/mutt.h 2004-07-21 13:33:47.000000000 +0200
-@@ -435,6 +435,7 @@ enum
- OPTWRAP,
- OPTWRAPSEARCH,
- OPTWRITEBCC, /* write out a bcc header? */
-+ OPTXFACE,
- OPTXMAILER,
-
- OPTCRYPTUSEGPGME,
-@@ -577,6 +578,7 @@ typedef struct envelope
- BUFFER *spam;
- LIST *references; /* message references (in reverse order) */
- LIST *in_reply_to; /* in-reply-to header content */
-+ LIST *x_face; /* X-Face header content */
- LIST *userhdrs; /* user defined headers */
- } ENVELOPE;
-
-diff -urp ../MUTT/mutt/muttlib.c mutt/muttlib.c
---- ../MUTT/mutt/muttlib.c 2004-07-18 01:25:28.000000000 +0200
-+++ mutt/muttlib.c 2004-07-21 13:33:47.000000000 +0200
-@@ -651,6 +651,7 @@ void mutt_free_envelope (ENVELOPE **p)
- FREE (&(*p)->date);
- mutt_free_list (&(*p)->references);
- mutt_free_list (&(*p)->in_reply_to);
-+ mutt_free_list (&(*p)->x_face);
- mutt_free_list (&(*p)->userhdrs);
- FREE (p);
- }
-diff -urp ../MUTT/mutt/pager.c mutt/pager.c
---- ../MUTT/mutt/pager.c 2004-07-18 01:25:28.000000000 +0200
-+++ mutt/pager.c 2004-07-21 13:36:34.000000000 +0200
-@@ -1441,6 +1441,66 @@ upNLines (int nlines, struct line_t *inf
- return cur;
- }
-
-+static void
-+mutt_display_xface (HEADER *hdr)
-+{
-+ LIST *face;
-+ char buf[2000];
-+
-+ if (slrnface_fd < 0)
-+ return;
-+
-+ if (!hdr)
-+ return;
-+
-+ face = hdr->env->x_face;
-+
-+ if (face == NULL || face->data == NULL)
-+ write(slrnface_fd, "clear\n", sizeof "clear");
-+ else
-+ do {
-+ int len;
-+
-+ len = snprintf (buf, sizeof (buf), "xface %s\n", face->data);
-+ if (len <= sizeof (buf))
-+ {
-+ write (slrnface_fd, buf, len);
-+ break;
-+ }
-+ /*
-+ * slrnface will ignore X-Faces larger than approx. 2000 chars, so
-+ * try the next one, if it exists.
-+ */
-+ } while (face = face->next);
-+}
-+
-+static void
-+mutt_clear_xface (void)
-+{
-+ if (slrnface_fd < 0)
-+ return;
-+
-+ write(slrnface_fd, "clear\n", sizeof "clear");
-+}
-+
-+static void
-+mutt_suppress_xface (void)
-+{
-+ if (slrnface_fd < 0)
-+ return;
-+
-+ write(slrnface_fd, "suppress\n", sizeof "suppress");
-+}
-+
-+static void
-+mutt_show_xface (void)
-+{
-+ if (slrnface_fd < 0)
-+ return;
-+
-+ write(slrnface_fd, "show\n", sizeof "show");
-+}
-+
- static struct mapping_t PagerHelp[] = {
- { N_("Exit"), OP_EXIT },
- { N_("PrevPg"), OP_PREV_PAGE },
-@@ -1545,6 +1605,9 @@ mutt_pager (const char *banner, const ch
- snprintf (helpstr, sizeof (helpstr), "%s %s", tmphelp, buffer);
- }
-
-+ if (IsHeader (extra))
-+ mutt_display_xface(extra->hdr);
-+
- while (ch != -1)
- {
- mutt_curs_set (0);
-@@ -2067,7 +2130,9 @@ search_next:
- if (! InHelp)
- {
- InHelp = 1;
-+ mutt_suppress_xface ();
- mutt_help (MENU_PAGER);
-+ mutt_show_xface ();
- redraw = REDRAW_FULL;
- InHelp = 0;
- }
-@@ -2383,59 +2448,71 @@ CHECK_IMAP_ACL(IMAP_ACL_WRITE);
- case OP_MAIL:
- CHECK_MODE(IsHeader (extra) && !IsAttach (extra));
- CHECK_ATTACH;
-+ mutt_suppress_xface ();
- ci_send_message (0, NULL, NULL, extra->ctx, NULL);
-+ mutt_show_xface ();
- redraw = REDRAW_FULL;
- break;
-
- case OP_REPLY:
- CHECK_MODE(IsHeader (extra) || IsMsgAttach (extra));
- CHECK_ATTACH;
-+ mutt_suppress_xface();
- if (IsMsgAttach (extra))
- mutt_attach_reply (extra->fp, extra->hdr, extra->idx,
- extra->idxlen, extra->bdy,
- SENDREPLY);
- else
- ci_send_message (SENDREPLY, NULL, NULL, extra->ctx, extra->hdr);
-+ mutt_show_xface ();
- redraw = REDRAW_FULL;
- break;
-
- case OP_RECALL_MESSAGE:
- CHECK_MODE(IsHeader (extra) && !IsAttach(extra));
- CHECK_ATTACH;
-+ mutt_suppress_xface();
- ci_send_message (SENDPOSTPONED, NULL, NULL, extra->ctx, extra->hdr);
-+ mutt_show_xface ();
- redraw = REDRAW_FULL;
- break;
-
- case OP_GROUP_REPLY:
- CHECK_MODE(IsHeader (extra) || IsMsgAttach (extra));
- CHECK_ATTACH;
-+ mutt_suppress_xface();
- if (IsMsgAttach (extra))
- mutt_attach_reply (extra->fp, extra->hdr, extra->idx,
- extra->idxlen, extra->bdy, SENDREPLY|SENDGROUPREPLY);
- else
- ci_send_message (SENDREPLY | SENDGROUPREPLY, NULL, NULL, extra->ctx, extra->hdr);
-+ mutt_suppress_xface ();
- redraw = REDRAW_FULL;
- break;
-
- case OP_LIST_REPLY:
- CHECK_MODE(IsHeader (extra) || IsMsgAttach (extra));
- CHECK_ATTACH;
-+ mutt_suppress_xface();
- if (IsMsgAttach (extra))
- mutt_attach_reply (extra->fp, extra->hdr, extra->idx,
- extra->idxlen, extra->bdy, SENDREPLY|SENDLISTREPLY);
- else
- ci_send_message (SENDREPLY | SENDLISTREPLY, NULL, NULL, extra->ctx, extra->hdr);
-+ mutt_show_xface ();
- redraw = REDRAW_FULL;
- break;
-
- case OP_FORWARD_MESSAGE:
- CHECK_MODE(IsHeader (extra) || IsMsgAttach (extra));
- CHECK_ATTACH;
-+ mutt_suppress_xface();
- if (IsMsgAttach (extra))
- mutt_attach_forward (extra->fp, extra->hdr, extra->idx,
- extra->idxlen, extra->bdy);
- else
- ci_send_message (SENDFORWARD, NULL, NULL, extra->ctx, extra->hdr);
-+ mutt_show_xface ();
- redraw = REDRAW_FULL;
- break;
-
-@@ -2485,7 +2562,9 @@ CHECK_IMAP_ACL(IMAP_ACL_WRITE);
- break;
-
- case OP_SHELL_ESCAPE:
-+ mutt_suppress_xface ();
- mutt_shell_escape ();
-+ mutt_show_xface ();
- MAYBE_REDRAW (redraw);
- break;
-
-@@ -2644,5 +2723,6 @@ CHECK_IMAP_ACL(IMAP_ACL_DELETE);
- FREE (&lineInfo);
- if (index)
- mutt_menuDestroy(&index);
-+ mutt_clear_xface ();
- return (rc != -1 ? rc : 0);
- }
-diff -urp ../MUTT/mutt/parse.c mutt/parse.c
---- ../MUTT/mutt/parse.c 2004-07-21 13:33:02.000000000 +0200
-+++ mutt/parse.c 2004-07-21 13:33:47.000000000 +0200
-@@ -85,6 +85,27 @@ static char *read_rfc822_line (FILE *f,
- /* not reached */
- }
-
-+static LIST *mutt_add_x_face (LIST *lst, char *face)
-+{
-+ LIST *n;
-+
-+ n = safe_malloc(sizeof(LIST));
-+ n->data = safe_strdup(face);
-+ n->next = NULL;
-+
-+ if (lst)
-+ {
-+ LIST *l;
-+
-+ for(l = lst; l->next; l = l->next);
-+ l->next = n;
-+ }
-+ else
-+ lst = n;
-+
-+ return lst;
-+}
-+
- static LIST *mutt_parse_references (char *s, int in_reply_to)
- {
- LIST *t, *lst = NULL;
-@@ -1231,6 +1252,11 @@ int mutt_parse_rfc822_line (ENVELOPE *e,
- e->x_label = safe_strdup(p);
- matched = 1;
- }
-+ else if (ascii_strcasecmp (line+1, "-face") == 0)
-+ {
-+ e->x_face = mutt_add_x_face (e->x_face, p);
-+ matched = 1;
-+ }
-
- default:
- break;
-diff -urp ../MUTT/mutt/sendlib.c mutt/sendlib.c
---- ../MUTT/mutt/sendlib.c 2004-07-21 13:33:02.000000000 +0200
-+++ mutt/sendlib.c 2004-07-21 13:37:16.000000000 +0200
-@@ -1697,6 +1697,15 @@ int mutt_write_rfc822_header (FILE *fp,
- }
- }
-
-+ /* Add X-Face headers */
-+ if (env->x_face)
-+ {
-+ LIST *face;
-+
-+ for (face = env->x_face; face; face = face->next)
-+ fprintf (fp, "X-Face: %s\n", face->data);
-+ }
-+
- if (mode == 0 && !privacy && option (OPTXMAILER) && !has_agent)
- {
- /* Add a vanity header */
+++ /dev/null
-.\" -*-nroff-*-
-.\"
-.\"
-.\" Copyright (C) 1996-2000 Michael R. Elkins <me@cs.hmc.edu>
-.\"
-.\" 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.
-.\"
-.\" {PTM/TW/0.1/30-06-1999/"agent pocztowy u¿ytkownika"}
-.\" Translation (c) 1999 Tomasz Wendlandt <juggler@cp.pl>.
-.\" transl.updated: PTM/WK/2000-VI
-.TH mutt 1 "luty 2000" Unix "podrêcznik u¿ytkownika"
-.SH NAZWA
-mutt - agent pocztowy u¿ytkownika (MUA)
-.SH SK£ADNIA
-.TP 6
-.B mutt
-.RB [ -hnpRvxyzZ ]
-.RB [-a
-.IR plik ]
-.RB [ -b
-.IR adres ]
-.RB [ -c
-.IR adres ]
-.br
-.RB [ -e
-.IR polecenie ]
-.RB [-f
-.IR skrzynka ]
-.RB [ -F
-.IR muttrc ]
-.RB [ -H
-.IR szkic ]
-.br
-.RB [ -i
-.IR za³±cznik ]
-.RB [ -m
-.IR typ ]
-.RB [ -s
-.IR temat ]
-.SH OPIS
-.PP
-Mutt jest ma³ym, lecz bardzo silnym programem tekstowym, przeznaczonym do
-czytania poczty elektronicznej pod systemem operacyjnym unix, posiada takie
-funkcje jak kolorowy terminal, MIME i w±tkowanie.
-.SH OPCJE
-.TP
-.BI -a " plik"
-Za³±cza plik do twojej wiadomo¶ci u¿ywaj±c MIME.
-.TP
-.BI -b " adres"
-Okre¶la odbiorcê ¶lepej kopii wiadomo¶ci (BCC).
-.TP
-.BI -c " adres"
-Okre¶la odbiorcê kopii wiadomo¶ci (CC).
-.TP
-.BI -e " polecenie"
-Okre¶la polecenie konfiguracyjne, które ma byæ wykonane po inicjalizacji.
-.TP
-.BI -f " skrzynka"
-Okre¶la, któr± skrzynkê pocztow± wczytaæ.
-.TP
-.BI -F " muttrc"
-Okre¶la plik inicjalizacji, który ma byæ u¿yty zamiast ~/.muttrc
-.TP
-.BI "-h"
-Wy¶wietla pomoc.
-.TP
-.BI -H " szkic"
-Okre¶la plik ze szkicem zawieraj±cy nag³ówek i tre¶æ wiadomo¶ci,
-które bêd± u¿yte do wys³ania wiadomo¶ci.
-.TP
-.BI -i " za³±cznik"
-Okre¶la plik do w³±czenia w tre¶æ wiadomo¶ci.
-.TP
-.BI -m " typ"
-Okre¶la domy¶lny typ skrzynki pocztowej.
-.TP
-.B -n
-Sprawia, i¿ Mutt pomija ogólnosystemowy plik konfiguracyjny.
-.TP
-.B -p
-Ponownie otwiera zarzucony list.
-.TP
-.B -R
-Otwiera skrzynkê w trybie tylko do odczytu.
-.TP
-.BI -s " temat"
-Okre¶la temat wiadomo¶ci.
-.TP
-.B -v
-Wy¶wietla wersjê Mutt'a i wkompilowane parametry.
-.TP
-.B -x
-Symuluje tryb tworzenia wiadomo¶ci mailx.
-.TP
-.BI -y
-Uruchamia Mutt'a z list± wszystkich skrzynek pocztowych okre¶lonych
-poleceniem \fBmailboxes\fP.
-.TP
-.B -z
-Kiedy jest u¿ywane z \fB-f\fP, powoduje i¿ Mutt nie uruchamia siê je¿eli
-w skrzynce nie ma ¿adnych wiadomo¶ci.
-.TP
-.B -Z
-Powoduje, i¿ Mutt otwiera pierwsz± zawieraj±c± now± wiadomo¶æ skrzynkê
-spo¶ród okre¶lonych przez polecenie \fBmailboxes\fP.
-.SH ¦RODOWISKO
-.TP
-.B EDITOR
-Edytor wywo³ywany podczas komponowania wiadomo¶ci.
-.TP
-.B HOME
-Pe³na ¶cie¿ka do katalogu domowego u¿ytkownika.
-.TP
-.B MAIL
-Pe³na ¶cie¿ka do katalogu buforowania skrzynki u¿ytkownika.
-.TP
-.B MAILCAPS
-¦cie¿ka przeszukiwania dla plików mailcap.
-.TP
-.B MM_NOASK
-Je¿eli ta zmienna jest ustawiona, to mailcap s± zawsze u¿ywane uprzedniego
-pytania.
-.TP
-.B PGPPATH
-Katalog, w którym znajduje siê pêk kluczy PGP (keyring) u¿ytkownika.
-.TP
-.B TMPDIR
-Katalog, w którym tworzone s± pliki tymczasowe.
-.TP
-.B REPLYTO
-Standardowy adres, na który maj± byæ odsy³ane odpowiedzi na wys³an± przez
-u¿ytkownika pocztê.
-.TP
-.B VISUAL
-Edytor wywo³ywany kiedy we wbudowanym edytorze podane jest polecenie ~v.
-.SH PLIKI
-.IP "~/.muttrc"
-Plik konfiguracyjny u¿ytkownika.
-.IP "/etc/Muttrc"
-Ogólnosystemowy plik konfiguracyjny.
-.IP "/tmp/muttXXXXXX"
-Pliki tymczasowe tworzone przez Mutt'a.
-.IP "~/.mailcap"
-Definicja u¿ytkownika do obs³ugi nietekstowych typów MIME.
-.IP "/etc/mailcap"
-Definicja systemu do obs³ugi nietekstowych typów MIME.
-.IP "~/.mime.types"
-Osobiste mapowanie u¿ytkownika pomiêdzy typem MIME i rozszerzeniami pliku.
-.IP "/etc/mime.types"
-Mapowanie systemowe pomiêdzy typem MIME i rozszerzeniami pliku.
-.IP "/usr/local/bin/mutt_dotlock"
-Uprzywilejowany program do dotlockingu.
-.SH B£ÊDY
-Zawieszenie/wznawianie pracy podczas edytowania pliku za pomoc± edytora
-zewnêtrznego nie dzia³a pod SunOS 4.x, je¿eli u¿ywasz bibliotek curses
-w /usr/5lib. Jednak¿e \fIdzia³a\fP to z bibliotekami S-Lang.
-.PP
-Zmiana wielko¶ci ekranu podczas korzystania z zewnêtrznego pagera powoduje,
-i¿ Mutt fiksuje na niektórych systemach.
-.PP
-Zawieszenie/wznawianie nie dzia³a pod Ultrix.
-.PP
-Linia help dla menu nie jest uaktualniana, je¿eli zmienisz powi±zania dla
-jednej z pokazanych w niej funkcji podczas pracy z Muttem.
-.SH BRAK GWARANCJI
-Niniejszy program rozpowszechniany jest z nadziej±, i¿ bêdzie on u¿yteczny
-\-\- jednak BEZ JAKIEJKOLWIEK GWARANCJI, nawet domy¶lnej gwarancji
-PRZYDATNO¦CI HANDLOWEJ albo PRZYDATNO¦CI DO OKRE¦LONYCH ZASTOSOWAÑ.
-W celu uzyskania bli¿szych informacji - Powszechna Licencja Publiczna GNU.
-.SH ZOBACZ TAK¯E
-.BR muttrc (5),
-.BR curses (3),
-.BR mutt_dotlock (1),
-.BR ncurses (3),
-.BR sendmail (1),
-.BR smail (1),
-.BR mailcap (5)
-.PP
-Strona domowa Mutt'a: http://www.mutt.org/
-.PP
-Powszechna Licencja Publiczna GNU (The GNU General Public License).
-.SH AUTOR
-Michael Elkins i inni. Skorzystaj z <mutt-dev@mutt.org> by skontaktowaæ
-siê z twórcami.
+++ /dev/null
-[Desktop Entry]
-Name=Mutt
-Comment=The Mutt Mail User Agent
-Comment[es]=Cliente de Correo Electrónico
-Comment[pl]=Program pocztowy mutt
-Comment[pt]=Cliente de Correio Eletrônico
-Comment[pt_BR]=Cliente de Correio Eletrônico
-Comment[sv]=E-postläsare
-Icon=mutt
-Exec=mutt
-Terminal=true
-Type=Application
-Categories=ConsoleOnly;Network;Email;
-# vi: encoding=utf-8
+++ /dev/null
-#
-# TODO:
-# - finish -folder_columns.patch
-#
-# Conditional build:
-%bcond_with slang # use slang library instead of ncurses
-%bcond_with nntp # use VVV's NNTP patch
-%bcond_with folder_column # build with folder_column patch
-%bcond_with imap_recent # show IMAP RECENT messages as new (instead of UNSEEN)
-%bcond_without sasl # don't use sasl
-%bcond_without home_etc # don't use home_etc
-#
-Summary: The Mutt Mail User Agent
-Summary(de.UTF-8): Der Mutt Mail-User-Agent
-Summary(es.UTF-8): Mutt, cliente de correo electrónico
-Summary(fr.UTF-8): Agent courrier Mutt
-Summary(ko.UTF-8): 텍스트 기반의 MUA
-Summary(pl.UTF-8): Program pocztowy Mutt
-Summary(pt_BR.UTF-8): Mutt, cliente de correio eletrônico
-Summary(ru.UTF-8): Почтовая клиентская программа Mutt
-Summary(tr.UTF-8): Mutt elektronik posta programı
-Summary(uk.UTF-8): Поштова клієнтська програма Mutt
-Name: mutt
-Version: 1.5.21
-Release: 0.1
-Epoch: 6
-License: GPL v2+
-Group: Applications/Mail
-Source0: ftp://ftp.mutt.org/mutt/devel/%{name}-%{version}.tar.gz
-# Source0-md5: a29db8f1d51e2f10c070bf88e8a553fd
-Source1: %{name}.desktop
-Source2: %{name}.png
-Source3: %{name}.1.pl
-Patch0: %{name}-pl.po-update.patch
-Patch1: %{name}-forcedotlock.patch
-# http://mutt.org.ua/download/
-Patch2: %{name}-rr.compressed.patch
-Patch3: %{name}-bj.status-time.patch
-# http://mutt.org.ua/download/
-Patch4: %{name}-vvv.quote.patch
-Patch5: %{name}-null_name.patch
-Patch6: %{name}-cd.trash_folder.patch
-Patch7: %{name}-cd.purge_message.patch
-Patch8: %{name}-cd.signatures_menu.patch
-# http://www.mutt.ca/patches/ (dw.crypt-autoselectkey)
-Patch9: %{name}-crypt-autoselectkey.patch
-Patch10: %{name}-manual.patch
-Patch11: %{name}-xface.patch
-Patch12: %{name}-Muttrc_mbox_path.patch
-Patch13: %{name}-po.patch
-# http://mutt.org.ua/download/
-Patch14: %{name}-vvv.nntp.patch
-Patch15: %{name}-home_etc.patch
-Patch16: %{name}-Muttrc.patch
-Patch17: %{name}-muttbug-tmp.patch
-Patch18: %{name}-folder_columns.patch
-Patch19: %{name}-imap_recent.patch
-Patch20: %{name}-Muttrc.head.patch
-Patch21: %{name}-smime.rc.patch
-URL: http://www.mutt.org/
-BuildRequires: autoconf
-BuildRequires: automake
-%{?with_sasl:BuildRequires: cyrus-sasl-devel >= 2.1.0}
-BuildRequires: db-devel >= 4.0
-BuildRequires: docbook-dtd42-xml
-BuildRequires: docbook-style-xsl
-%{?with_home_etc:BuildRequires: home-etc-devel >= 1.0.8}
-BuildRequires: gettext-devel
-BuildRequires: gpgme-devel >= 1:1.1.0
-BuildRequires: libidn-devel
-BuildRequires: lynx
-%{!?with_slang:BuildRequires: ncurses-devel >= 5.0}
-BuildRequires: openssl-devel >= 0.9.7d
-%{?with_slang:BuildRequires: slang-devel}
-BuildRequires: libxslt-progs
-Requires: iconv
-%{?with_home_etc:Requires: home-etc >= 1.0.8}
-Suggests: mailcap
-BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%define specflags_ia32 -fomit-frame-pointer
-
-%description
-Mutt is a small but very poweful full-screen Unix mail client.
-Features include MIME support, color, POP3 support, message threading,
-bindable keys, and threaded sorting mode.
-
-%description -l de.UTF-8
-Mutt ist ein kleiner aber leistungsfähiger Vollbild-Mail-Client für
-Unix mit MIME-Unterstützung, Farbe, POP3-Unterstützung,
-Nachrichten-Threading, zuweisbaren Tasten und Sortieren nach Threads.
-
-%description -l es.UTF-8
-Mutt es un pequeño, pero muy potente cliente de correo en pantalla
-llena. Incluye soporte a tipos MINE, color, POP3; encadenamiento de
-mensajes, teclas configurables y clasificaciones por encadenamiento.
-
-%description -l fr.UTF-8
-mutt est un client courrier Unix plein écran, petit mais très
-puissant. Il dispose de la gestion MIME, des couleurs, de la gestion
-POP, des fils de discussion, des touches liées et d'un mode de tri sur
-les fils.
-
-%description -l ko.UTF-8
-Mutt는 작지만 매우 강력한 텍스트 기반의 메일 클라이언트이다. Mutt는
-많은 설정이 가능하다. 그리고, 키바인딩, 키보드 메크로, 메일 스레딩과
-같은 진보된 형태와 정규표현식 검색, 메일에서 선택된 그룹의 내용에서
-강력하게 일정한 패턴을 찾아내는 것을 지원함으로써 메일의 파워 유저에게
-가장 적합하다.
-
-%description -l pl.UTF-8
-Mutt jest niewielkim programem pocztowym dla terminali tekstowych,
-posiadającym duże możliwości. Obsługuje MIME, POP3, cztery formaty
-skrzynek pocztowych, kolory, wątki, ocenę ważności listów (scoring)
-oraz skompresowane foldery.
-
-%description -l pt_BR.UTF-8
-O Mutt é um pequeno mas muito poderoso cliente de correio em tela
-cheia. Inclui suporte a tipos MIME, cor, POP3, encadeamento de
-mensagens, teclas configuráveis e classificação por encadeamento.
-
-%description -l ru.UTF-8
-Mutt - это небольшой, но мощный полноэкранный почтовый клиент.
-Включает поддержку MIME, цвет, поддержку POP3 и IMAP, группировку
-сообщений по цепочкам, переопределяемые клавиши, поддержку pgp/gpg и
-сортировку сообщений в цепочках. Включает также (пока что
-экспериментальную) поддержку NNTP.
-
-%description -l tr.UTF-8
-Mutt, küçük ama çok güçlü bir tam-ekran Unix mektup istemcisidir. MIME
-desteği, renk ve POP3 desteği içerir.
-
-%description -l uk.UTF-8
-Mutt - це невеликий, але потужний повноекранний поштовий клієнт.
-Містить підтримку MIME, колір, підтримку POP3 та IMAP, групування
-повідомлень по ланцюжкам, перевизначення клавіш, підтримку pgp/gpg та
-сортування повідомлень у ланцюжках. Містить також (поки що
-експериментальну) підтримку NNTP.
-
-%prep
-%setup -q
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-%patch4 -p1
-%patch5 -p1
-%patch6 -p1
-%patch7 -p1
-%patch8 -p1
-%patch9 -p1
-%patch10 -p1
-%patch11 -p1
-%patch12 -p1
-%patch13 -p1
-%{?with_nntp:%patch14 -p1}
-%{?with_home_etc:%patch15 -p1}
-%patch16 -p1
-%patch17 -p1
-# breaks display if arrow_cursor is set
-%{?with_folder_column:%patch18 -p1}
-%{?with_imap_recent:%patch19 -p1}
-%patch20 -p1
-%patch21 -p1
-
-# force regeneration (manual.sgml is modified by some patches)
-rm -f doc/{manual*.html,manual.txt}
-
-%build
-%{__aclocal} -I m4
-%{__autoconf}
-%{__autoheader}
-%{__automake}
-%configure \
- mutt_cv_groupwrite=yes \
- mutt_cv_worldwrite=no \
- %{!?debug:--disable-debug} %{?debug:--enable-debug} \
- --disable-warnings \
- --enable-compressed \
- --enable-external-dotlock \
- --enable-gpgme \
- --enable-hcache \
- --enable-imap \
- --enable-mailtool \
- %{?with_nntp:--enable-nntp} \
- --enable-pop \
- --enable-smtp \
- --with-bdb=/usr \
- --without-gdbm \
- %{!?with_slang:--with-curses} \
- --with-docdir=%{_docdir}/%{name} \
- %{?with_home_etc:--with-home-etc} \
- --with-mailpath=/var/mail \
- --with-mixmaster \
- --with-regex \
- %{?with_sasl:--with-sasl} \
- %{?with_slang:--with-slang} \
- --with-ssl
-
-%{__make} -j1 -C doc
-%{__make}
-
-%install
-rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},%{_mandir}/pl/man1} \
- $RPM_BUILD_ROOT%{_sysconfdir}/Muttrc.d
-
-%{__make} install \
- DESTDIR=$RPM_BUILD_ROOT \
- DOTLOCK_GROUP=
-
-%{__patch} -p2 -d $RPM_BUILD_ROOT%{_sysconfdir} < %{PATCH16}
-
-install contrib/gpg.rc $RPM_BUILD_ROOT%{_sysconfdir}/Muttrc.d
-install contrib/smime.rc $RPM_BUILD_ROOT%{_sysconfdir}/Muttrc.d
-install contrib/colors.linux $RPM_BUILD_ROOT%{_sysconfdir}/Muttrc.d/colors.rc
-
-install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
-install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
-install %{SOURCE3} $RPM_BUILD_ROOT%{_mandir}/pl/man1
-
-cat <<'EOF' >$RPM_BUILD_ROOT%{_bindir}/mutt_source-muttrc.d
-#!/bin/sh -e
-for rc in /etc/Muttrc.d/*.rc; do
- [ ! -r "$rc" ] || echo "source \"$rc\""
-done
-EOF
-
-# keep manual.txt.gz, the rest is installed as %doc
-rm -rf $RPM_BUILD_ROOT%{_docdir}/%{name}/[!m]*
-gzip -9nf $RPM_BUILD_ROOT%{_docdir}/%{name}/manual.txt
-
-# conflict with qmail
-rm -f $RPM_BUILD_ROOT%{_mandir}/man5/mbox.5*
-
-rm -f $RPM_BUILD_ROOT/etc/mime.types
-
-%find_lang %{name}
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%files -f %{name}.lang
-%defattr(644,root,root,755)
-%doc contrib/{*rc*,*cap*} ChangeLog README TODO NEWS README.SECURITY README.SSL README.xface
-%dir %{_sysconfdir}/Muttrc.d
-%config(noreplace,missingok) %verify(not md5 size mtime) %{_sysconfdir}/Muttrc
-%config(noreplace,missingok) %verify(not md5 size mtime) %{_sysconfdir}/Muttrc.d/*.rc
-%attr(755,root,root) %{_bindir}/mutt
-%attr(755,root,root) %{_bindir}/mutt_source-muttrc.d
-%attr(755,root,root) %{_bindir}/flea
-%attr(755,root,root) %{_bindir}/muttbug
-%attr(755,root,root) %{_bindir}/pgp*
-%attr(755,root,root) %{_bindir}/smime_keys
-%attr(2755,root,mail) %{_bindir}/mutt_dotlock
-
-%{_docdir}/%{name}
-%{_desktopdir}/*.desktop
-%{_pixmapsdir}/mutt.png
-%{_mandir}/man*/*
-%lang(pl) %{_mandir}/pl/man*/*