]> git.pld-linux.org Git - packages/mutt.git/commitdiff
This commit was manufactured by cvs2git to create branch 'DEVEL'.
authorcvs2git <feedback@pld-linux.org>
Mon, 17 Mar 2003 12:12:40 +0000 (12:12 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Sprout from master 2003-03-17 12:12:40 UTC Jakub Bogusz <qboosh@pld-linux.org> '- removed junk and autogenerated files - now 1.2MB less'
Delete:
    mutt-bj.status-time.patch
    mutt-cd.purge_message.patch
    mutt-cd.signatures_menu.patch
    mutt-cd.trash_folder.patch
    mutt-folder_columns.patch
    mutt-forcedotlock.patch
    mutt-home_etc.patch
    mutt-in_reply_to.patch
    mutt-mail.patch
    mutt-manual.patch
    mutt-muttbug-tmp.patch
    mutt-nntp.config
    mutt-null_name.patch
    mutt-pgp_hook.patch
    mutt-rr.compressed.patch
    mutt-xface.patch
    mutt.1.pl
    mutt.desktop
    mutt.png
    mutt.spec

20 files changed:
mutt-bj.status-time.patch [deleted file]
mutt-cd.purge_message.patch [deleted file]
mutt-cd.signatures_menu.patch [deleted file]
mutt-cd.trash_folder.patch [deleted file]
mutt-folder_columns.patch [deleted file]
mutt-forcedotlock.patch [deleted file]
mutt-home_etc.patch [deleted file]
mutt-in_reply_to.patch [deleted file]
mutt-mail.patch [deleted file]
mutt-manual.patch [deleted file]
mutt-muttbug-tmp.patch [deleted file]
mutt-nntp.config [deleted file]
mutt-null_name.patch [deleted file]
mutt-pgp_hook.patch [deleted file]
mutt-rr.compressed.patch [deleted file]
mutt-xface.patch [deleted file]
mutt.1.pl [deleted file]
mutt.desktop [deleted file]
mutt.png [deleted file]
mutt.spec [deleted file]

diff --git a/mutt-bj.status-time.patch b/mutt-bj.status-time.patch
deleted file mode 100644 (file)
index 8556b19..0000000
+++ /dev/null
@@ -1,175 +0,0 @@
-diff -Nur mutt-1.3.25-2/curs_main.c mutt-1.3.25/curs_main.c
---- mutt-1.3.25-2/curs_main.c  Tue Jan 22 00:06:44 2002
-+++ mutt-1.3.25/curs_main.c    Tue Jan 22 00:07:02 2002
-@@ -546,7 +546,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);
-diff -Nur mutt-1.3.25-2/globals.h mutt-1.3.25/globals.h
---- mutt-1.3.25-2/globals.h    Tue Jan 22 00:06:44 2002
-+++ mutt-1.3.25/globals.h      Tue Jan 22 00:07:02 2002
-@@ -145,6 +145,7 @@
- WHERE short ReadInc;
- WHERE short SendmailWait;
- WHERE short SleepTime INITVAL (1);
-+WHERE short StatusUpdate;
- WHERE short Timeout;
- WHERE short WrapMargin;
- WHERE short WriteInc;
-diff -Nur mutt-1.3.25-2/init.h mutt-1.3.25/init.h
---- mutt-1.3.25-2/init.h       Tue Jan 22 00:06:44 2002
-+++ mutt-1.3.25/init.h Tue Jan 22 00:09:07 2002
-@@ -2119,6 +2119,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"
-   ** .de
-@@ -2160,6 +2163,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 -Nur mutt-1.3.25-2/menu.c mutt-1.3.25/menu.c
---- mutt-1.3.25-2/menu.c       Tue Jan 22 00:06:44 2002
-+++ mutt-1.3.25/menu.c Tue Jan 22 00:07:02 2002
-@@ -1045,3 +1045,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 -Nur mutt-1.3.25-2/mutt_menu.h mutt-1.3.25/mutt_menu.h
---- mutt-1.3.25-2/mutt_menu.h  Tue Jan 22 00:06:44 2002
-+++ mutt-1.3.25/mutt_menu.h    Tue Jan 22 00:07:02 2002
-@@ -107,3 +107,5 @@
- /* used in both the index and pager index to make an entry. */
- void index_make_entry (char *, size_t, struct menu_t *, int);
- int index_color (int);
-+
-+int update_status_time (void);
-diff -Nur mutt-1.3.25-2/pager.c mutt-1.3.25/pager.c
---- mutt-1.3.25-2/pager.c      Tue Jan 22 00:06:44 2002
-+++ mutt-1.3.25/pager.c        Tue Jan 22 00:07:02 2002
-@@ -1712,7 +1712,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 -Nur mutt-1.3.25-2/status.c mutt-1.3.25/status.c
---- mutt-1.3.25-2/status.c     Tue Jan 22 00:06:44 2002
-+++ mutt-1.3.25/status.c       Tue Jan 22 00:07:02 2002
-@@ -26,6 +26,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)
- {
-@@ -284,6 +285,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;
-
diff --git a/mutt-cd.purge_message.patch b/mutt-cd.purge_message.patch
deleted file mode 100644 (file)
index d628504..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-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
diff --git a/mutt-cd.signatures_menu.patch b/mutt-cd.signatures_menu.patch
deleted file mode 100644 (file)
index 404cb22..0000000
+++ /dev/null
@@ -1,682 +0,0 @@
-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.sgml.head      Sat Jan 12 12:35:43 2002
-+++ mutt-1.3.27/doc/manual.sgml.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,495 @@
-+/*
-+ * 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.
-+ */
-+
-+#include "mutt.h"
-+#include "mutt_menu.h"
-+#include "mapping.h"
-+#include "mutt_curses.h"
-+
-+#include <stdio.h>
-+#include <string.h>
-+#include <stdlib.h>
-+#include <dirent.h>
-+#include <sys/stat.h>
-+
-+#define SIG_DISPLAY_LINES 4
-+#define SEPARATOR(x) ((*x == '\n') || (mutt_strcmp (x, "-- \n") == 0))
-+#define SIG_ADD_LINE(x,y) mutt_add_list (x, strtok (y, "\n"))
-+
-+typedef struct sig_list
-+{
-+  struct sig_list *next;
-+  LIST *sig;
-+} SIG_LIST;
-+
-+typedef struct sig_dir
-+{
-+  struct sig_dir *next;
-+  char *name;
-+} SIG_DIR;
-+
-+typedef LIST * ENTRY;
-+
-+typedef struct entry_dir
-+{
-+  int tagged;
-+  SIG_DIR *data;
-+} ENTRY_DIR;
-+
-+static struct mapping_t SigHelp[] = {
-+  { N_("Exit"),   OP_EXIT },
-+  { N_("Search"), OP_SEARCH },
-+  { N_("Random"), OP_RANDOM_SIG },
-+  { N_("Help"),   OP_HELP },
-+  { NULL }
-+};
-+
-+static struct mapping_t SigDirHelp[] = {
-+  { N_("Exit"),   OP_EXIT },
-+  { N_("Search signature"), OP_SIG_SEARCH },
-+  { N_("Help"),   OP_HELP },
-+  { NULL }
-+};
-+
-+void menu_next_entry (MUTTMENU *menu);
-+void menu_prev_entry (MUTTMENU *menu);
-+
-+
-+static int sig_match (LIST *s, regex_t *re)
-+{
-+  while (s)
-+  {
-+    if (regexec (re, s->data, (size_t)0, NULL, (int)0) == 0)
-+      return 1;
-+    s = s->next;
-+  }
-+  return 0;
-+}
-+
-+static void read_sig_file (char *name, SIG_LIST **begin, regex_t *re)
-+{
-+  FILE *fp;
-+  char buf[STRING];
-+  LIST *sig = NULL;
-+  SIG_LIST *first, *cur;
-+  int append = 0;
-+
-+  if (!(fp = safe_fopen (name, "r")))
-+  {
-+    mutt_error (_("Can't open signature file %s"), name);
-+    return;
-+  }
-+
-+  for (first = *begin; first && first->next; first = first->next, append++)
-+    ; /* append results to an existing list */
-+  cur = first;
-+
-+  while (fgets (buf, sizeof (buf), fp))
-+  {
-+    if (buf[0] && !SEPARATOR (buf))
-+    {
-+      sig = SIG_ADD_LINE (NULL, buf);
-+
-+      while (fgets (buf, sizeof (buf), fp) && buf[0] && !SEPARATOR (buf))
-+      SIG_ADD_LINE (sig, buf);
-+
-+      if (re && !sig_match (sig, re))
-+      mutt_free_list (&sig); /* previous sig didn't match the regexp */
-+      else
-+      {
-+      /* add signature */
-+      if (first == NULL)
-+        first = cur = (SIG_LIST *) safe_calloc (1, sizeof (SIG_LIST));
-+      else
-+      {
-+        cur->next = (SIG_LIST *) safe_calloc (1, sizeof (SIG_LIST));
-+        cur = cur->next;
-+      }
-+
-+      cur->sig = sig;
-+      cur->next = NULL;
-+      }
-+    }
-+  }
-+
-+  if (!append)
-+    *begin = first;
-+
-+  safe_fclose (&fp);
-+}
-+
-+static void sig_make_entry (char *s, size_t slen, MUTTMENU *menu, int num)
-+{
-+  ENTRY *table = (ENTRY *) menu->data;
-+
-+  snprintf (s, slen, "%3d %s",
-+          num + 1,
-+          table[num]->data);
-+}
-+
-+static int sig_menu_search (MUTTMENU *menu, regex_t *re, int num)
-+{
-+  return (sig_match (((ENTRY *)menu->data)[num], re) ? 0 : REG_NOMATCH);
-+}
-+
-+static void draw_sig_frame (LIST *s)
-+{
-+  int i;
-+
-+  for (i = 1; i <= SIG_DISPLAY_LINES; i++)
-+  {
-+    if (s)
-+    {
-+      mvaddstr (i, 0, s->data);
-+      s = s->next;
-+    }
-+    else
-+      move (i, 0);
-+
-+    clrtoeol ();
-+  }
-+
-+  SETCOLOR (MT_COLOR_STATUS);
-+  mvaddstr (SIG_DISPLAY_LINES + 1, 0, _("-- Signature"));
-+  BKGDSET (MT_COLOR_STATUS);
-+  clrtoeol ();
-+
-+  BKGDSET (MT_COLOR_NORMAL);
-+  SETCOLOR (MT_COLOR_NORMAL);
-+}
-+
-+static void free_sig_list (SIG_LIST **sigs)
-+{
-+  SIG_LIST *cur;
-+
-+  while (*sigs)
-+  {
-+    cur = *sigs;
-+    *sigs = (*sigs)->next;
-+    mutt_free_list (&cur->sig);
-+    safe_free ((void **)&cur);
-+  }
-+}
-+
-+static void append_signature (char *msg_file, LIST *s)
-+{
-+  FILE *fp;
-+
-+  if ((fp = safe_fopen (msg_file, "a")) == 0)
-+    mutt_perror (msg_file);
-+  else
-+  {
-+    if (option (OPTSIGDASHES))
-+      fputs ("\n-- \n", fp);
-+
-+    for (; s; s = s->next)
-+      fprintf (fp, "%s\n", s->data);
-+
-+    mutt_message (_("Signature appended to your mail"));
-+    safe_fclose (&fp);
-+  }
-+}
-+
-+static LIST *sig_list_menu (char *file, SIG_LIST *list)
-+{
-+  LIST *result = NULL;
-+  SIG_LIST *sigl;
-+  MUTTMENU *menu;
-+  ENTRY *SigTable;
-+  char helpstr[SHORT_STRING], title[SHORT_STRING];
-+  int i, done = 0;
-+
-+  snprintf (title, sizeof (title), _("Signature : %s"), file);
-+
-+  menu = mutt_new_menu ();
-+  menu->make_entry = sig_make_entry;
-+  menu->tag = NULL;
-+  menu->search = sig_menu_search;
-+  menu->menu = MENU_SIG;
-+  menu->title = title;
-+  menu->help = mutt_compile_help (helpstr, sizeof (helpstr),
-+                                MENU_SIG, SigHelp);
-+  menu->offset = SIG_DISPLAY_LINES + 2;
-+  menu->pagelen = LINES - SIG_DISPLAY_LINES - 4;
-+  
-+  for (sigl = list; sigl; sigl = sigl->next)
-+    menu->max++;
-+
-+  menu->data = SigTable = (ENTRY *) safe_calloc (menu->max, sizeof (ENTRY));
-+
-+  for (i = 0, sigl = list; sigl; i++, sigl = sigl->next)
-+    SigTable[i] = sigl->sig;
-+
-+  while (!done)
-+  {
-+    switch (mutt_menuLoop (menu))
-+    {
-+      case OP_GENERIC_SELECT_ENTRY:
-+        result = SigTable[menu->current];
-+      done = 1;
-+      break;
-+
-+      case OP_PREV_SIG:
-+      menu_prev_entry (menu);
-+      draw_sig_frame (SigTable[menu->current]);
-+      break;
-+
-+      case OP_NEXT_SIG:
-+      menu_next_entry (menu);
-+      draw_sig_frame (SigTable[menu->current]);
-+      break;
-+
-+      case OP_REDRAW:
-+      menu->offset = SIG_DISPLAY_LINES + 2;
-+      menu->pagelen = LINES - SIG_DISPLAY_LINES - 4;
-+      draw_sig_frame (SigTable[menu->current]);
-+      break;
-+
-+      case OP_RANDOM_SIG:
-+      menu->current = LRAND () % menu->max;
-+      draw_sig_frame (SigTable[menu->current]);
-+      menu->redraw |= REDRAW_MOTION;
-+      break;
-+
-+      case OP_EXIT:
-+      set_option (OPTNEEDREDRAW);
-+        done = 1;
-+        break;
-+    }
-+  }
-+  
-+  mutt_menuDestroy (&menu);
-+  safe_free ((void **)&SigTable);
-+  return result;
-+}
-+
-+static SIG_LIST *sig_search_filter (MUTTMENU *menu, char *path)
-+{
-+  regex_t re;
-+  char buf[STRING];
-+  SIG_LIST *result = NULL;
-+  int i;
-+
-+  snprintf (buf, sizeof(buf), menu->searchBuf ? menu->searchBuf : "");
-+  if (mutt_get_field (_("Search for: "), buf,
-+                    sizeof (buf), M_CLEAR) != 0 || !buf[0])
-+    return (NULL);
-+  mutt_str_replace (&menu->searchBuf, buf);
-+
-+  if ((i = regcomp (&re, menu->searchBuf, REG_NOSUB | REG_EXTENDED | REG_WORDS
-+                  | mutt_which_case (menu->searchBuf))) != 0)
-+  {
-+    regerror (i, &re, buf, sizeof (buf));
-+    regfree (&re);
-+    mutt_error ("%s", buf);
-+    return (NULL);
-+  }
-+
-+  /* building list of sigs matching the regexp */
-+  for (i = 0; i < menu->max; i++)
-+  {
-+    /* search in every file if none is tagged */
-+    if (((ENTRY_DIR *) menu->data)[i].tagged || (menu->tagged == 0))
-+    {
-+      snprintf (buf, sizeof (buf), "%s/%s", path,
-+              ((ENTRY_DIR *) menu->data)[i].data->name);
-+      read_sig_file (buf, &result, &re);
-+    }
-+  }
-+
-+  regfree (&re);
-+  if (!result)
-+    mutt_error (_("Not found."));
-+
-+  return (result);
-+}
-+
-+/* returns the list of files in this directory */
-+static SIG_DIR *sig_directory (char *path)
-+{
-+  DIR *dp;
-+  struct dirent *de;
-+  struct stat s;
-+  SIG_DIR *first = NULL, *cur = NULL;
-+  char file[_POSIX_PATH_MAX + SHORT_STRING];
-+
-+  if ((dp = opendir (path)) == NULL)
-+  {
-+    mutt_perror (path);
-+    return (NULL);
-+  }
-+  
-+  while ((de = readdir (dp)))
-+  {
-+    if ((de->d_name)[0] == '.') /* no hidden files */
-+      continue;
-+
-+    snprintf (file, sizeof (file), "%s/%s", path, de->d_name);
-+    if (lstat (file, &s) == -1)
-+      continue;
-+
-+    if ((!S_ISREG (s.st_mode)) && (!S_ISLNK (s.st_mode)))
-+      continue;
-+
-+    if (first == NULL)
-+      cur = first = safe_calloc (1, sizeof (SIG_DIR));
-+    else
-+    {
-+      cur->next = safe_calloc (1, sizeof (SIG_DIR));
-+      cur = cur->next;
-+    }
-+    cur->name = safe_strdup (de->d_name);
-+    cur->next = NULL;
-+  }
-+  closedir (dp);
-+  return first;
-+}
-+
-+static void sig_dir_make_entry (char *s, size_t slen, MUTTMENU *menu, int num)
-+{
-+  ENTRY_DIR *table = (ENTRY_DIR *) menu->data;
-+
-+  snprintf (s, slen, "%c %3d - %s",
-+          table[num].tagged ? '*' : ' ',
-+          num + 1,
-+          table[num].data->name);
-+}
-+
-+static int sig_dir_tag (MUTTMENU *menu, int n, int m)
-+{
-+  ENTRY_DIR *cur = &((ENTRY_DIR *) menu->data)[n];
-+  int ot = cur->tagged;
-+  
-+  cur->tagged = m >= 0 ? m : !cur->tagged;
-+  return cur->tagged - ot;
-+
-+}
-+
-+static int sig_dir_sort (const void *a, const void *b)
-+{
-+  ENTRY_DIR *pa = (ENTRY_DIR *) a;
-+  ENTRY_DIR *pb = (ENTRY_DIR *) b;
-+
-+  return (mutt_strcmp (pa->data->name, pb->data->name));
-+}
-+
-+static int sig_dir_menu (char *path, char *msg_file)
-+{
-+  MUTTMENU *menu;
-+  SIG_LIST *sigl;
-+  LIST *result = NULL;
-+  ENTRY_DIR *FileTable;
-+  SIG_DIR *list, *files;
-+  char buf[STRING], helpstr[SHORT_STRING], title[SHORT_STRING];
-+  int i, done = 0;
-+
-+  if ((list = sig_directory (path)) == NULL)
-+    return -1;
-+
-+  snprintf (title, sizeof (title), "Signature directory : %s", path);
-+
-+  menu = mutt_new_menu ();
-+  menu->make_entry = sig_dir_make_entry;
-+  menu->search = NULL; /* search within files with sig_search_filter() */
-+  menu->tag = sig_dir_tag;
-+  menu->menu = MENU_SIG_DIR;
-+  menu->title = title;
-+  menu->help = mutt_compile_help (helpstr, sizeof (helpstr),
-+                                MENU_SIG_DIR, SigDirHelp);
-+
-+  for (files = list; files; files = files->next)
-+    menu->max++;
-+
-+  menu->data = FileTable = (ENTRY_DIR *) safe_calloc (menu->max,
-+                                                    sizeof (ENTRY_DIR));
-+
-+  for (i = 0, files = list; files; i++, files = files->next)
-+    FileTable[i].data = files;
-+
-+  qsort (FileTable, menu->max, sizeof (ENTRY_DIR), sig_dir_sort);
-+
-+  while (!done)
-+  {
-+    switch (mutt_menuLoop (menu))
-+    {
-+      case OP_SIG_SEARCH:
-+      sigl = sig_search_filter (menu, path);
-+
-+      if (sigl)
-+      {
-+        if ((result = sig_list_menu (_("query results"), sigl)) != NULL)
-+        {
-+          append_signature (msg_file, result);
-+          done = 1;
-+        }
-+
-+        MAYBE_REDRAW (menu->redraw);
-+        free_sig_list (&sigl);
-+      }
-+      break;
-+
-+      case OP_GENERIC_SELECT_ENTRY:
-+      snprintf (buf, sizeof (buf), "%s/%s", path,
-+                FileTable[menu->current].data->name);
-+      sigl = NULL;
-+      read_sig_file (buf, &sigl, NULL);
-+
-+      if (sigl)
-+      {
-+        if ((result = sig_list_menu (buf, sigl)) != NULL)
-+        {
-+          append_signature (msg_file, result);
-+          done = 1;
-+        }
-+
-+        MAYBE_REDRAW (menu->redraw);
-+        free_sig_list (&sigl);
-+              }
-+      break;
-+
-+      case OP_EXIT:
-+        done = 1;
-+        break;
-+    }
-+  }
-+
-+  while (list)
-+  {
-+    safe_free ((void **)&list->name);
-+    files = list;
-+    list = list->next;
-+    safe_free ((void **)&files);
-+  }
-+  safe_free ((void **)&FileTable);
-+  mutt_menuDestroy (&menu);
-+  return 0;
-+}
-+
-+void mutt_signature (char *msg_file)
-+{
-+  if (!SigDirectory)
-+  {
-+    mutt_error (_("variable 'signatures_directory' is unset"));
-+    return;
-+  }
-+
-+  if (sig_dir_menu (SigDirectory, msg_file) == -1)
-+    mutt_error (_("%s: no files in this directory"), SigDirectory);
-+  else
-+    set_option (OPTNEEDREDRAW);
-+}
-diff -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/mutt-cd.trash_folder.patch b/mutt-cd.trash_folder.patch
deleted file mode 100644 (file)
index 4c1861a..0000000
+++ /dev/null
@@ -1,181 +0,0 @@
-diff -pruN2 mutt-1.3.27.orig/commands.c mutt-1.3.27/commands.c
---- mutt-1.3.27.orig/commands.c        Mon Dec  3 11:17:57 2001
-+++ mutt-1.3.27/commands.c     Wed Jan 23 22:33:11 2002
-@@ -616,9 +616,13 @@ void _mutt_save_message (HEADER *h, CONT
-     mutt_parse_mime_message (Context, h);
--  if (mutt_append_message (ctx, Context, h, cmflags, chflags) == 0 && delete)
-+  if (mutt_append_message (ctx, Context, h, cmflags, chflags) == 0)
-   {
--    mutt_set_flag (Context, h, M_DELETE, 1);
--    if (option (OPTDELETEUNTAG))
--      mutt_set_flag (Context, h, M_TAG, 0);
-+    if (delete)
-+    {
-+      mutt_set_flag (Context, h, M_DELETE, 1);
-+      if (option (OPTDELETEUNTAG))
-+      mutt_set_flag (Context, h, M_TAG, 0);
-+    }
-+    mutt_set_flag (Context, h, M_APPENDED, 1);
-   }
- }
-diff -pruN2 mutt-1.3.27.orig/flags.c mutt-1.3.27/flags.c
---- mutt-1.3.27.orig/flags.c   Tue Jan 15 22:12:59 2002
-+++ mutt-1.3.27/flags.c        Wed Jan 23 22:33:11 2002
-@@ -76,4 +76,15 @@ void _mutt_set_flag (CONTEXT *ctx, HEADE
-       break;
-+    case M_APPENDED:
-+      if (bf)
-+      {
-+      if (!h->appended)
-+      {
-+        h->appended = 1;
-+        if (upd_ctx) ctx->appended++;
-+      }
-+      }
-+      break;
-+
-     case M_NEW:
-       if (bf)
-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:33:11 2002
-@@ -110,4 +110,5 @@ WHERE char *Status;
- WHERE char *Tempdir;
- WHERE char *Tochars;
-+WHERE char *TrashPath;
- WHERE char *Username;
- WHERE char *Visual;
-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:33:11 2002
-@@ -2236,4 +2236,11 @@ struct option_t MuttVars[] = {
-   ** 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 -pruN2 mutt-1.3.27.orig/mutt.h mutt-1.3.27/mutt.h
---- mutt-1.3.27.orig/mutt.h    Tue Jan 15 22:00:32 2002
-+++ mutt-1.3.27/mutt.h Wed Jan 23 22:33:11 2002
-@@ -185,4 +185,5 @@ enum
-   M_UNDELETE,
-   M_DELETED,
-+  M_APPENDED,
-   M_FLAG,
-   M_TAG,
-@@ -618,4 +619,5 @@ typedef struct 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;
-@@ -740,4 +742,5 @@ typedef struct
-   int unread;                 /* how many unread messages? */
-   int deleted;                        /* how many deleted messages */
-+  int appended;                 /* how many saved messages? */
-   int flagged;                        /* how many flagged messages */
-   int msgnotreadyet;          /* which msg "new" in pager, -1 if none */
-diff -pruN2 mutt-1.3.27.orig/mx.c mutt-1.3.27/mx.c
---- mutt-1.3.27.orig/mx.c      Tue Jan 15 22:09:53 2002
-+++ mutt-1.3.27/mx.c   Wed Jan 23 22:33:11 2002
-@@ -816,4 +816,45 @@ static int sync_mailbox (CONTEXT *ctx, i
- }
-+/* 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)
-@@ -999,9 +1040,17 @@ int mx_close_mailbox (CONTEXT *ctx, int 
-     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;
-+      }
-     }
-   }
-@@ -1174,6 +1223,10 @@ int mx_sync_mailbox (CONTEXT *ctx, int *
-     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)
-   {
-diff -pruN2 mutt-1.3.27.orig/postpone.c mutt-1.3.27/postpone.c
---- mutt-1.3.27.orig/postpone.c        Mon Dec  3 11:17:57 2001
-+++ mutt-1.3.27/postpone.c     Wed Jan 23 22:33:11 2002
-@@ -271,4 +271,7 @@ int mutt_get_postponed (CONTEXT *ctx, HE
-   mutt_set_flag (PostContext, h, M_DELETE, 1);
-+  /* and consider it saved, so that it won't be moved to the trash folder */
-+  mutt_set_flag (PostContext, h, M_APPENDED, 1);
-+
-   /* update the count for the status display */
-   PostCount = PostContext->msgcount - PostContext->deleted;
-diff -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.trash_folder.1
diff --git a/mutt-folder_columns.patch b/mutt-folder_columns.patch
deleted file mode 100644 (file)
index 59ffc40..0000000
+++ /dev/null
@@ -1,413 +0,0 @@
---- 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
-@@ -476,12 +476,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)
-@@ -634,7 +635,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
-   {
-@@ -765,7 +766,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;
-         }
-       }
-@@ -863,7 +864,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);
-       }
-       break;
-@@ -893,7 +894,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);
-           }
-         }
-@@ -933,7 +934,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
-@@ -947,7 +948,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
-             {
-@@ -1010,12 +1011,12 @@
-             state.imap_browse = 1;
-             imap_browse (LastDir, &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.");
-@@ -1099,7 +1100,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_BROWSER_NEW_FILE:
---- 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);
- }
diff --git a/mutt-forcedotlock.patch b/mutt-forcedotlock.patch
deleted file mode 100644 (file)
index 82e92a2..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-diff -urN mutt-1.3.27.org/configure.in mutt-1.3.27/configure.in
---- mutt-1.3.27.org/configure.in       Wed May  9 17:47:59 2001
-+++ mutt-1.3.27/configure.in   Wed May  9 17:48:59 2001
-@@ -350,12 +350,10 @@
-         exit (1);
- }], mutt_cv_groupwrite=yes, mutt_cv_groupwrite=no, mutt_cv_groupwrite=no)])
--                if test $mutt_cv_groupwrite = yes; then
-+      fi
-                         AC_DEFINE(USE_DOTLOCK,1,[ Define to use dotlocking for mailboxes. ])
-                         AC_DEFINE(USE_SETGID,1,[ Define if mutt should run setgid "mail". ])
-                         mutt_cv_setgid=yes
--                fi
--        fi
- fi
- AC_ARG_ENABLE(external_dotlock, [  --enable-external-dotlock  Force use of an external dotlock program],
diff --git a/mutt-home_etc.patch b/mutt-home_etc.patch
deleted file mode 100644 (file)
index 4863052..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-diff -urN mutt-1.3.18/init.c mutt-1.3.18.my/init.c
---- mutt-1.3.18/init.c Thu Apr 26 14:59:07 2001
-+++ mutt-1.3.18.my/init.c      Sat Jun 30 08:39:00 2001
-@@ -1852,7 +1852,11 @@
-   
-   if (!Muttrc)
-   {
--    snprintf (buffer, sizeof(buffer), "%s/.muttrc-%s", NONULL(Homedir), MUTT_VERSION);
-+    snprintf (buffer, sizeof(buffer), "%s/%s/muttrc-%s", NONULL(Homedir), getenv ("CONFIG_DIR"), MUTT_VERSION);
-+    if (access(buffer, F_OK) == -1)
-+      snprintf (buffer, sizeof(buffer), "%s/%s/muttrc", NONULL(Homedir), getenv ("CONFIG_DIR"));
-+    if (access(buffer, F_OK) == -1)
-+      snprintf (buffer, sizeof(buffer), "%s/.muttrc-%s", NONULL(Homedir), MUTT_VERSION);
-     if (access(buffer, F_OK) == -1)
-       snprintf (buffer, sizeof(buffer), "%s/.muttrc", NONULL(Homedir));
-     if (access(buffer, F_OK) == -1)
diff --git a/mutt-in_reply_to.patch b/mutt-in_reply_to.patch
deleted file mode 100644 (file)
index 34b208b..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
---- mutt-1.3.18/send.c Thu Apr 26 15:17:49 2001
-+++ mutt-1.3.18-p/send.c       Wed May 30 13:30:10 2001
-@@ -630,8 +630,10 @@
-   else
-   {
-     env->references = mutt_make_references (curenv);
--    env->in_reply_to = mutt_new_list ();
--    env->in_reply_to->data = safe_strdup (curenv->message_id);
-+    if (curenv->message_id) {
-+      env->in_reply_to = mutt_new_list ();
-+      env->in_reply_to->data = safe_strdup (curenv->message_id);
-+    }
-   }
- }
diff --git a/mutt-mail.patch b/mutt-mail.patch
deleted file mode 100644 (file)
index 327b778..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- configure.old      Sat Dec 12 09:12:11 1998
-+++ configure  Mon Dec 14 11:09:25 1998
-@@ -2984,7 +2984,7 @@
- if test x$mutt_cv_setgid = xyes; then
--      DOTLOCK_GROUP='mail'
-+      DOTLOCK_GROUP='`id -g`'
-       DOTLOCK_PERMISSION=2755
- else
-       DOTLOCK_GROUP=''
diff --git a/mutt-manual.patch b/mutt-manual.patch
deleted file mode 100644 (file)
index cdb249f..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-diff -urN mutt-1.4.orig/Muttrc.head.in mutt-1.4/Muttrc.head.in
---- mutt-1.4.orig/Muttrc.head.in       Mon Mar 20 11:25:49 2000
-+++ mutt-1.4/Muttrc.head.in    Thu Aug  1 21:48:21 2002
-@@ -15,9 +15,9 @@
- macro pager \cb |urlview\n 'call urlview to extract URLs out of a message'
- # Show documentation when pressing F1
--macro generic <f1> "!less @docdir@/manual.txt\n" "Show Mutt documentation"
--macro index   <f1> "!less @docdir@/manual.txt\n" "Show Mutt documentation"
--macro pager   <f1> "!less @docdir@/manual.txt\n" "Show Mutt documentation"
-+macro generic <f1> "!less @docdir@/manual.txt.gz\n" "Show Mutt documentation"
-+macro index   <f1> "!less @docdir@/manual.txt.gz\n" "Show Mutt documentation"
-+macro pager   <f1> "!less @docdir@/manual.txt.gz\n" "Show Mutt documentation"
- # If Mutt is unable to determine your site's domain name correctly, you can
- # set the default here.
diff --git a/mutt-muttbug-tmp.patch b/mutt-muttbug-tmp.patch
deleted file mode 100644 (file)
index b800c38..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
---- 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
diff --git a/mutt-nntp.config b/mutt-nntp.config
deleted file mode 100644 (file)
index ea9f64b..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-# Use this bindings to don't use NNTP patch like keys
-bind   index   'i'     "noop"
-bind   index   '\033i' "noop"
-bind   index   '\033F' "noop"
-bind   index   'F'     "flag-message"
-bind   index   '\007'  "noop"
-bind   index   '\033G' "noop"
-bind   index   '\033f' "noop"
-bind   index   'P'     "noop"
-bind   index   'X'     "noop"
-bind   index   'y'     "noop"
-
-bind   pager   'i'     exit
-bind   pager   '\033i' "noop"
-bind   pager   'P'     "noop"
-bind   pager   'F'     "flag-message"
-
-bind   attach  'F'     "noop"
-bind   attach  '\033F' "noop"
-
-bind   compose "\033a"    "noop"
-bind   compose "N"    "noop"
-bind   compose "o"    "noop"
-bind   compose "x"     "noop"
-
-bind   browser "g"     "noop"
-bind   browser "S"    "noop"
-bind   browser "U"    "noop"
-bind   browser "y"    "noop"
-bind   browser "Y"    "noop""
-
-# Use this bindings to use NNTP patch like keys
-#bind  index   'i'     "change-newsgroup"
-#bind  index   '\033i' "change-newsgroup-readonly"
-#bind  index   '\033F' "forward-to-group"
-#bind  index   'F'     "followup-message"
-#bind  index   '\007'  "get-message"
-#bind  index   '\033G' "get-parent"
-#bind  index   '\033f' "flag-message"
-#bind  index   'P'     "post-message"
-#bind  index   'X'     "toggle-read"
-#bind  index   'y'     "catchup"
-
-#bind  pager   'i'     "change-newsgroup"
-#bind  pager   '\033i' "change-newsgroup-readonly"
-#bind  pager   'F'     "followup-message"
-#bind  pager   '\033F' "forward-to-group"
-#bind  pager   '\033f' "flag-message"
-#bind  pager   'P'     "post-message"
-
-#bind  attach  'F'     "followup-message"
-#bind  attach  '\033F' "forward-to-group"
-
-#bind  compose "\033a"    "attach-news-message"
-#bind  compose "N"    "edit-newsgroups"
-#bind  compose "o"    "edit-followup-to"
-#bind  compose "x"     "edit-x-comment-to"
-
-#bind  browser "g"     "reload-active"
-#bind  browser "S"    "subscribe-pattern"
-#bind  browser "U"    "unsubscribe-pattern"
-#bind  browser "y"    "catchup"
-#bind  browser "Y"    "uncatchup"
diff --git a/mutt-null_name.patch b/mutt-null_name.patch
deleted file mode 100644 (file)
index 0e29e36..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-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 . */
-     
diff --git a/mutt-pgp_hook.patch b/mutt-pgp_hook.patch
deleted file mode 100644 (file)
index 7e1e5bf..0000000
+++ /dev/null
@@ -1,1153 +0,0 @@
-diff -rU3 --new-file mutt-1.3.99-vanilla/PATCHES mutt-1.3.99/PATCHES
---- mutt-1.3.99-vanilla/PATCHES        Thu May 23 14:12:14 2002
-+++ mutt-1.3.99/PATCHES        Thu May 23 14:13:33 2002
-@@ -1,3 +1,4 @@
-+patch-1.3.28.dw.pgp-hook.3
- vvv.quote
- patch-1.3.27.cd.signatures_menu.2.1
- patch-1.3.25.cd.purge_command.2
-diff -rU3 --new-file mutt-1.3.99-vanilla/doc/manual.sgml.head mutt-1.3.99/doc/manual.sgml.head
---- mutt-1.3.99-vanilla/doc/manual.sgml.head   Thu May 23 14:12:14 2002
-+++ mutt-1.3.99/doc/manual.sgml.head   Thu May 23 14:13:33 2002
-@@ -1389,7 +1389,9 @@
- or because, for some reasons, you need to override the key Mutt would
- normally use.  The pgp-hook command provides a method by which you can
- specify the ID of the public key to be used when encrypting messages to
--a certain recipient.
-+a certain recipient.  You may use multiple pgp-hook's with the same
-+pattern; multiple matching pgp-hook's result in the use of multiple
-+keyids for recipient.
- <sect1>Adding key sequences to the keyboard buffer<label id="push">
- <p>
-diff -rU3 --new-file mutt-1.3.99-vanilla/doc/manual.sgml.head.orig mutt-1.3.99/doc/manual.sgml.head.orig
---- mutt-1.3.99-vanilla/doc/manual.sgml.head.orig      Thu Apr 25 15:28:00 2002
-+++ mutt-1.3.99/doc/manual.sgml.head.orig      Thu May 23 14:12:14 2002
-@@ -525,6 +525,7 @@
- c       edit-cc                 edit the Cc field
- 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
- p       pgp-menu                select PGP options (``i'' version only)
-@@ -2115,8 +2116,40 @@
- with large volume mailing lists easier because you can easily delete
- uninteresting threads and quickly find topics of value.
-+<sect1>Editing threads
-+<p>
-+Mutt has the ability to dynamically restructure threads that are broken
-+either by misconfigured software or bad behaviour from some
-+correspondents. This allows to clean your mailboxes (<em/mbox/ and <em/mmdf/
-+formats) from these annoyances which make it hard to follow a discussion.
-+
-+<sect2>Linking threads
-+<p>
-+
-+Some mailers tend to "forget" to correctly set the "In-Reply-To:" and
-+"References:" headers when replying to a message. This results in broken
-+discussions because Mutt has not enough information to guess the correct
-+threading.
-+You can fix this by tagging the reply to a mail, then go onto this mail
-+and use the ``link-threads'' function (bound to & by default). The
-+reply will then be connected to its "parent" message.
-+
-+You can also connect multiple childs at once, tagging them and using the
-+tag-prefix command (';') or the auto_tag option.
-+
-+<sect2>Breaking threads
-+<p>
-+
-+On mailing lists, some people are in the bad habit of starting a new
-+discussion by hitting "reply" to any message from the list and changing
-+the subject to a totally unrelated one.
-+You can fix such threads by using the ``break-thread'' function (bound
-+by default to #), which will turn the subthread starting from the
-+current message into a whole different thread.
-+
- <sect1>Delivery Status Notification (DSN) Support
- <p>
-+
- RFC1894 defines a set of MIME content types for relaying information
- about the status of electronic mail messages.  These can be thought of as
- ``return receipts.'' Berkeley sendmail 8.8.x currently has some command
-@@ -2319,6 +2352,176 @@
- macro pager \cb |urlview\n
- </verb></tscreen>
-+<sect1>Compressed folders Support (OPTIONAL)
-+<p>
-+
-+If Mutt was compiled with compressed folders support (by running the
-+<em/configure/ script with the <em/--enable-compressed/ 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.
-+
-+The most common use is to open compressed archived folders e.g. with
-+gzip.
-+
-+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.
-+
-+There are three hooks defined (<ref id="open-hook" name="open-hook">,
-+<ref id="close-hook" name="close-hook"> and <ref id="append-hook"
-+name="append-hook">) which define commands to uncompress and compress
-+a folder and to append messages to an existing compressed folder 
-+respectively.
-+
-+For example:
-+
-+<tscreen><verb>
-+open-hook \\.gz$ "gzip -cd %f &gt; %t" 
-+close-hook \\.gz$ "gzip -c %t &gt; %f"
-+append-hook \\.gz$ "gzip -c %t &gt;&gt; %f" 
-+</verb></tscreen>
-+
-+You do not have to specify all of the commands. If you omit <ref
-+id="append-hook" name="append-hook">, the folder will be open and
-+closed again each time you will add to it. If you omit <ref
-+id="close-hook" name="close-hook"> (or give empty command) , the
-+folder will be open in the  mode. If you specify <ref
-+id="append-hook" name="append-hook"> though you'll be able to append
-+to the folder.
-+
-+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
-+&dquot;.&dquot; as a regexp. But this may be surprising if your
-+compressing script produces empty files. In this situation, unset <ref
-+id="save_empty" name="&dollar;save&lowbar;empty">, so that the compressed file
-+will be removed if you delete all of the messages.
-+
-+<sect2>Open a compressed mailbox for reading<label id="open-hook">
-+<p>
-+Usage: <tt/open-hook/ <em/regexp/ &dquot;<em/command/&dquot;
-+
-+The <em/command/ is the command that can be used for opening the
-+folders whose names match <em/regexp/.
-+
-+The <em/command/ string is the printf-like format string, and it
-+should accept two parameters: &percnt;f, which is replaced with the
-+(compressed) folder name, and &percnt;t which is replaced with the
-+name of the temporary folder to which to write.
-+
-+&percnt;f and &percnt;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, &percnt;&percnt; is replaced by
-+&percnt;, as in printf, and any other &percnt;anything is left as is.
-+
-+The <em/command/ should <bf/not/ remove the original compressed file.
-+The <em/command/ should return non-zero exit status if it fails, so
-+mutt knows something's wrong.
-+
-+Example:
-+
-+<tscreen><verb>
-+open-hook \\.gz$ "gzip -cd %f &gt; %t" 
-+</verb></tscreen>
-+
-+If the <em/command/ is empty, this operation is disabled for this file
-+type.
-+
-+<sect2>Write a compressed mailbox<label id="close-hook">
-+<p>
-+Usage: <tt/close-hook/ <em/regexp/ &dquot;<em/command/&dquot;
-+
-+This is used to close the folder that was open with the <ref id="open-hook" 
-+name="open-hook"> command after some changes were made to it.
-+
-+The <em/command/ string is the command that can be used for closing the
-+folders whose names match <em/regexp/. It has the same format as in 
-+the <ref id="open-hook" name="open-hook"> command. Temporary folder
-+in this case is the folder previously produced by the <ref id="open-hook"
-+name="open-hook"> command.
-+
-+The <em/command/ should <bf/not/ remove the decompressed file. The
-+<em/command/ should return non-zero exit status if it fails, so mutt
-+knows something's wrong.
-+
-+Example:
-+
-+<tscreen><verb>
-+close-hook \\.gz$ "gzip -c %t &gt; %f"
-+</verb></tscreen>
-+
-+If the <em/command/ is empty, this operation is disabled for this file
-+type, and the file can only be open in the read-only mode.
-+
-+<ref id="close-hook" name ="close-hook"> is not called when you exit
-+from the folder if the folder was not changed.
-+
-+<sect2>Append a message to a compressed mailbox<label id="append-hook">
-+<p>
-+Usage: <tt/append-hook/ <em/regexp/ &dquot;<em/command/&dquot;
-+
-+This command is used for saving to an existing compressed folder.
-+The <em/command/ is the command that can be used for appending to the
-+folders whose names match <em/regexp/. It has the same format as in 
-+ the <ref id="open-hook" name="open-hook"> command.
-+The temporary folder in this case contains the messages that are being
-+appended. 
-+
-+The <em/command/ should <bf/not/ remove the decompressed file. The
-+<em/command/ should return non-zero exit status if it fails, so mutt
-+knows something's wrong.
-+
-+Example:
-+
-+<tscreen><verb>
-+append-hook \\.gz$ "gzip -c %t &gt;&gt; %f" 
-+</verb></tscreen>
-+
-+When <ref id="append-hook" name="append-hook"> 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 (<ref id="mbox_type"
-+name="&dollar;mbox&lowbar;type">) type is always supposed (i.e.
-+this is the format used for the temporary folder).
-+
-+If the file does not exist when you save to it, <ref id="close-hook"
-+name="close-hook"> is called, and not <ref id="append-hook"
-+name="append-hook">. <ref id="append-hook" name="append-hook"> is only
-+for appending to existing folders.
-+
-+If the <em/command/ is empty, this operation is disabled for this file
-+type. In this case, the folder will be open and closed again (using
-+<ref id="open-hook" name="open-hook"> and <ref id="close-hook" 
-+name="close-hook">respectively) each time you will add to it.
-+
-+<sect2>Encrypted folders
-+<p>
-+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:
-+
-+<tscreen><verb>
-+open-hook  \\.pgp$ "pgp -f &lt; %f &gt; %t"
-+close-hook \\.pgp$ "pgp -fe YourPgpUserIdOrKeyId &lt; %t &gt; %f"
-+</verb></tscreen>
-+
-+Please note, that PGP does not support appending to an encrypted
-+folder, so there is no append-hook defined.
-+
-+If you are using GnuPG instead of PGP, you may use the following hooks
-+instead:
-+
-+<tscreen><verb>
-+open-hook  \\.gpg$ "gpg --decrypt &lt; %f &gt; %t"
-+close-hook \\.gpg$ "gpg --encrypt --recipient YourGpgUserIdOrKeyId &lt; %t &gt; %f"
-+</verb></tscreen>
-+
-+<bf/Note:/ 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.
-+
- <sect>Mutt's MIME Support
- <p>
- Quite a bit of effort has been made to make Mutt the premier text-mode
-@@ -2871,12 +3074,16 @@
- <item>
- <tt><ref id="alternative_order" name="alternative&lowbar;order"></tt> <em/mimetype/ &lsqb; <em/mimetype/ ... &rsqb;
- <item>
-+<tt><ref id="append-hook" name="append-hook"></tt> <em/regexp/ &dquot;<em/command/&dquot;
-+<item>
- <tt><ref id="auto_view" name="auto&lowbar;view"></tt> <em/mimetype/ &lsqb; <em/mimetype/ ... &rsqb;
- <item>
- <tt><ref id="bind" name="bind"></tt> <em/map/ <em/key/ <em/function/
- <item>
- <tt><ref id="charset-hook" name="charset-hook"></tt> <em/alias/ <em/charset/
- <item>
-+<tt><ref id="close-hook" name="close-hook"></tt> <em/regexp/ &dquot;<em/command/&dquot;
-+<item>
- <tt><ref id="color" name="color"></tt> <em/object/ <em/foreground/ <em/background/ &lsqb; <em/regexp/ &rsqb;
- <item>
- <tt><ref id="color" name="uncolor"></tt> <em/index/ <em/pattern/ &lsqb; <em/pattern/ ... &rsqb;
-@@ -2919,6 +3126,8 @@
- <item>
- <tt><ref id="my_hdr" name="unmy&lowbar;hdr"></tt> <em/field/ &lsqb; <em/field/ ... &rsqb;
- <item>
-+<tt><ref id="open-hook" name="open-hook"></tt> <em/regexp/ &dquot;<em/command/&dquot;
-+<item>
- <tt><ref id="pgp-hook" name="pgp-hook"></tt> <em/pattern/ <em/key-id/
- <item>
- <tt><ref id="push" name="push"></tt> <em/string/
-diff -rU3 --new-file mutt-1.3.99-vanilla/doc/muttrc.man.head mutt-1.3.99/doc/muttrc.man.head
---- mutt-1.3.99-vanilla/doc/muttrc.man.head    Thu May 23 14:12:13 2002
-+++ mutt-1.3.99/doc/muttrc.man.head    Thu May 23 14:15:38 2002
-@@ -257,7 +257,9 @@
- \fBpgp-hook\fP \fIpattern\fP \fIkey-id\fP
- The pgp-hook command provides a method by which you can
- specify the ID of the public key to be used when encrypting messages
--to a certain recipient.
-+to a certain recipient.  You may use multiple \fBpgp-hook\fPs with the
-+same \fIpattern\fP; multiple matching \fBpgp-hook\fPs result in the use
-+of multiple \fIkey-id\fPs for recipient.
- .PP
- .nf
- \fBopen-hook\fP \fIregexp\fP "\fIcommand\fP"
-diff -rU3 --new-file mutt-1.3.99-vanilla/hook.c mutt-1.3.99/hook.c
---- mutt-1.3.99-vanilla/hook.c Thu May 23 14:12:13 2002
-+++ mutt-1.3.99/hook.c Thu May 23 14:13:33 2002
-@@ -129,7 +129,11 @@
-       ptr->rx.not == not &&
-       !mutt_strcmp (pattern.data, ptr->rx.pattern))
-     {
-+#ifdef M_PGPHOOK
-+      if (data & (M_FOLDERHOOK | M_SENDHOOK | M_MESSAGEHOOK | M_ACCOUNTHOOK | M_PGPHOOK))
-+#else
-       if (data & (M_FOLDERHOOK | M_SENDHOOK | M_MESSAGEHOOK | M_ACCOUNTHOOK))
-+#endif /* M_PGPHOOK */
-       {
-       /* these hooks allow multiple commands with the same
-        * pattern, so if we've already seen this pattern/command pair, just
-@@ -456,9 +460,25 @@
- }
- #ifdef HAVE_PGP
--char *mutt_pgp_hook (ADDRESS *adr)
-+LIST *mutt_pgp_hook (ADDRESS *adr)
- {
--  return _mutt_string_hook (adr->mailbox, M_PGPHOOK);
-+  HOOK *hook;
-+  LIST *key_list = NULL;
-+
-+  if (!adr && !adr->mailbox)
-+    return (NULL);
-+
-+  for (hook = Hooks; hook; hook = hook->next)
-+  {
-+    if (!hook->command)
-+      continue;
-+    if (!(hook->type & M_PGPHOOK))
-+      continue;
-+
-+    if ((regexec (hook->rx.rx, adr->mailbox, 0, NULL, 0) == 0) ^ hook->rx.not)
-+      key_list = mutt_add_list (key_list, hook->command);
-+  }
-+  return (key_list);
- }
- #endif /* HAVE_PGP */
-diff -rU3 --new-file mutt-1.3.99-vanilla/hook.c.orig mutt-1.3.99/hook.c.orig
---- mutt-1.3.99-vanilla/hook.c.orig    Thu Jan  1 01:00:00 1970
-+++ mutt-1.3.99/hook.c.orig    Thu May 23 14:12:13 2002
-@@ -0,0 +1,497 @@
-+/* 
-+ * Copyright (C) 1996-2000 Michael R. Elkins <me@cs.hmc.edu>, and others
-+ *
-+ *     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.
-+ */
-+
-+#include "mutt.h"
-+#include "mailbox.h"
-+
-+#ifdef USE_COMPRESSED
-+#include "compress.h"
-+#endif
-+
-+#include <limits.h>
-+#include <string.h>
-+#include <stdlib.h>
-+#include <ctype.h>
-+#include <unistd.h>
-+
-+typedef struct hook
-+{
-+  int type;           /* hook type */
-+  REGEXP rx;          /* regular expression */
-+  char *command;      /* filename, command or pattern to execute */
-+  pattern_t *pattern; /* used for fcc,save,send-hook */
-+  struct hook *next;
-+} HOOK;
-+
-+static HOOK *Hooks = NULL;
-+
-+static int current_hook_type = 0;
-+
-+int mutt_parse_hook (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err)
-+{
-+  HOOK *ptr;
-+  BUFFER command, pattern;
-+  int rc, not = 0;
-+  regex_t *rx = NULL;
-+  pattern_t *pat = NULL;
-+  char path[_POSIX_PATH_MAX];
-+
-+  memset (&pattern, 0, sizeof (pattern));
-+  memset (&command, 0, sizeof (command));
-+
-+  if (*s->dptr == '!')
-+  {
-+    s->dptr++;
-+    SKIPWS (s->dptr);
-+    not = 1;
-+  }
-+
-+  mutt_extract_token (&pattern, s, 0);
-+
-+  if (!MoreArgs (s))
-+  {
-+    strfcpy (err->data, _("too few arguments"), err->dsize);
-+    goto error;
-+  }
-+
-+  mutt_extract_token (&command, s, (data & (M_FOLDERHOOK | M_SENDHOOK | M_ACCOUNTHOOK)) ?  M_TOKEN_SPACE : 0);
-+
-+  if (!command.data)
-+  {
-+    strfcpy (err->data, _("too few arguments"), err->dsize);
-+    goto error;
-+  }
-+
-+  if (MoreArgs (s))
-+  {
-+    strfcpy (err->data, _("too many arguments"), err->dsize);
-+    goto error;
-+  }
-+
-+  if (data & (M_FOLDERHOOK | M_MBOXHOOK))
-+  {
-+    strfcpy (path, pattern.data, sizeof (path));
-+    _mutt_expand_path (path, sizeof (path), 1);
-+    FREE (&pattern.data);
-+    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_FOLDERHOOK | M_MBOXHOOK | M_SENDHOOK |
-+                                 M_FCCHOOK | M_SAVEHOOK | M_MESSAGEHOOK)))
-+  {
-+    char tmp[HUGE_STRING];
-+
-+    strfcpy (tmp, pattern.data, sizeof (tmp));
-+    mutt_check_simple (tmp, sizeof (tmp), DefaultHook);
-+    FREE (&pattern.data);
-+    memset (&pattern, 0, sizeof (pattern));
-+    pattern.data = safe_strdup (tmp);
-+  }
-+
-+  if (data & (M_MBOXHOOK | M_SAVEHOOK | M_FCCHOOK))
-+  {
-+    strfcpy (path, command.data, sizeof (path));
-+    mutt_expand_path (path, sizeof (path));
-+    FREE (&command.data);
-+    memset (&command, 0, sizeof (command));
-+    command.data = safe_strdup (path);
-+  }
-+
-+  /* check to make sure that a matching hook doesn't already exist */
-+  for (ptr = Hooks; ptr; ptr = ptr->next)
-+  {
-+    if (ptr->type == data &&
-+      ptr->rx.not == not &&
-+      !mutt_strcmp (pattern.data, ptr->rx.pattern))
-+    {
-+      if (data & (M_FOLDERHOOK | M_SENDHOOK | M_MESSAGEHOOK | M_ACCOUNTHOOK))
-+      {
-+      /* these hooks allow multiple commands with the same
-+       * pattern, so if we've already seen this pattern/command pair, just
-+       * ignore it instead of creating a duplicate */
-+      if (!mutt_strcmp (ptr->command, command.data))
-+      {
-+        FREE (&command.data);
-+        FREE (&pattern.data);
-+        return 0;
-+      }
-+      }
-+      else
-+      {
-+      /* other hooks only allow one command per pattern, so update the
-+       * entry with the new command.  this currently does not change the
-+       * order of execution of the hooks, which i think is desirable since
-+       * a common action to perform is to change the default (.) entry
-+       * based upon some other information. */
-+      FREE (&ptr->command);
-+      ptr->command = command.data;
-+      FREE (&pattern.data);
-+      return 0;
-+      }
-+    }
-+    if (!ptr->next)
-+      break;
-+  }
-+
-+  if (data & (M_SENDHOOK | M_SAVEHOOK | M_FCCHOOK | M_MESSAGEHOOK))
-+  {
-+    if ((pat = mutt_pattern_comp (pattern.data,
-+         (data & (M_SENDHOOK | M_FCCHOOK)) ? 0 : M_FULL_MSG,
-+                                err)) == NULL)
-+      goto error;
-+  }
-+  else
-+  {
-+    rx = safe_malloc (sizeof (regex_t));
-+#ifdef M_PGPHOOK
-+    if ((rc = REGCOMP (rx, NONULL(pattern.data), ((data & (M_PGPHOOK|M_CHARSETHOOK)) ? REG_ICASE : 0))) != 0)
-+#else
-+    if ((rc = REGCOMP (rx, NONULL(pattern.data), (data & (M_CHARSETHOOK|M_ICONVHOOK)) ? REG_ICASE : 0)) != 0)
-+#endif /* HAVE_PGP */
-+    {
-+      regerror (rc, rx, err->data, err->dsize);
-+      regfree (rx);
-+      safe_free ((void **) &rx);
-+      goto error;
-+    }
-+  }
-+
-+  if (ptr)
-+  {
-+    ptr->next = safe_calloc (1, sizeof (HOOK));
-+    ptr = ptr->next;
-+  }
-+  else
-+    Hooks = ptr = safe_calloc (1, sizeof (HOOK));
-+  ptr->type = data;
-+  ptr->command = command.data;
-+  ptr->pattern = pat;
-+  ptr->rx.pattern = pattern.data;
-+  ptr->rx.rx = rx;
-+  ptr->rx.not = not;
-+  return 0;
-+
-+error:
-+  FREE (&pattern.data);
-+  FREE (&command.data);
-+  return (-1);
-+}
-+
-+static void delete_hook (HOOK *h)
-+{
-+  FREE (&h->command);
-+  FREE (&h->rx.pattern);
-+  if (h->rx.rx)
-+  {
-+    regfree (h->rx.rx);
-+  }
-+  mutt_pattern_free (&h->pattern);
-+  FREE (&h);
-+}
-+
-+/* Deletes all hooks of type ``type'', or all defined hooks if ``type'' is 0 */
-+static void delete_hooks (int type)
-+{
-+  HOOK *h;
-+  HOOK *prev;
-+
-+  while (h = Hooks, h && (type == 0 || type == h->type))
-+  {
-+    Hooks = h->next;
-+    delete_hook (h);
-+  }
-+
-+  prev = h; /* Unused assignment to avoid compiler warnings */
-+
-+  while (h)
-+  {
-+    if (type == h->type)
-+    {
-+      prev->next = h->next;
-+      delete_hook (h);
-+    }
-+    else
-+      prev = h;
-+    h = prev->next;
-+  }
-+}
-+
-+int mutt_parse_unhook (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err)
-+{
-+  while (MoreArgs (s))
-+  {
-+    mutt_extract_token (buf, s, 0);
-+    if (mutt_strcmp ("*", buf->data) == 0)
-+    {
-+      if (current_hook_type)
-+      {
-+      snprintf (err->data, err->dsize,
-+                _("unhook: Can't do unhook * from within a hook."));
-+      return -1;
-+      }
-+      delete_hooks (0);
-+    }
-+    else
-+    {
-+      int type = mutt_get_hook_type (buf->data);
-+
-+      if (!type)
-+      {
-+      snprintf (err->data, err->dsize,
-+               _("unhook: unknown hook type: %s"), buf->data);
-+      return (-1);
-+      }
-+      if (current_hook_type == type)
-+      {
-+      snprintf (err->data, err->dsize,
-+                _("unhook: Can't delete a %s from within a %s."),
-+                buf->data, buf->data);
-+      return -1;
-+      }
-+      delete_hooks (type);
-+    }
-+  }
-+  return 0;
-+}
-+
-+void mutt_folder_hook (char *path)
-+{
-+  HOOK *tmp = Hooks;
-+  BUFFER err, token;
-+  char buf[STRING];
-+
-+  current_hook_type = M_FOLDERHOOK;
-+  
-+  err.data = buf;
-+  err.dsize = sizeof (buf);
-+  memset (&token, 0, sizeof (token));
-+  for (; tmp; tmp = tmp->next)
-+  {
-+    if(!tmp->command)
-+      continue;
-+
-+    if (tmp->type & M_FOLDERHOOK)
-+    {
-+      if ((regexec (tmp->rx.rx, path, 0, NULL, 0) == 0) ^ tmp->rx.not)
-+      {
-+      if (mutt_parse_rc_line (tmp->command, &token, &err) == -1)
-+      {
-+        mutt_error ("%s", err.data);
-+        FREE (&token.data);
-+        mutt_sleep (1);       /* pause a moment to let the user see the error */
-+        current_hook_type = 0;
-+        return;
-+      }
-+      }
-+    }
-+  }
-+  FREE (&token.data);
-+  
-+  current_hook_type = 0;
-+}
-+
-+char *mutt_find_hook (int type, const char *pat)
-+{
-+  HOOK *tmp = Hooks;
-+
-+  for (; tmp; tmp = tmp->next)
-+    if (tmp->type & type)
-+    {
-+      if (regexec (tmp->rx.rx, pat, 0, NULL, 0) == 0)
-+      return (tmp->command);
-+    }
-+  return (NULL);
-+}
-+
-+void mutt_message_hook (CONTEXT *ctx, HEADER *hdr, int type)
-+{
-+  BUFFER err, token;
-+  HOOK *hook;
-+  char buf[STRING];
-+
-+  current_hook_type = type;
-+  
-+  err.data = buf;
-+  err.dsize = sizeof (buf);
-+  memset (&token, 0, sizeof (token));
-+  for (hook = Hooks; hook; hook = hook->next)
-+  {
-+    if(!hook->command)
-+      continue;
-+
-+    if (hook->type & type)
-+      if ((mutt_pattern_exec (hook->pattern, 0, ctx, hdr) > 0) ^ hook->rx.not)
-+      if (mutt_parse_rc_line (hook->command, &token, &err) != 0)
-+      {
-+        FREE (&token.data);
-+        mutt_error ("%s", err.data);
-+        mutt_sleep (1);
-+        current_hook_type = 0;
-+        return;
-+      }
-+  }
-+  FREE (&token.data);
-+  current_hook_type = 0;
-+}
-+
-+static int
-+mutt_addr_hook (char *path, size_t pathlen, int type, CONTEXT *ctx, HEADER *hdr)
-+{
-+  HOOK *hook;
-+
-+  /* determine if a matching hook exists */
-+  for (hook = Hooks; hook; hook = hook->next)
-+  {
-+    if(!hook->command)
-+      continue;
-+
-+    if (hook->type & type)
-+      if ((mutt_pattern_exec (hook->pattern, 0, ctx, hdr) > 0) ^ hook->rx.not)
-+      {
-+      mutt_make_string (path, pathlen, hook->command, ctx, hdr);
-+      return 0;
-+      }
-+  }
-+
-+  return -1;
-+}
-+
-+void mutt_default_save (char *path, size_t pathlen, HEADER *hdr)
-+{
-+  *path = 0;
-+  if (mutt_addr_hook (path, pathlen, M_SAVEHOOK, Context, hdr) != 0)
-+  {
-+    char tmp[_POSIX_PATH_MAX];
-+    ADDRESS *adr;
-+    ENVELOPE *env = hdr->env;
-+    int fromMe = mutt_addr_is_user (env->from);
-+
-+    if (!fromMe && env->reply_to && env->reply_to->mailbox)
-+      adr = env->reply_to;
-+    else if (!fromMe && env->from && env->from->mailbox)
-+      adr = env->from;
-+    else if (env->to && env->to->mailbox)
-+      adr = env->to;
-+    else if (env->cc && env->cc->mailbox)
-+      adr = env->cc;
-+    else
-+      adr = NULL;
-+    if (adr)
-+    {
-+      mutt_safe_path (tmp, sizeof (tmp), adr);
-+      snprintf (path, pathlen, "=%s", tmp);
-+    }
-+  }
-+}
-+
-+void mutt_select_fcc (char *path, size_t pathlen, HEADER *hdr)
-+{
-+  ADDRESS *adr;
-+  char buf[_POSIX_PATH_MAX];
-+  ENVELOPE *env = hdr->env;
-+
-+  if (mutt_addr_hook (path, pathlen, M_FCCHOOK, NULL, hdr) != 0)
-+  {
-+    if ((option (OPTSAVENAME) || option (OPTFORCENAME)) &&
-+      (env->to || env->cc || env->bcc))
-+    {
-+      adr = env->to ? env->to : (env->cc ? env->cc : env->bcc);
-+      mutt_safe_path (buf, sizeof (buf), adr);
-+      snprintf (path, pathlen, "%s/%s", NONULL (Maildir), buf);
-+      if (!option (OPTFORCENAME) && mx_access (path, W_OK) != 0)
-+      strfcpy (path, NONULL (Outbox), pathlen);
-+    }
-+    else
-+      strfcpy (path, NONULL (Outbox), pathlen);
-+  }
-+  mutt_pretty_mailbox (path);
-+}
-+
-+static char *_mutt_string_hook (const char *match, int hook)
-+{
-+  HOOK *tmp = Hooks;
-+
-+  for (; tmp; tmp = tmp->next)
-+  {
-+    if ((tmp->type & hook) && ((match &&
-+       regexec (tmp->rx.rx, match, 0, NULL, 0) == 0) ^ tmp->rx.not))
-+      return (tmp->command);
-+  }
-+  return (NULL);
-+}
-+
-+char *mutt_charset_hook (const char *chs)
-+{
-+  return _mutt_string_hook (chs, M_CHARSETHOOK);
-+}
-+
-+char *mutt_iconv_hook (const char *chs)
-+{
-+  return _mutt_string_hook (chs, M_ICONVHOOK);
-+}
-+
-+#ifdef HAVE_PGP
-+char *mutt_pgp_hook (ADDRESS *adr)
-+{
-+  return _mutt_string_hook (adr->mailbox, M_PGPHOOK);
-+}
-+#endif /* HAVE_PGP */
-+
-+#ifdef USE_SOCKET
-+void mutt_account_hook (const char* url)
-+{
-+  HOOK* hook;
-+  BUFFER token;
-+  BUFFER err;
-+  char buf[STRING];
-+
-+  err.data = buf;
-+  err.dsize = sizeof (buf);
-+  memset (&token, 0, sizeof (token));
-+
-+  for (hook = Hooks; hook; hook = hook->next)
-+  {
-+    if (! (hook->command && (hook->type & M_ACCOUNTHOOK)))
-+      continue;
-+
-+    if ((regexec (hook->rx.rx, url, 0, NULL, 0) == 0) ^ hook->rx.not)
-+    {
-+      if (mutt_parse_rc_line (hook->command, &token, &err) == -1)
-+      {
-+      FREE (&token.data);
-+      mutt_error ("%s", err.data);
-+      mutt_sleep (1);
-+
-+      return;
-+      }
-+    }
-+  }
-+
-+  FREE (&token.data);
-+}
-+#endif
-diff -rU3 --new-file mutt-1.3.99-vanilla/init.h mutt-1.3.99/init.h
---- mutt-1.3.99-vanilla/init.h Thu May 23 14:12:14 2002
-+++ mutt-1.3.99/init.h Thu May 23 14:13:33 2002
-@@ -1183,6 +1183,14 @@
- #ifdef HAVE_PGP
-+  { "pgp_autoselectkey",      DT_BOOL, R_NONE, OPTPGPAUTOSELECT, 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 \fIpgp-hook\fP command (with ``$$pgp_confirmhook'' set) and the
-+  ** ``$$pgp_ignore_subkeys'' variable.
-+  */
-   { "pgp_autosign",   DT_BOOL, R_NONE, OPTPGPAUTOSIGN, 0 },
-   /*
-   ** .pp
-@@ -1200,6 +1208,14 @@
-   ** \fIpgp-menu\fP, when encryption is not required or signing is
-   ** requested as well.
-   */
-+  { "pgp_confirmhook",        DT_BOOL, R_NONE, OPTPGPCONFIRMHOOK, 1 },
-+  /*
-+  ** .pp
-+  ** If set, then you will be prompted for confirmation of keys when using
-+  ** the \fIpgp-hook\fP command.  If unset, no such confirmation prompt will
-+  ** be presented.  This is generally considered unsafe, especially where
-+  ** typos are concerned.
-+  */
-   { "pgp_ignore_subkeys", DT_BOOL, R_NONE, OPTPGPIGNORESUB, 1},
-   /*
-   ** .pp
-diff -rU3 --new-file mutt-1.3.99-vanilla/init.h.orig mutt-1.3.99/init.h.orig
---- mutt-1.3.99-vanilla/init.h.orig    Thu May 23 14:12:14 2002
-+++ mutt-1.3.99/init.h.orig    Thu May 23 14:12:14 2002
-@@ -519,6 +519,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
-diff -rU3 --new-file mutt-1.3.99-vanilla/mutt-1.3.28/PATCHES mutt-1.3.99/mutt-1.3.28/PATCHES
---- mutt-1.3.99-vanilla/mutt-1.3.28/PATCHES    Thu Jan  1 01:00:00 1970
-+++ mutt-1.3.99/mutt-1.3.28/PATCHES    Thu May 23 14:13:28 2002
-@@ -0,0 +1 @@
-+patch-1.3.28.dw.pgp-hook.3
-diff -rU3 --new-file mutt-1.3.99-vanilla/mutt.h mutt-1.3.99/mutt.h
---- mutt-1.3.99-vanilla/mutt.h Thu May 23 14:12:14 2002
-+++ mutt-1.3.99/mutt.h Thu May 23 14:13:33 2002
-@@ -427,8 +427,10 @@
-   /* PGP options */
-   
- #ifdef HAVE_PGP
-+  OPTPGPAUTOSELECT,
-   OPTPGPAUTOSIGN,
-   OPTPGPAUTOENCRYPT,
-+  OPTPGPCONFIRMHOOK,
-   OPTPGPIGNORESUB,
-   OPTPGPLONGIDS,
-   OPTPGPREPLYENCRYPT,
-diff -rU3 --new-file mutt-1.3.99-vanilla/mutt.h.orig mutt-1.3.99/mutt.h.orig
---- mutt-1.3.99-vanilla/mutt.h.orig    Thu May 23 14:12:14 2002
-+++ mutt-1.3.99/mutt.h.orig    Thu May 23 14:12:14 2002
-@@ -192,6 +192,7 @@
-   M_UNDELETE,
-   M_DELETED,
-   M_APPENDED,
-+  M_PURGED,
-   M_FLAG,
-   M_TAG,
-   M_UNTAG,
-@@ -632,6 +633,7 @@
-   unsigned int flagged : 1;           /* marked important? */
-   unsigned int tagged : 1;
-   unsigned int appended : 1; /* has been saved */
-+  unsigned int purged : 1;   /* bypassing the trash folder */
-   unsigned int deleted : 1;
-   unsigned int changed : 1;
-   unsigned int attach_del : 1;                /* has an attachment marked for deletion */
-diff -rU3 --new-file mutt-1.3.99-vanilla/pgp.c mutt-1.3.99/pgp.c
---- mutt-1.3.99-vanilla/pgp.c  Wed Jan  9 16:39:28 2002
-+++ mutt-1.3.99/pgp.c  Thu May 23 14:13:33 2002
-@@ -1327,6 +1327,8 @@
-   char *keyID, *keylist = NULL, *t;
-   size_t keylist_size = 0;
-   size_t keylist_used = 0;
-+  LIST *hook_list = NULL;
-+  LIST *hook = NULL;
-   ADDRESS *tmp = NULL, *addr = NULL;
-   ADDRESS **last = &tmp;
-   ADDRESS *p, *q;
-@@ -1360,62 +1362,88 @@
-     char buf[LONG_STRING];
-     q = p;
--    k_info = NULL;
--    if ((keyID = mutt_pgp_hook (p)) != NULL)
-+    /*
-+     * grab the list of matching hooks (matching on recipient address)
-+     * process each entry singly so that auto key selection still works
-+     */
-+    hook_list = mutt_pgp_hook (p);
-+    hook = hook_list;
-+    while (1)
-     {
-       int r;
--      snprintf (buf, sizeof (buf), _("Use keyID = \"%s\" for %s?"), keyID, p->mailbox);
--      if ((r = mutt_yesorno (buf, M_YES)) == M_YES)
-+
-+      k_info = NULL;
-+
-+      if (hook)
-       {
--      /* check for e-mail address */
--      if ((t = strchr (keyID, '@')) && 
--          (addr = rfc822_parse_adrlist (NULL, keyID)))
-+      keyID = (char *)hook->data;
-+      snprintf (buf, sizeof (buf), _("Use keyID = \"%s\" for %s?"), keyID, p->mailbox);
-+      if (!option(OPTPGPCONFIRMHOOK) || (r = mutt_yesorno (buf, M_YES)) == M_YES)
-       {
--        if (fqdn) rfc822_qualify (addr, fqdn);
--        q = addr;
-+        /* check for e-mail address */
-+        if ((t = strchr (keyID, '@')) && 
-+            (addr = rfc822_parse_adrlist (NULL, keyID)))
-+        {
-+          if (fqdn) rfc822_qualify (addr, fqdn);
-+          q = addr;
-+        }
-+        else
-+          k_info = pgp_getkeybystr (keyID, KEYFLAG_CANENCRYPT, PGP_PUBRING);
-+      }
-+      else if (r == -1)
-+      {
-+        /*
-+         * yes, this implies that if one key fails they all do
-+         */
-+        safe_free ((void **) &keylist);
-+        rfc822_free_address (&tmp);
-+        rfc822_free_address (&addr);
-+        mutt_free_list (&hook_list);
-+        return NULL;
-       }
--      else
--        k_info = pgp_getkeybystr (keyID, KEYFLAG_CANENCRYPT, PGP_PUBRING);
--      }
--      else if (r == -1)
--      {
--      safe_free ((void **) &keylist);
--      rfc822_free_address (&tmp);
--      rfc822_free_address (&addr);
--      return NULL;
-       }
--    }
--    if (k_info == NULL)
--      pgp_invoke_getkeys (q);
-+      if (k_info == NULL)
-+      pgp_invoke_getkeys (q);
--    if (k_info == NULL && (k_info = pgp_getkeybyaddr (q, KEYFLAG_CANENCRYPT, PGP_PUBRING)) == NULL)
--    {
--      snprintf (buf, sizeof (buf), _("Enter keyID for %s: "), q->mailbox);
--
--      if ((key = pgp_ask_for_key (buf, q->mailbox,
--                                KEYFLAG_CANENCRYPT, PGP_PUBRING)) == NULL)
-+      if (k_info == NULL && (k_info = pgp_getkeybyaddr (q, KEYFLAG_CANENCRYPT, PGP_PUBRING)) == NULL)
-       {
--      safe_free ((void **)&keylist);
--      rfc822_free_address (&tmp);
--      rfc822_free_address (&addr);
--      return NULL;
-+      snprintf (buf, sizeof (buf), _("Enter keyID for %s: "), q->mailbox);
-+
-+      if ((key = pgp_ask_for_key (buf, q->mailbox,
-+                                  KEYFLAG_CANENCRYPT, PGP_PUBRING)) == NULL)
-+      {
-+        safe_free ((void **)&keylist);
-+        rfc822_free_address (&tmp);
-+        rfc822_free_address (&addr);
-+        mutt_free_list (&hook_list);
-+        return NULL;
-+      }
-       }
--    }
--    else
--      key = k_info;
-+      else
-+      key = k_info;
--    keyID = pgp_keyid (key);
--    
--    keylist_size += mutt_strlen (keyID) + 4;
--    safe_realloc ((void **)&keylist, keylist_size);
--    sprintf (keylist + keylist_used, "%s0x%s", keylist_used ? " " : "",       /* __SPRINTF_CHECKED__ */
--           keyID);
--    keylist_used = mutt_strlen (keylist);
-+      keyID = pgp_keyid (key);
-+      
-+      keylist_size += mutt_strlen (keyID) + 4;
-+      safe_realloc ((void **)&keylist, keylist_size);
-+      sprintf (keylist + keylist_used, "%s0x%s", keylist_used ? " " : "",     /* __SPRINTF_CHECKED__ */
-+             keyID);
-+      keylist_used = mutt_strlen (keylist);
-+
-+      pgp_free_key (&key);
-+      rfc822_free_address (&addr);
-+
-+      if (!hook_list)
-+      break;
-+
-+      hook = hook->next;
-+      if (!hook)
-+      break;
--    pgp_free_key (&key);
--    rfc822_free_address (&addr);
-+    }
-+    mutt_free_list (&hook_list);
-   }
-   rfc822_free_address (&tmp);
-diff -rU3 --new-file mutt-1.3.99-vanilla/pgpkey.c mutt-1.3.99/pgpkey.c
---- mutt-1.3.99-vanilla/pgpkey.c       Tue Jan 15 10:04:28 2002
-+++ mutt-1.3.99/pgpkey.c       Thu May 23 14:13:33 2002
-@@ -435,6 +435,11 @@
-   return rv;
- }
-+
-+#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)
- {
-@@ -450,6 +455,7 @@
-   pgp_uid_t *a;
-   int (*f) (const void *, const void *);
-+  int keymatch = 0;           /* count matching keys */
-   int unusable = 0;
-   keymax = 0;
-@@ -479,6 +485,7 @@
-       
-       KeyTable[i++] = a;
-     }
-+    keymatch++;
-   }
-   if (!i && unusable)
-@@ -487,6 +494,21 @@
-     mutt_sleep (1);
-     return NULL;
-   }
-+  else if (keymatch == 1 && option(OPTPGPAUTOSELECT))
-+  {
-+    /*
-+     * 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);
-+      }
-+    }
-+  }
-   switch (PgpSortKeys & SORT_MASK)
-   {
-@@ -597,9 +619,7 @@
-         break;
-       }
-       
--      if (option (OPTPGPCHECKTRUST) &&
--        (!pgp_id_is_valid (KeyTable[menu->current])
--         || !pgp_id_is_strong (KeyTable[menu->current])))
-+      if (!pgp_trusted_id(KeyTable[menu->current]))
-       {
-       char *s = "";
-       char buff[LONG_STRING];
-diff -rU3 --new-file mutt-1.3.99-vanilla/protos.h mutt-1.3.99/protos.h
---- mutt-1.3.99-vanilla/protos.h       Thu May 23 14:12:14 2002
-+++ mutt-1.3.99/protos.h       Thu May 23 14:13:33 2002
-@@ -130,7 +130,7 @@
- char *mutt_get_name (ADDRESS *);
- char *mutt_get_parameter (const char *, PARAMETER *);
- #ifdef HAVE_PGP
--char *mutt_pgp_hook (ADDRESS *);
-+LIST *mutt_pgp_hook (ADDRESS *);
- #endif /* HAVE_PGP */
- char *mutt_make_date (char *, size_t);
-diff -rU3 --new-file mutt-1.3.99-vanilla/protos.h.orig mutt-1.3.99/protos.h.orig
---- mutt-1.3.99-vanilla/protos.h.orig  Thu May 23 14:12:13 2002
-+++ mutt-1.3.99/protos.h.orig  Thu May 23 14:12:14 2002
-@@ -220,6 +220,7 @@
- void mutt_shell_escape (void);
- void mutt_show_error (void);
- void mutt_signal_init (void);
-+void mutt_signature (char *);
- void mutt_stamp_attachment (BODY *a);
- void mutt_tabs_to_spaces (char *);
- void mutt_tag_set_flag (int, int);
diff --git a/mutt-rr.compressed.patch b/mutt-rr.compressed.patch
deleted file mode 100644 (file)
index b4fedac..0000000
+++ /dev/null
@@ -1,1788 +0,0 @@
-diff -Nur 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    Fri Feb  1 22:51:32 2002
-@@ -18,7 +18,8 @@
- bin_PROGRAMS = mutt @DOTLOCK_TARGET@ @PGPAUX_TARGET@
- mutt_SOURCES = $(BUILT_SOURCES) \
-       addrbook.c alias.c attach.c base64.c browser.c buffy.c color.c \
--      commands.c complete.c compose.c copy.c curs_lib.c curs_main.c date.c \
-+      commands.c complete.c compose.c compress.c copy.c curs_lib.c \
-+      curs_main.c date.c \
-       edit.c enter.c flags.c init.c filter.c from.c getdomain.c \
-       handler.c hash.c hdrline.c headers.c help.c hook.c keymap.c \
-       main.c mbox.c menu.c mh.c mx.c pager.c parse.c pattern.c \
-@@ -70,8 +71,8 @@
-       browser.h mbyte.h remailer.h url.h mutt_ssl_nss.c pgppacket.c 
- EXTRA_DIST = COPYRIGHT GPL OPS OPS.PGP TODO configure acconfig.h account.h \
--      attach.h buffy.h charset.h copy.h dotlock.h functions.h gen_defs \
--      globals.h hash.h history.h init.h keymap.h \
-+      attach.h buffy.h charset.h compress.h copy.h dotlock.h functions.h \
-+      gen_defs globals.h hash.h history.h init.h keymap.h \
-       mailbox.h mapping.h md5.h mime.h mutt.h mutt_curses.h mutt_menu.h \
-       mutt_regex.h mutt_sasl.h mutt_socket.h mutt_ssl.h mutt_tunnel.h \
-       mx.h pager.h pgp.h pop.h protos.h reldate.h rfc1524.h rfc2047.h \
-diff -Nur mutt-1.3.27.orig/Makefile.in mutt-1.3.27/Makefile.in
---- mutt-1.3.27.orig/Makefile.in       Tue Jan  1 21:18:15 2002
-+++ mutt-1.3.27/Makefile.in    Fri Feb  1 22:51:32 2002
-@@ -117,7 +117,7 @@
- BUILT_SOURCES = keymap_defs.h patchlist.c
- bin_PROGRAMS = mutt @DOTLOCK_TARGET@ @PGPAUX_TARGET@
--mutt_SOURCES = $(BUILT_SOURCES)       addrbook.c alias.c attach.c base64.c browser.c buffy.c color.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 getdomain.c       handler.c hash.c hdrline.c headers.c help.c hook.c keymap.c     main.c mbox.c menu.c mh.c mx.c pager.c parse.c pattern.c        postpone.c query.c recvattach.c recvcmd.c       rfc822.c rfc1524.c rfc2047.c rfc2231.c  score.c send.c sendlib.c signal.c sort.c        status.c system.c thread.c charset.c history.c lib.c    muttlib.c editmsg.c utf8.c mbyte.c wcwidth.c    url.c ascii.c
-+mutt_SOURCES = $(BUILT_SOURCES)       addrbook.c alias.c attach.c base64.c browser.c buffy.c color.c  commands.c complete.c compose.c compress.c copy.c curs_lib.c curs_main.c date.c         edit.c enter.c flags.c init.c filter.c from.c getdomain.c       handler.c hash.c hdrline.c headers.c help.c hook.c keymap.c     main.c mbox.c menu.c mh.c mx.c pager.c parse.c pattern.c        postpone.c query.c recvattach.c recvcmd.c       rfc822.c rfc1524.c rfc2047.c rfc2231.c  score.c send.c sendlib.c signal.c sort.c        status.c system.c thread.c charset.c history.c lib.c    muttlib.c editmsg.c utf8.c mbyte.c wcwidth.c    url.c ascii.c
- mutt_LDADD = @MUTT_LIB_OBJECTS@ @LIBOBJS@ $(LIBIMAP) $(MUTTLIBS)      $(INTLLIBS) $(LIBICONV)
-@@ -152,7 +152,7 @@
- EXTRA_mutt_SOURCES = account.c md5c.c mutt_sasl.c mutt_socket.c mutt_ssl.c    mutt_tunnel.c pop.c pop_auth.c pop_lib.c pgp.c pgpinvoke.c pgpkey.c     pgplib.c sha1.c pgpmicalg.c gnupgparse.c resize.c dotlock.c remailer.c  browser.h mbyte.h remailer.h url.h mutt_ssl_nss.c pgppacket.c 
--EXTRA_DIST = COPYRIGHT GPL OPS OPS.PGP TODO configure acconfig.h account.h    attach.h buffy.h charset.h copy.h dotlock.h functions.h gen_defs        globals.h hash.h history.h init.h keymap.h      mailbox.h mapping.h md5.h mime.h mutt.h mutt_curses.h mutt_menu.h       mutt_regex.h mutt_sasl.h mutt_socket.h mutt_ssl.h mutt_tunnel.h         mx.h pager.h pgp.h pop.h protos.h reldate.h rfc1524.h rfc2047.h         rfc2231.h rfc822.h sha1.h sort.h mime.types VERSION prepare     _regex.h OPS.MIX README.SECURITY remailer.c remailer.h browser.h        mbyte.h lib.h extlib.c pgpewrap.c pgplib.h Muttrc.head Muttrc   makedoc.c stamp-doc-rc README.SSL       muttbug pgppacket.h depcomp ascii.h BEWARE PATCHES patchlist.sh
-+EXTRA_DIST = COPYRIGHT GPL OPS OPS.PGP TODO configure acconfig.h account.h    attach.h buffy.h charset.h compress.h copy.h dotlock.h functions.h gen_defs     globals.h hash.h history.h init.h keymap.h      mailbox.h mapping.h md5.h mime.h mutt.h mutt_curses.h mutt_menu.h       mutt_regex.h mutt_sasl.h mutt_socket.h mutt_ssl.h mutt_tunnel.h         mx.h pager.h pgp.h pop.h protos.h reldate.h rfc1524.h rfc2047.h         rfc2231.h rfc822.h sha1.h sort.h mime.types VERSION prepare     _regex.h OPS.MIX README.SECURITY remailer.c remailer.h browser.h        mbyte.h lib.h extlib.c pgpewrap.c pgplib.h Muttrc.head Muttrc   makedoc.c stamp-doc-rc README.SSL       muttbug pgppacket.h depcomp ascii.h BEWARE PATCHES patchlist.sh
- mutt_dotlock_SOURCES = mutt_dotlock.c
-@@ -187,7 +187,7 @@
- makedoc_OBJECTS =  makedoc.o
- makedoc_LDFLAGS = 
- mutt_OBJECTS =  patchlist.o addrbook.o alias.o attach.o base64.o \
--browser.o buffy.o color.o commands.o complete.o compose.o copy.o \
-+browser.o buffy.o color.o commands.o complete.o compose.o compress.o copy.o \
- curs_lib.o curs_main.o date.o edit.o enter.o flags.o init.o filter.o \
- from.o getdomain.o handler.o hash.o hdrline.o headers.o help.o hook.o \
- keymap.o main.o mbox.o menu.o mh.o mx.o pager.o parse.o pattern.o \
-diff -Nur mutt-1.3.27.orig/Muttrc mutt-1.3.27/Muttrc
---- mutt-1.3.27.orig/Muttrc    Tue Jan  1 21:18:05 2002
-+++ mutt-1.3.27/Muttrc Fri Feb  1 22:51:32 2002
-@@ -19,6 +19,15 @@
- macro index   <f1> "!less /usr/local/doc/mutt/manual.txt\n" "Show Mutt documentation"
- macro pager   <f1> "!less /usr/local/doc/mutt/manual.txt\n" "Show Mutt documentation"
-+# 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"
-+
- # If Mutt is unable to determine your site's domain name correctly, you can
- # set the default here.
- #
-diff -Nur mutt-1.3.27.orig/Muttrc.head mutt-1.3.27/Muttrc.head
---- mutt-1.3.27.orig/Muttrc.head       Tue Jan  1 21:18:02 2002
-+++ mutt-1.3.27/Muttrc.head    Fri Feb  1 22:51:32 2002
-@@ -19,6 +19,15 @@
- macro index   <f1> "!less /usr/local/doc/mutt/manual.txt\n" "Show Mutt documentation"
- macro pager   <f1> "!less /usr/local/doc/mutt/manual.txt\n" "Show Mutt documentation"
-+# 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"
-+
- # If Mutt is unable to determine your site's domain name correctly, you can
- # set the default here.
- #
-diff -Nur mutt-1.3.27.orig/Muttrc.head.in mutt-1.3.27/Muttrc.head.in
---- mutt-1.3.27.orig/Muttrc.head.in    Mon Mar 20 11:25:49 2000
-+++ mutt-1.3.27/Muttrc.head.in Fri Feb  1 22:51:32 2002
-@@ -19,6 +19,15 @@
- macro index   <f1> "!less @docdir@/manual.txt\n" "Show Mutt documentation"
- macro pager   <f1> "!less @docdir@/manual.txt\n" "Show Mutt documentation"
-+# 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"
-+
- # If Mutt is unable to determine your site's domain name correctly, you can
- # set the default here.
- #
-diff -Nur mutt-1.3.27.orig/PATCHES mutt-1.3.27/PATCHES
---- mutt-1.3.27.orig/PATCHES   Mon Nov 26 20:16:22 2001
-+++ mutt-1.3.27/PATCHES        Fri Feb  1 22:51:32 2002
-@@ -0,0 +1 @@
-+patch-1.3.27.rr.compressed.1
-diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
---- mutt-1.3.27.orig/compress.c        Thu Jan  1 01:00:00 1970
-+++ mutt-1.3.27/compress.c     Fri Feb  1 22:51:32 2002
-@@ -0,0 +1,483 @@
-+/*
-+ * 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.
-+ */
-+
-+#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;
-+
-+
-+/*
-+ * 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);
-+  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, 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), 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))
-+  {
-+    safe_free ((void**)&ctx->compressinfo);
-+    safe_free ((void**)&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;
-+    safe_free ((void**)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);
-+    safe_free ((void **)&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!");
-+    safe_free ((void **)&cmd);
-+    return (-1);
-+  }
-+
-+  endwin ();
-+  fflush (stdout);
-+  fprintf (stderr, _("Decompressing %s...\n"),ctx->realpath);
-+  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;
-+    safe_free ((void**)ctx->compressinfo);
-+    mutt_error (_("Error executing: %s : unable to open the mailbox!\n"), cmd);
-+  }
-+  safe_free ((void **)&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)
-+{
-+  safe_free ((void **)&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;
-+    safe_free ((void**)&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 ((ctx->magic > 0) 
-+      && (access (ctx->path, F_OK) != 0) 
-+      && ! option (OPTSAVEEMPTY))
-+      remove (ctx->realpath);
-+    else
-+      remove_file (ctx);
-+
-+    restore_path (ctx);
-+    safe_free ((void**)&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);
-+    safe_free ((void **)&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);
-+    safe_free ((void **)&cmd);
-+    return (-1);
-+  }
-+
-+  dprint (2, (debugfile, "CompressCommand: '%s'\n", cmd));
-+
-+  endwin ();
-+  fflush (stdout);
-+  fprintf (stderr, _("Compressing %s...\n"), ctx->realpath);
-+  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);
-+
-+  safe_free ((void **)&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);
-+    safe_free ((void **)&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!");
-+    safe_free ((void **)&cmd);
-+    return (-1);
-+  }
-+
-+  dprint (2, (debugfile, "CompressCmd: '%s'\n", cmd));
-+
-+  endwin ();
-+  fflush (stdout);
-+
-+  if (append == ci->close)
-+    fprintf (stderr, _("Compressing %s...\n"), ctx->realpath);
-+  else
-+    fprintf (stderr, _("Compressed-appending to %s...\n"), ctx->realpath);
-+
-+  if (mutt_system (cmd))
-+  {
-+    mutt_any_key_to_continue (NULL);
-+    mutt_error (_(" %s: Error compressing mailbox!  Uncompressed one kept!\n"),
-+              ctx->path);
-+    safe_free ((void **)&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);
-+  safe_free ((void **)&cmd);
-+  safe_free ((void **)&ctx->compressinfo);
-+
-+  return (0);
-+}
-+
-+#endif /* USE_COMPRESSED */
-diff -Nur mutt-1.3.27.orig/compress.h mutt-1.3.27/compress.h
---- mutt-1.3.27.orig/compress.h        Thu Jan  1 01:00:00 1970
-+++ mutt-1.3.27/compress.h     Fri Feb  1 22:51:32 2002
-@@ -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 -Nur mutt-1.3.27.orig/config.h.in mutt-1.3.27/config.h.in
---- mutt-1.3.27.orig/config.h.in       Fri Aug  3 18:52:17 2001
-+++ mutt-1.3.27/config.h.in    Fri Feb  1 22:52:59 2002
-@@ -151,6 +151,9 @@
- /*  Define to enable Sun mailtool attachments support.  */
- #undef SUN_ATTACHMENT
-+/* Define to enable compressed mailboxes support */
-+#undef USE_COMPRESSED
-+
- /*  Define if the result of isprint() is unreliable.  */
- #undef LOCALES_HACK
-diff -Nur mutt-1.3.27.orig/configure mutt-1.3.27/configure
---- mutt-1.3.27.orig/configure Tue Jan  1 21:17:56 2002
-+++ mutt-1.3.27/configure      Fri Feb  1 22:51:32 2002
-@@ -60,6 +60,8 @@
- ac_help="$ac_help
-   --enable-locales-fix       The result of isprint() is unreliable "
- ac_help="$ac_help
-+  --enable-compressed        Enable compressed folders support "
-+ac_help="$ac_help
-   --with-exec-shell=SHELL    Specify alternate shell (ONLY if /bin/sh is broken)"
- ac_help="$ac_help
-   --enable-exact-address     Enable regeneration of email addresses"
-@@ -5793,6 +5795,18 @@
- EOF
-         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
-diff -Nur mutt-1.3.27.orig/configure.in mutt-1.3.27/configure.in
---- mutt-1.3.27.orig/configure.in      Fri Feb  1 22:51:17 2002
-+++ mutt-1.3.27/configure.in   Fri Feb  1 22:51:32 2002
-@@ -644,6 +644,11 @@
-                 AC_DEFINE(LOCALES_HACK,1,[ Define if the result of isprint() is unreliable. ])
-         fi])
-+AC_ARG_ENABLE(compressed, [  --enable-compressed        Enable compressed folders support ],
-+      [if test x$enableval = xyes; then
-+                AC_DEFINE(USE_COMPRESSED,1, [ Define to support compressed folders. ])
-+        fi])
-+
- AC_ARG_WITH(exec-shell, [  --with-exec-shell=SHELL    Specify alternate shell (ONLY if /bin/sh is broken)],
-         [if test $withval != yes; then
-                 AC_DEFINE_UNQUOTED(EXECSHELL, "$withval")
-diff -Nur mutt-1.3.27.orig/curs_main.c mutt-1.3.27/curs_main.c
---- mutt-1.3.27.orig/curs_main.c       Wed Jan 23 00:42:01 2002
-+++ mutt-1.3.27/curs_main.c    Fri Feb  1 22:51:32 2002
-@@ -1010,6 +1010,11 @@
-         {
-         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;
-diff -Nur mutt-1.3.27.orig/doc/manual-6.html mutt-1.3.27/doc/manual-6.html
---- mutt-1.3.27.orig/doc/manual-6.html Tue Jan  1 21:18:13 2002
-+++ mutt-1.3.27/doc/manual-6.html      Fri Feb  1 22:51:32 2002
-@@ -70,12 +70,16 @@
- <LI><CODE>
- <A HREF="manual-5.html#alternative_order">alternative_order</A></CODE> <EM>mimetype</EM> [ <EM>mimetype</EM> ... ]</LI>
- <LI><CODE>
-+<A HREF="manual-4.html#append-hook">append-hook</A></CODE> <EM>regexp</EM> &quot;<EM>command</EM>&quot;</LI>
-+<LI><CODE>
- <A HREF="manual-5.html#auto_view">auto_view</A></CODE> <EM>mimetype</EM> [ <EM>mimetype</EM> ... ]</LI>
- <LI><CODE>
- <A HREF="manual-3.html#bind">bind</A></CODE> <EM>map</EM> <EM>key</EM> <EM>function</EM></LI>
- <LI><CODE>
- <A HREF="manual-3.html#charset-hook">charset-hook</A></CODE> <EM>alias</EM> <EM>charset</EM></LI>
- <LI><CODE>
-+<A HREF="manual-4.html#close-hook">close-hook</A></CODE> <EM>regexp</EM> &quot;<EM>command</EM>&quot;</LI>
-+<LI><CODE>
- <A HREF="manual-3.html#color">color</A></CODE> <EM>object</EM> <EM>foreground</EM> <EM>background</EM> [ <EM>regexp</EM> ]</LI>
- <LI><CODE>
- <A HREF="manual-3.html#color">uncolor</A></CODE> <EM>index</EM> <EM>pattern</EM> [ <EM>pattern</EM> ... ]</LI>
-@@ -118,6 +122,8 @@
- <LI><CODE>
- <A HREF="manual-3.html#my_hdr">unmy_hdr</A></CODE> <EM>field</EM> [ <EM>field</EM> ... ]</LI>
- <LI><CODE>
-+<A HREF="manual-4.html#open-hook">open-hook</A></CODE> <EM>regexp</EM> &quot;<EM>command</EM>&quot;</LI>
-+<LI><CODE>
- <A HREF="manual-3.html#pgp-hook">pgp-hook</A></CODE> <EM>pattern</EM> <EM>key-id</EM></LI>
- <LI><CODE>
- <A HREF="manual-3.html#push">push</A></CODE> <EM>string</EM></LI>
-diff -Nur mutt-1.3.27.orig/doc/manual.sgml mutt-1.3.27/doc/manual.sgml
---- mutt-1.3.27.orig/doc/manual.sgml   Tue Jan  1 21:18:05 2002
-+++ mutt-1.3.27/doc/manual.sgml        Fri Feb  1 22:51:32 2002
-@@ -2318,6 +2318,176 @@
- macro pager \cb |urlview\n
- </verb></tscreen>
-+<sect1>Compressed folders Support (OPTIONAL)
-+<p>
-+
-+If Mutt was compiled with compressed folders support (by running the
-+<em/configure/ script with the <em/--enable-compressed/ 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.
-+
-+The most common use is to open compressed archived folders e.g. with
-+gzip.
-+
-+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.
-+
-+There are three hooks defined (<ref id="open-hook" name="open-hook">,
-+<ref id="close-hook" name="close-hook"> and <ref id="append-hook"
-+name="append-hook">) which define commands to uncompress and compress
-+a folder and to append messages to an existing compressed folder 
-+respectively.
-+
-+For example:
-+
-+<tscreen><verb>
-+open-hook \\.gz$ "gzip -cd %f &gt; %t" 
-+close-hook \\.gz$ "gzip -c %t &gt; %f"
-+append-hook \\.gz$ "gzip -c %t &gt;&gt; %f" 
-+</verb></tscreen>
-+
-+You do not have to specify all of the commands. If you omit <ref
-+id="append-hook" name="append-hook">, the folder will be open and
-+closed again each time you will add to it. If you omit <ref
-+id="close-hook" name="close-hook"> (or give empty command) , the
-+folder will be open in the  mode. If you specify <ref
-+id="append-hook" name="append-hook"> though you'll be able to append
-+to the folder.
-+
-+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
-+&dquot;.&dquot; as a regexp. But this may be surprising if your
-+compressing script produces empty files. In this situation, unset <ref
-+id="save_empty" name="&dollar;save&lowbar;empty">, so that the compressed file
-+will be removed if you delete all of the messages.
-+
-+<sect2>Open a compressed mailbox for reading<label id="open-hook">
-+<p>
-+Usage: <tt/open-hook/ <em/regexp/ &dquot;<em/command/&dquot;
-+
-+The <em/command/ is the command that can be used for opening the
-+folders whose names match <em/regexp/.
-+
-+The <em/command/ string is the printf-like format string, and it
-+should accept two parameters: &percnt;f, which is replaced with the
-+(compressed) folder name, and &percnt;t which is replaced with the
-+name of the temporary folder to which to write.
-+
-+&percnt;f and &percnt;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, &percnt;&percnt; is replaced by
-+&percnt;, as in printf, and any other &percnt;anything is left as is.
-+
-+The <em/command/ should <bf/not/ remove the original compressed file.
-+The <em/command/ should return non-zero exit status if it fails, so
-+mutt knows something's wrong.
-+
-+Example:
-+
-+<tscreen><verb>
-+open-hook \\.gz$ "gzip -cd %f &gt; %t" 
-+</verb></tscreen>
-+
-+If the <em/command/ is empty, this operation is disabled for this file
-+type.
-+
-+<sect2>Write a compressed mailbox<label id="close-hook">
-+<p>
-+Usage: <tt/close-hook/ <em/regexp/ &dquot;<em/command/&dquot;
-+
-+This is used to close the folder that was open with the <ref id="open-hook" 
-+name="open-hook"> command after some changes were made to it.
-+
-+The <em/command/ string is the command that can be used for closing the
-+folders whose names match <em/regexp/. It has the same format as in 
-+the <ref id="open-hook" name="open-hook"> command. Temporary folder
-+in this case is the folder previously produced by the <ref id="open-hook"
-+name="open-hook"> command.
-+
-+The <em/command/ should <bf/not/ remove the decompressed file. The
-+<em/command/ should return non-zero exit status if it fails, so mutt
-+knows something's wrong.
-+
-+Example:
-+
-+<tscreen><verb>
-+close-hook \\.gz$ "gzip -c %t &gt; %f"
-+</verb></tscreen>
-+
-+If the <em/command/ is empty, this operation is disabled for this file
-+type, and the file can only be open in the read-only mode.
-+
-+<ref id="close-hook" name ="close-hook"> is not called when you exit
-+from the folder if the folder was not changed.
-+
-+<sect2>Append a message to a compressed mailbox<label id="append-hook">
-+<p>
-+Usage: <tt/append-hook/ <em/regexp/ &dquot;<em/command/&dquot;
-+
-+This command is used for saving to an existing compressed folder.
-+The <em/command/ is the command that can be used for appending to the
-+folders whose names match <em/regexp/. It has the same format as in 
-+ the <ref id="open-hook" name="open-hook"> command.
-+The temporary folder in this case contains the messages that are being
-+appended. 
-+
-+The <em/command/ should <bf/not/ remove the decompressed file. The
-+<em/command/ should return non-zero exit status if it fails, so mutt
-+knows something's wrong.
-+
-+Example:
-+
-+<tscreen><verb>
-+append-hook \\.gz$ "gzip -c %t &gt;&gt; %f" 
-+</verb></tscreen>
-+
-+When <ref id="append-hook" name="append-hook"> 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 (<ref id="mbox_type"
-+name="&dollar;mbox&lowbar;type">) type is always supposed (i.e.
-+this is the format used for the temporary folder).
-+
-+If the file does not exist when you save to it, <ref id="close-hook"
-+name="close-hook"> is called, and not <ref id="append-hook"
-+name="append-hook">. <ref id="append-hook" name="append-hook"> is only
-+for appending to existing folders.
-+
-+If the <em/command/ is empty, this operation is disabled for this file
-+type. In this case, the folder will be open and closed again (using
-+<ref id="open-hook" name="open-hook"> and <ref id="close-hook" 
-+name="close-hook">respectively) each time you will add to it.
-+
-+<sect2>Encrypted folders
-+<p>
-+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:
-+
-+<tscreen><verb>
-+open-hook  \\.pgp$ "pgp -f &lt; %f &gt; %t"
-+close-hook \\.pgp$ "pgp -fe YourPgpUserIdOrKeyId &lt; %t &gt; %f"
-+</verb></tscreen>
-+
-+Please note, that PGP does not support appending to an encrypted
-+folder, so there is no append-hook defined.
-+
-+If you are using GnuPG instead of PGP, you may use the following hooks
-+instead:
-+
-+<tscreen><verb>
-+open-hook  \\.gpg$ "gpg --decrypt &lt; %f &gt; %t"
-+close-hook \\.gpg$ "gpg --encrypt --recipient YourGpgUserIdOrKeyId &lt; %t &gt; %f"
-+</verb></tscreen>
-+
-+<bf/Note:/ 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.
-+
- <sect>Mutt's MIME Support
- <p>
- Quite a bit of effort has been made to make Mutt the premier text-mode
-@@ -2868,12 +3038,16 @@
- <item>
- <tt><ref id="alternative_order" name="alternative&lowbar;order"></tt> <em/mimetype/ &lsqb; <em/mimetype/ ... &rsqb;
- <item>
-+<tt><ref id="append-hook" name="append-hook"></tt> <em/regexp/ &dquot;<em/command/&dquot;
-+<item>
- <tt><ref id="auto_view" name="auto&lowbar;view"></tt> <em/mimetype/ &lsqb; <em/mimetype/ ... &rsqb;
- <item>
- <tt><ref id="bind" name="bind"></tt> <em/map/ <em/key/ <em/function/
- <item>
- <tt><ref id="charset-hook" name="charset-hook"></tt> <em/alias/ <em/charset/
- <item>
-+<tt><ref id="close-hook" name="close-hook"></tt> <em/regexp/ &dquot;<em/command/&dquot;
-+<item>
- <tt><ref id="color" name="color"></tt> <em/object/ <em/foreground/ <em/background/ &lsqb; <em/regexp/ &rsqb;
- <item>
- <tt><ref id="color" name="uncolor"></tt> <em/index/ <em/pattern/ &lsqb; <em/pattern/ ... &rsqb;
-@@ -2916,6 +3090,8 @@
- <item>
- <tt><ref id="my_hdr" name="unmy&lowbar;hdr"></tt> <em/field/ &lsqb; <em/field/ ... &rsqb;
- <item>
-+<tt><ref id="open-hook" name="open-hook"></tt> <em/regexp/ &dquot;<em/command/&dquot;
-+<item>
- <tt><ref id="pgp-hook" name="pgp-hook"></tt> <em/pattern/ <em/key-id/
- <item>
- <tt><ref id="push" name="push"></tt> <em/string/
-diff -Nur mutt-1.3.27.orig/doc/manual.sgml.head mutt-1.3.27/doc/manual.sgml.head
---- mutt-1.3.27.orig/doc/manual.sgml.head      Wed Jan 23 00:42:01 2002
-+++ mutt-1.3.27/doc/manual.sgml.head   Fri Feb  1 22:51:32 2002
-@@ -2319,6 +2319,176 @@
- macro pager \cb |urlview\n
- </verb></tscreen>
-+<sect1>Compressed folders Support (OPTIONAL)
-+<p>
-+
-+If Mutt was compiled with compressed folders support (by running the
-+<em/configure/ script with the <em/--enable-compressed/ 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.
-+
-+The most common use is to open compressed archived folders e.g. with
-+gzip.
-+
-+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.
-+
-+There are three hooks defined (<ref id="open-hook" name="open-hook">,
-+<ref id="close-hook" name="close-hook"> and <ref id="append-hook"
-+name="append-hook">) which define commands to uncompress and compress
-+a folder and to append messages to an existing compressed folder 
-+respectively.
-+
-+For example:
-+
-+<tscreen><verb>
-+open-hook \\.gz$ "gzip -cd %f &gt; %t" 
-+close-hook \\.gz$ "gzip -c %t &gt; %f"
-+append-hook \\.gz$ "gzip -c %t &gt;&gt; %f" 
-+</verb></tscreen>
-+
-+You do not have to specify all of the commands. If you omit <ref
-+id="append-hook" name="append-hook">, the folder will be open and
-+closed again each time you will add to it. If you omit <ref
-+id="close-hook" name="close-hook"> (or give empty command) , the
-+folder will be open in the  mode. If you specify <ref
-+id="append-hook" name="append-hook"> though you'll be able to append
-+to the folder.
-+
-+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
-+&dquot;.&dquot; as a regexp. But this may be surprising if your
-+compressing script produces empty files. In this situation, unset <ref
-+id="save_empty" name="&dollar;save&lowbar;empty">, so that the compressed file
-+will be removed if you delete all of the messages.
-+
-+<sect2>Open a compressed mailbox for reading<label id="open-hook">
-+<p>
-+Usage: <tt/open-hook/ <em/regexp/ &dquot;<em/command/&dquot;
-+
-+The <em/command/ is the command that can be used for opening the
-+folders whose names match <em/regexp/.
-+
-+The <em/command/ string is the printf-like format string, and it
-+should accept two parameters: &percnt;f, which is replaced with the
-+(compressed) folder name, and &percnt;t which is replaced with the
-+name of the temporary folder to which to write.
-+
-+&percnt;f and &percnt;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, &percnt;&percnt; is replaced by
-+&percnt;, as in printf, and any other &percnt;anything is left as is.
-+
-+The <em/command/ should <bf/not/ remove the original compressed file.
-+The <em/command/ should return non-zero exit status if it fails, so
-+mutt knows something's wrong.
-+
-+Example:
-+
-+<tscreen><verb>
-+open-hook \\.gz$ "gzip -cd %f &gt; %t" 
-+</verb></tscreen>
-+
-+If the <em/command/ is empty, this operation is disabled for this file
-+type.
-+
-+<sect2>Write a compressed mailbox<label id="close-hook">
-+<p>
-+Usage: <tt/close-hook/ <em/regexp/ &dquot;<em/command/&dquot;
-+
-+This is used to close the folder that was open with the <ref id="open-hook" 
-+name="open-hook"> command after some changes were made to it.
-+
-+The <em/command/ string is the command that can be used for closing the
-+folders whose names match <em/regexp/. It has the same format as in 
-+the <ref id="open-hook" name="open-hook"> command. Temporary folder
-+in this case is the folder previously produced by the <ref id="open-hook"
-+name="open-hook"> command.
-+
-+The <em/command/ should <bf/not/ remove the decompressed file. The
-+<em/command/ should return non-zero exit status if it fails, so mutt
-+knows something's wrong.
-+
-+Example:
-+
-+<tscreen><verb>
-+close-hook \\.gz$ "gzip -c %t &gt; %f"
-+</verb></tscreen>
-+
-+If the <em/command/ is empty, this operation is disabled for this file
-+type, and the file can only be open in the read-only mode.
-+
-+<ref id="close-hook" name ="close-hook"> is not called when you exit
-+from the folder if the folder was not changed.
-+
-+<sect2>Append a message to a compressed mailbox<label id="append-hook">
-+<p>
-+Usage: <tt/append-hook/ <em/regexp/ &dquot;<em/command/&dquot;
-+
-+This command is used for saving to an existing compressed folder.
-+The <em/command/ is the command that can be used for appending to the
-+folders whose names match <em/regexp/. It has the same format as in 
-+ the <ref id="open-hook" name="open-hook"> command.
-+The temporary folder in this case contains the messages that are being
-+appended. 
-+
-+The <em/command/ should <bf/not/ remove the decompressed file. The
-+<em/command/ should return non-zero exit status if it fails, so mutt
-+knows something's wrong.
-+
-+Example:
-+
-+<tscreen><verb>
-+append-hook \\.gz$ "gzip -c %t &gt;&gt; %f" 
-+</verb></tscreen>
-+
-+When <ref id="append-hook" name="append-hook"> 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 (<ref id="mbox_type"
-+name="&dollar;mbox&lowbar;type">) type is always supposed (i.e.
-+this is the format used for the temporary folder).
-+
-+If the file does not exist when you save to it, <ref id="close-hook"
-+name="close-hook"> is called, and not <ref id="append-hook"
-+name="append-hook">. <ref id="append-hook" name="append-hook"> is only
-+for appending to existing folders.
-+
-+If the <em/command/ is empty, this operation is disabled for this file
-+type. In this case, the folder will be open and closed again (using
-+<ref id="open-hook" name="open-hook"> and <ref id="close-hook" 
-+name="close-hook">respectively) each time you will add to it.
-+
-+<sect2>Encrypted folders
-+<p>
-+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:
-+
-+<tscreen><verb>
-+open-hook  \\.pgp$ "pgp -f &lt; %f &gt; %t"
-+close-hook \\.pgp$ "pgp -fe YourPgpUserIdOrKeyId &lt; %t &gt; %f"
-+</verb></tscreen>
-+
-+Please note, that PGP does not support appending to an encrypted
-+folder, so there is no append-hook defined.
-+
-+If you are using GnuPG instead of PGP, you may use the following hooks
-+instead:
-+
-+<tscreen><verb>
-+open-hook  \\.gpg$ "gpg --decrypt &lt; %f &gt; %t"
-+close-hook \\.gpg$ "gpg --encrypt --recipient YourGpgUserIdOrKeyId &lt; %t &gt; %f"
-+</verb></tscreen>
-+
-+<bf/Note:/ 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.
-+
- <sect>Mutt's MIME Support
- <p>
- Quite a bit of effort has been made to make Mutt the premier text-mode
-@@ -2869,12 +3039,16 @@
- <item>
- <tt><ref id="alternative_order" name="alternative&lowbar;order"></tt> <em/mimetype/ &lsqb; <em/mimetype/ ... &rsqb;
- <item>
-+<tt><ref id="append-hook" name="append-hook"></tt> <em/regexp/ &dquot;<em/command/&dquot;
-+<item>
- <tt><ref id="auto_view" name="auto&lowbar;view"></tt> <em/mimetype/ &lsqb; <em/mimetype/ ... &rsqb;
- <item>
- <tt><ref id="bind" name="bind"></tt> <em/map/ <em/key/ <em/function/
- <item>
- <tt><ref id="charset-hook" name="charset-hook"></tt> <em/alias/ <em/charset/
- <item>
-+<tt><ref id="close-hook" name="close-hook"></tt> <em/regexp/ &dquot;<em/command/&dquot;
-+<item>
- <tt><ref id="color" name="color"></tt> <em/object/ <em/foreground/ <em/background/ &lsqb; <em/regexp/ &rsqb;
- <item>
- <tt><ref id="color" name="uncolor"></tt> <em/index/ <em/pattern/ &lsqb; <em/pattern/ ... &rsqb;
-@@ -2917,6 +3091,8 @@
- <item>
- <tt><ref id="my_hdr" name="unmy&lowbar;hdr"></tt> <em/field/ &lsqb; <em/field/ ... &rsqb;
- <item>
-+<tt><ref id="open-hook" name="open-hook"></tt> <em/regexp/ &dquot;<em/command/&dquot;
-+<item>
- <tt><ref id="pgp-hook" name="pgp-hook"></tt> <em/pattern/ <em/key-id/
- <item>
- <tt><ref id="push" name="push"></tt> <em/string/
-diff -Nur mutt-1.3.27.orig/doc/manual.txt mutt-1.3.27/doc/manual.txt
---- mutt-1.3.27.orig/doc/manual.txt    Tue Jan  1 21:18:08 2002
-+++ mutt-1.3.27/doc/manual.txt Fri Feb  1 22:51:32 2002
-@@ -78,6 +78,11 @@
-         4.11.2 Authentication
-      4.12 Managing multiple IMAP/POP accounts (OPTIONAL)
-      4.13 Start a WWW Browser on URLs (EXTERNAL)
-+     4.14 Compressed folders Support (OPTIONAL)
-+        4.14.1 Open a compressed mailbox for reading
-+        4.14.2 Write a compressed mailbox
-+        4.14.3 Append a message to a compressed mailbox
-+        4.14.4 Encrypted folders
-   5. Mutt's MIME Support
-      5.1 Using MIME in Mutt
-@@ -2554,6 +2559,156 @@
-        macro index \cb |urlview\n
-        macro pager \cb |urlview\n
-+  4\b4.\b.1\b14\b4.\b.  C\bCo\bom\bmp\bpr\bre\bes\bss\bse\bed\bd f\bfo\bol\bld\bde\ber\brs\bs S\bSu\bup\bpp\bpo\bor\brt\bt (\b(O\bOP\bPT\bTI\bIO\bON\bNA\bAL\bL)\b)
-+
-+  If Mutt was compiled with compressed folders support (by running the
-+  _\bc_\bo_\bn_\bf_\bi_\bg_\bu_\br_\be script with the _\b-_\b-_\be_\bn_\ba_\bb_\bl_\be_\b-_\bc_\bo_\bm_\bp_\br_\be_\bs_\bs_\be_\bd 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.
-+
-+  The most common use is to open compressed archived folders e.g. with
-+  gzip.
-+
-+  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.
-+
-+  There are three hooks defined (``open-hook'', ``close-hook'' and
-+  ``append-hook'') which define commands to uncompress and compress a
-+  folder and to append messages to an existing compressed folder
-+  respectively.
-+
-+  For example:
-+
-+       open-hook \\.gz$ "gzip -cd %f > %t"
-+       close-hook \\.gz$ "gzip -c %t > %f"
-+       append-hook \\.gz$ "gzip -c %t >> %f"
-+
-+  You do not have to specify all of the commands. If you omit ``append-
-+  hook'', the folder will be open and closed again each time you will
-+  add to it. If you omit ``close-hook'' (or give empty command) , the
-+  folder will be open in the  mode. If you specify ``append-hook''
-+  though you'll be able to append to the folder.
-+
-+  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 ``$save_empty'', so
-+  that the compressed file will be removed if you delete all of the
-+  messages.
-+
-+  4\b4.\b.1\b14\b4.\b.1\b1.\b.  O\bOp\bpe\ben\bn a\ba c\bco\bom\bmp\bpr\bre\bes\bss\bse\bed\bd m\bma\bai\bil\blb\bbo\box\bx f\bfo\bor\br r\bre\bea\bad\bdi\bin\bng\bg
-+
-+  Usage: open-hook _\br_\be_\bg_\be_\bx_\bp "_\bc_\bo_\bm_\bm_\ba_\bn_\bd"
-+
-+  The _\bc_\bo_\bm_\bm_\ba_\bn_\bd is the command that can be used for opening the folders
-+  whose names match _\br_\be_\bg_\be_\bx_\bp.
-+
-+  The _\bc_\bo_\bm_\bm_\ba_\bn_\bd 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.
-+
-+  %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.
-+
-+  The _\bc_\bo_\bm_\bm_\ba_\bn_\bd should n\bno\bot\bt remove the original compressed file.  The
-+  _\bc_\bo_\bm_\bm_\ba_\bn_\bd should return non-zero exit status if it fails, so mutt knows
-+  something's wrong.
-+
-+  Example:
-+
-+       open-hook \\.gz$ "gzip -cd %f > %t"
-+
-+  If the _\bc_\bo_\bm_\bm_\ba_\bn_\bd is empty, this operation is disabled for this file
-+  type.
-+
-+  4\b4.\b.1\b14\b4.\b.2\b2.\b.  W\bWr\bri\bit\bte\be a\ba c\bco\bom\bmp\bpr\bre\bes\bss\bse\bed\bd m\bma\bai\bil\blb\bbo\box\bx
-+
-+  Usage: close-hook _\br_\be_\bg_\be_\bx_\bp "_\bc_\bo_\bm_\bm_\ba_\bn_\bd"
-+
-+  This is used to close the folder that was open with the ``open-hook''
-+  command after some changes were made to it.
-+
-+  The _\bc_\bo_\bm_\bm_\ba_\bn_\bd string is the command that can be used for closing the
-+  folders whose names match _\br_\be_\bg_\be_\bx_\bp. It has the same format as in the
-+  ``open-hook'' command. Temporary folder in this case is the folder
-+  previously produced by the ``open-hook'' command.
-+
-+  The _\bc_\bo_\bm_\bm_\ba_\bn_\bd should n\bno\bot\bt remove the decompressed file. The _\bc_\bo_\bm_\bm_\ba_\bn_\bd
-+  should return non-zero exit status if it fails, so mutt knows
-+  something's wrong.
-+
-+  Example:
-+
-+       close-hook \\.gz$ "gzip -c %t > %f"
-+
-+  If the _\bc_\bo_\bm_\bm_\ba_\bn_\bd is empty, this operation is disabled for this file
-+  type, and the file can only be open in the read-only mode.
-+
-+  ``close-hook'' is not called when you exit from the folder if the
-+  folder was not changed.
-+
-+  4\b4.\b.1\b14\b4.\b.3\b3.\b.  A\bAp\bpp\bpe\ben\bnd\bd a\ba m\bme\bes\bss\bsa\bag\bge\be t\bto\bo a\ba c\bco\bom\bmp\bpr\bre\bes\bss\bse\bed\bd m\bma\bai\bil\blb\bbo\box\bx
-+
-+  Usage: append-hook _\br_\be_\bg_\be_\bx_\bp "_\bc_\bo_\bm_\bm_\ba_\bn_\bd"
-+
-+  This command is used for saving to an existing compressed folder.  The
-+  _\bc_\bo_\bm_\bm_\ba_\bn_\bd is the command that can be used for appending to the folders
-+  whose names match _\br_\be_\bg_\be_\bx_\bp. It has the same format as in the ``open-
-+  hook'' command.  The temporary folder in this case contains the
-+  messages that are being appended.
-+
-+  The _\bc_\bo_\bm_\bm_\ba_\bn_\bd should n\bno\bot\bt remove the decompressed file. The _\bc_\bo_\bm_\bm_\ba_\bn_\bd
-+  should return non-zero exit status if it fails, so mutt knows
-+  something's wrong.
-+
-+  Example:
-+
-+       append-hook \\.gz$ "gzip -c %t >> %f"
-+
-+  When ``append-hook'' 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 (``$mbox_type'') type is always supposed (i.e.  this
-+  is the format used for the temporary folder).
-+
-+  If the file does not exist when you save to it, ``close-hook'' is
-+  called, and not ``append-hook''. ``append-hook'' is only for appending
-+  to existing folders.
-+
-+  If the _\bc_\bo_\bm_\bm_\ba_\bn_\bd is empty, this operation is disabled for this file
-+  type. In this case, the folder will be open and closed again (using
-+  ``open-hook'' and ``close-hook''respectively) each time you will add
-+  to it.
-+
-+  4\b4.\b.1\b14\b4.\b.4\b4.\b.  E\bEn\bnc\bcr\bry\byp\bpt\bte\bed\bd f\bfo\bol\bld\bde\ber\brs\bs
-+
-+  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:
-+
-+       open-hook  \\.pgp$ "pgp -f < %f > %t"
-+       close-hook \\.pgp$ "pgp -fe YourPgpUserIdOrKeyId < %t > %f"
-+
-+  Please note, that PGP does not support appending to an encrypted
-+  folder, so there is no append-hook defined.
-+
-+  If you are using GnuPG instead of PGP, you may use the following hooks
-+  instead:
-+
-+       open-hook  \\.gpg$ "gpg --decrypt < %f > %t"
-+       close-hook \\.gpg$ "gpg --encrypt --recipient YourGpgUserIdOrKeyId < %t > %f"
-+
-+  N\bNo\bot\bte\be:\b: 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.
-+
-   5\b5.\b.  M\bMu\but\btt\bt'\b's\bs M\bMI\bIM\bME\bE S\bSu\bup\bpp\bpo\bor\brt\bt
-   Quite a bit of effort has been made to make Mutt the premier text-mode
-@@ -3148,6 +3303,8 @@
-   ·  ``unmy_hdr'' _\bf_\bi_\be_\bl_\bd [ _\bf_\bi_\be_\bl_\bd ... ]
-+  ·  ``open-hook'' _\br_\be_\bg_\be_\bx_\bp "_\bc_\bo_\bm_\bm_\ba_\bn_\bd"
-+
-   ·  ``pgp-hook'' _\bp_\ba_\bt_\bt_\be_\br_\bn _\bk_\be_\by_\b-_\bi_\bd
-   ·  ``push'' _\bs_\bt_\br_\bi_\bn_\bg
-diff -Nur mutt-1.3.27.orig/doc/muttrc.man mutt-1.3.27/doc/muttrc.man
---- mutt-1.3.27.orig/doc/muttrc.man    Fri Dec 28 18:14:28 2001
-+++ mutt-1.3.27/doc/muttrc.man Fri Feb  1 22:51:32 2002
-@@ -258,6 +258,24 @@
- The pgp-hook command provides a method by which you can
- specify the ID of the public key to be used when encrypting messages
- to a certain recipient.
-+.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 -Nur mutt-1.3.27.orig/doc/muttrc.man.head mutt-1.3.27/doc/muttrc.man.head
---- mutt-1.3.27.orig/doc/muttrc.man.head       Wed Jan 23 00:42:01 2002
-+++ mutt-1.3.27/doc/muttrc.man.head    Fri Feb  1 22:51:32 2002
-@@ -258,6 +258,24 @@
- The pgp-hook command provides a method by which you can
- specify the ID of the public key to be used when encrypting messages
- to a certain recipient.
-+.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 -Nur mutt-1.3.27.orig/hook.c mutt-1.3.27/hook.c
---- mutt-1.3.27.orig/hook.c    Fri Jun 29 12:05:50 2001
-+++ mutt-1.3.27/hook.c Fri Feb  1 22:51:32 2002
-@@ -19,6 +19,10 @@
- #include "mutt.h"
- #include "mailbox.h"
-+#ifdef USE_COMPRESSED
-+#include "compress.h"
-+#endif
-+
- #include <limits.h>
- #include <string.h>
- #include <stdlib.h>
-@@ -87,6 +91,16 @@
-     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_FOLDERHOOK | M_MBOXHOOK | M_SENDHOOK |
-                                  M_FCCHOOK | M_SAVEHOOK | M_MESSAGEHOOK)))
-   {
-diff -Nur 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 Fri Feb  1 22:51:32 2002
-@@ -2447,6 +2447,11 @@
-   { "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
-   { "hdr_order",      parse_list,             UL &HeaderOrderList },
-   { "iconv-hook",     mutt_parse_hook,        M_ICONVHOOK }, 
-   { "ignore",         parse_ignore,           0 },
-diff -Nur mutt-1.3.27.orig/main.c mutt-1.3.27/main.c
---- mutt-1.3.27.orig/main.c    Wed Nov  7 11:40:26 2001
-+++ mutt-1.3.27/main.c Fri Feb  1 22:51:32 2002
-@@ -328,6 +328,12 @@
- #else
-       "-LOCALES_HACK  "
- #endif
-+
-+#ifdef USE_COMPRESSED
-+      "+COMPRESSED  "
-+#else
-+      "-COMPRESSED  "
-+#endif
-             
- #ifdef HAVE_WC_FUNCS
-       "+HAVE_WC_FUNCS  "
-diff -Nur mutt-1.3.27.orig/mbox.c mutt-1.3.27/mbox.c
---- mutt-1.3.27.orig/mbox.c    Wed Oct 31 10:40:05 2001
-+++ mutt-1.3.27/mbox.c Fri Feb  1 22:51:32 2002
-@@ -28,6 +28,10 @@
- #include "sort.h"
- #include "copy.h"
-+#ifdef USE_COMPRESSED
-+#include "compress.h"
-+#endif
-+
- #include <sys/stat.h>
- #include <dirent.h>
- #include <string.h>
-@@ -1045,6 +1049,12 @@
- 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 -Nur mutt-1.3.27.orig/mutt.h mutt-1.3.27/mutt.h
---- mutt-1.3.27.orig/mutt.h    Wed Jan 23 00:42:01 2002
-+++ mutt-1.3.27/mutt.h Fri Feb  1 22:51:32 2002
-@@ -143,6 +143,11 @@
- #define M_PGPHOOK     (1<<8)
- #endif
- #define M_ACCOUNTHOOK (1<<9)
-+#ifdef USE_COMPRESSED
-+#define M_OPENHOOK    (1<<10)
-+#define M_APPENDHOOK  (1<<11)
-+#define M_CLOSEHOOK   (1<<12)
-+#endif
- /* tree characters for linearize_tree and print_enriched_string */
- #define M_TREE_LLCORNER               1
-@@ -745,6 +750,11 @@
-   void *data;                 /* driver specific data */
- #endif /* USE_IMAP */
-+#ifdef USE_COMPRESSED
-+  void *compressinfo;         /* compressed mbox module private data */
-+  char *realpath;             /* path to compressed mailbox */
-+#endif /* USE_COMPRESSED */
-+
-   short magic;                        /* mailbox type */
-   unsigned int locked : 1;    /* is the mailbox locked? */
-diff -Nur mutt-1.3.27.orig/mx.c mutt-1.3.27/mx.c
---- mutt-1.3.27.orig/mx.c      Wed Jan 23 00:42:01 2002
-+++ mutt-1.3.27/mx.c   Fri Feb  1 22:51:32 2002
-@@ -26,6 +26,10 @@
- #include "keymap.h"
- #include "url.h"
-+#ifdef USE_COMPRESSED
-+#include "compress.h"
-+#endif
-+
- #ifdef HAVE_PGP
- #include "pgp.h"
- #endif
-@@ -448,6 +452,10 @@
-     return (-1);
-   }
-+#ifdef USE_COMPRESSED
-+  if (magic == 0 && mutt_can_read_compressed (path))
-+    return M_COMPRESSED;
-+#endif
-   return (magic);
- }
-@@ -489,6 +497,13 @@
- {
-   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
-@@ -649,7 +664,12 @@
-   }
-   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);
-@@ -755,6 +775,10 @@
-     mutt_free_header (&ctx->hdrs[i]);
-   safe_free ((void **) &ctx->hdrs);
-   safe_free ((void **) &ctx->v2r);
-+#ifdef USE_COMPRESSED
-+  if (ctx->compressinfo)
-+    mutt_fast_close_compressed (ctx);
-+#endif
-   safe_free ((void **) &ctx->path);
-   safe_free ((void **) &ctx->pattern);
-   if (ctx->limit_pattern) 
-@@ -812,6 +836,12 @@
-   if (tmp && tmp->new == 0)
-     mutt_update_mailbox (tmp);
- #endif
-+
-+#ifdef USE_COMPRESSED
-+  if (rc == 0 && ctx->compressinfo)
-+    return mutt_sync_compressed (ctx);
-+#endif
-+
-   return rc;
- }
-@@ -1018,6 +1048,11 @@
-       !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;
-@@ -1325,6 +1360,11 @@
- {
-   int rc;
-+#ifdef USE_COMPRESSED
-+  if (ctx->compressinfo)
-+    return mutt_check_mailbox_compressed (ctx);
-+#endif
-+
-   if (ctx)
-   {
-     if (ctx->locked) lock = 0;
-diff -Nur mutt-1.3.27.orig/mx.h mutt-1.3.27/mx.h
---- mutt-1.3.27.orig/mx.h      Wed Oct 31 10:40:05 2001
-+++ mutt-1.3.27/mx.h   Fri Feb  1 22:51:32 2002
-@@ -41,6 +41,9 @@
- #ifdef USE_POP
-   , M_POP
- #endif
-+#ifdef USE_COMPRESSED
-+  , M_COMPRESSED
-+#endif
- };
- WHERE short DefaultMagic INITVAL (M_MBOX);
-diff -Nur mutt-1.3.27.orig/po/POTFILES.in mutt-1.3.27/po/POTFILES.in
---- mutt-1.3.27.orig/po/POTFILES.in    Tue Oct 10 21:18:37 2000
-+++ mutt-1.3.27/po/POTFILES.in Fri Feb  1 22:51:32 2002
-@@ -8,6 +8,7 @@
- color.c
- commands.c
- compose.c
-+compress.c
- curs_lib.c
- curs_main.c
- edit.c
-diff -Nur mutt-1.3.27.orig/po/de.po mutt-1.3.27/po/de.po
---- mutt-1.3.27.orig/po/de.po  Wed Jan 23 00:43:05 2002
-+++ mutt-1.3.27/po/de.po       Fri Feb  1 22:51:32 2002
-@@ -654,6 +654,48 @@
- msgid "Message written."
- msgstr "Nachricht geschrieben."
-+#: compress.c:203 mbox.c:661
-+msgid "Mailbox was corrupted!"
-+msgstr "Mailbox wurde zerstört!"
-+
-+#: compress.c:228 compress.c:253
-+#, c-format
-+msgid "Decompressing %s...\n"
-+msgstr "Entpacke %s...\n"
-+
-+#: compress.c:246 compress.c:367 compress.c:443 mbox.c:706
-+msgid "Unable to lock mailbox!"
-+msgstr "Kann Mailbox nicht für exklusiven Zugriff sperren!"
-+
-+#: compress.c:264
-+#, c-format
-+msgid "Error executing: %s : unable to open the mailbox!\n"
-+msgstr "Fehler beim Ausführen von %s : Kann die Mailbox nicht öffnen!\n"
-+
-+#: compress.c:350 compress.c:377 compress.c:423 compress.c:454
-+#, c-format
-+msgid "Compressing %s...\n"
-+msgstr "Komprimiere %s...\n"
-+
-+#: compress.c:381
-+#, c-format
-+msgid ""
-+"%s: Error compressing mailbox! Original mailbox deleted, uncompressed one "
-+"kept!\n"
-+msgstr ""
-+"%s: Fehler beim Komprimieren der Mailbox! Ursprüngliche Mailbox gelöscht, "
-+"entpackte gespeichert!\n"
-+
-+#: compress.c:425 compress.c:456
-+#, c-format
-+msgid "Compressed-appending to %s...\n"
-+msgstr "Hänge komprimiert an %s... an\n"
-+
-+#: compress.c:461
-+#, c-format
-+msgid " %s: Error compressing mailbox!  Uncompressed one kept!\n"
-+msgstr " %s: Fehler beim packen der Mailbox! Entpackte Mailbox gespeichert!\n"
-+
- #: curs_lib.c:153
- msgid "yes"
- msgstr "ja"
-@@ -1137,6 +1179,10 @@
- msgid "Help for %s"
- msgstr "Hilfe für %s"
-+#: hook.c:96
-+msgid "bad formatted command string"
-+msgstr "Hook enthält nicht die Muster %f und %t"
-+
- #: hook.c:240
- msgid "unhook: Can't do unhook * from within a hook."
- msgstr "unhook: Innerhalb eines hook kann kein unhook * aufgerufen werden."
-@@ -2459,18 +2505,10 @@
- msgid "Mailbox is corrupt!"
- msgstr "Mailbox fehlerhaft!"
--#: mbox.c:665
--msgid "Mailbox was corrupted!"
--msgstr "Mailbox wurde zerstört!"
--
- #: mbox.c:702 mbox.c:978
- msgid "Fatal error!  Could not reopen mailbox!"
- msgstr "Fataler Fehler, konnte Mailbox nicht erneut öffnen!"
--#: mbox.c:711
--msgid "Unable to lock mailbox!"
--msgstr "Kann Mailbox nicht für exklusiven Zugriff sperren!"
--
- #. this means ctx->changed or ctx->deleted was set, but no
- #. * messages were found to be changed or deleted.  This should
- #. * never happen, is we presume it is a bug in mutt.
-diff -Nur mutt-1.3.27.orig/status.c mutt-1.3.27/status.c
---- mutt-1.3.27.orig/status.c  Fri Mar  3 11:10:14 2000
-+++ mutt-1.3.27/status.c       Fri Feb  1 22:51:32 2002
-@@ -93,6 +93,14 @@
-     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);
-+      }
-+      else
-+#endif
-       if (Context && Context->path)
-       {
-       strfcpy (tmp, Context->path, sizeof (tmp));
---- mutt-1.3.99/doc/manual-4.html~     Tue May 21 22:14:04 2002
-+++ mutt-1.3.99/doc/manual-4.html      Tue May 21 22:15:56 2002
-@@ -815,7 +815,57 @@
- </CODE></BLOCKQUOTE>
- </P>
--<HR>
-+<H2><A NAME="ss4.14">4.14 Compressed folders Support (OPTIONAL)</A>
-+</H2>
-+
-+
-+<P>If Mutt was compiled with compressed folders support (by running the
-+<EM>configure</EM> script with the <EM>--enable-compressed</EM> 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.</P>
-+<P>The most common use is to open compressed archived folders e.g. with
-+gzip.</P>
-+<P>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.</P>
-+<P>There are three hooks defined (
-+<A HREF="#open-hook">open-hook</A>,
-+<A HREF="#close-hook">close-hook</A> and 
-+<A HREF="#append-hook">append-hook</A>) which define commands to uncompress and compress
-+a folder and to append messages to an existing compressed folder 
-+respectively.</P>
-+<P>For example:</P>
-+<P>
-+<BLOCKQUOTE><CODE>
-+<PRE>
-+open-hook \\.gz$ "gzip -cd %f &gt; %t" 
-+close-hook \\.gz$ "gzip -c %t &gt; %f"
-+append-hook \\.gz$ "gzip -c %t &gt;&gt; %f" 
-+</PRE>
-+</CODE></BLOCKQUOTE>
-+</P>
-+<P>You do not have to specify all of the commands. If you omit 
-+<A HREF="#append-hook">append-hook</A>, the folder will be open and
-+closed again each time you will add to it. If you omit 
-+<A HREF="#close-hook">close-hook</A> (or give empty command) , the
-+folder will be open in the  mode. If you specify 
-+<A HREF="#append-hook">append-hook</A> though you'll be able to append
-+to the folder.</P>
-+<P>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
-+&quot;.&quot; as a regexp. But this may be surprising if your
-+compressing script produces empty files. In this situation, unset 
-+<A HREF="manual-6.html#save_empty">$save_empty</A>, so that the compressed file
-+will be removed if you delete all of the messages.</P>
-+
-+<H3><A NAME="open-hook"></A> Open a compressed mailbox for reading</H3>
-+
-+<P>Usage: <CODE>open-hook</CODE> <EM>regexp</EM> &quot;<EM>command</EM>&quot;</P><HR>
-+
- <A HREF="manual-5.html">Next</A>
- <A HREF="manual-3.html">Previous</A>
- <A HREF="manual.html#toc4">Contents</A>
diff --git a/mutt-xface.patch b/mutt-xface.patch
deleted file mode 100644 (file)
index e23eb78..0000000
+++ /dev/null
@@ -1,548 +0,0 @@
-diff -ruN mutt-1.4./README.xface mutt-1.4/README.xface
---- 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 -ruN mutt-1.4./globals.h mutt-1.4/globals.h
---- mutt-1.4./globals.h        Mon Jan 20 00:17:02 2003
-+++ mutt-1.4/globals.h Mon Jan 20 00:28:31 2003
-@@ -177,6 +177,8 @@
- WHERE ALIAS *Aliases INITVAL (0);
- WHERE LIST *UserHeader INITVAL (0);
-+WHERE int slrnface_fd INITVAL (-1);
-+
- #ifdef DEBUG
- WHERE FILE *debugfile INITVAL (0);
- WHERE int debuglevel INITVAL (0);
-diff -ruN mutt-1.4./init.c mutt-1.4/init.c
---- mutt-1.4./init.c   Mon Jan 20 00:17:02 2003
-+++ mutt-1.4/init.c    Mon Jan 20 00:28:31 2003
-@@ -47,6 +47,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)
-@@ -1971,3 +1973,131 @@
-       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 -ruN mutt-1.4./init.h mutt-1.4/init.h
---- mutt-1.4./init.h   Mon Jan 20 00:17:02 2003
-+++ mutt-1.4/init.h    Mon Jan 20 00:28:31 2003
-@@ -2437,6 +2437,12 @@
-   ** 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 -ruN mutt-1.4./main.c mutt-1.4/main.c
---- mutt-1.4./main.c   Mon Jan 20 00:17:02 2003
-+++ mutt-1.4/main.c    Mon Jan 20 00:28:31 2003
-@@ -841,6 +841,8 @@
-     mutt_folder_hook (folder);
-+    mutt_start_slrnface();
-+
-     if((Context = mx_open_mailbox (folder, ((flags & M_RO) || option (OPTREADONLY)) ? M_READONLY : 0, NULL))
-        || !explicit_folder)
-     {
-@@ -849,6 +851,8 @@
-       safe_free ((void **)&Context);
-     }
-     mutt_endwin (Errorbuf);
-+
-+    mutt_stop_slrnface();
-   }
-   exit (0);
-diff -ruN mutt-1.4./mutt.h mutt-1.4/mutt.h
---- mutt-1.4./mutt.h   Mon Jan 20 00:17:02 2003
-+++ mutt-1.4/mutt.h    Mon Jan 20 00:28:31 2003
-@@ -422,6 +422,7 @@
-   OPTWRAP,
-   OPTWRAPSEARCH,
-   OPTWRITEBCC,                /* write out a bcc header? */
-+  OPTXFACE,
-   OPTXMAILER,
-   /* PGP options */
-@@ -540,6 +541,7 @@
-   char *x_label;
-   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 -ruN mutt-1.4./muttlib.c mutt-1.4/muttlib.c
---- mutt-1.4./muttlib.c        Mon Jan 20 00:17:02 2003
-+++ mutt-1.4/muttlib.c Mon Jan 20 00:28:31 2003
-@@ -650,6 +650,7 @@
-   safe_free ((void **) &(*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);
-   safe_free ((void **) p);
- }
-diff -ruN mutt-1.4./pager.c mutt-1.4/pager.c
---- mutt-1.4./pager.c  Mon Jan 20 00:17:02 2003
-+++ mutt-1.4/pager.c   Mon Jan 20 00:28:31 2003
-@@ -1431,6 +1431,66 @@
-   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 },
-@@ -1535,6 +1595,9 @@
-     snprintf (helpstr, sizeof (helpstr), "%s %s", tmphelp, buffer);
-   }
-+  if (IsHeader (extra))
-+    mutt_display_xface(extra->hdr);
-+
-   while (ch != -1)
-   {
-     mutt_curs_set (0);
-@@ -2035,7 +2098,9 @@
-       if (! InHelp)
-       {
-         InHelp = 1;
-+        mutt_suppress_xface ();
-         mutt_help (MENU_PAGER);
-+        mutt_show_xface ();
-         redraw = REDRAW_FULL;
-         InHelp = 0;
-       }
-@@ -2329,59 +2394,71 @@
-       case OP_MAIL:
-       CHECK_MODE(IsHeader (extra) && !IsAttach (extra));
-         CHECK_ATTACH;      
-+      mutt_suppress_xface ();
-       ci_send_message (0, NULL, NULL, NULL, 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));
-         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;
-@@ -2430,7 +2507,9 @@
-       break;
-       case OP_SHELL_ESCAPE:
-+      mutt_suppress_xface ();
-       mutt_shell_escape ();
-+      mutt_show_xface ();
-       MAYBE_REDRAW (redraw);
-       break;
-@@ -2573,5 +2652,6 @@
-   safe_free ((void **) &lineInfo);
-   if (index)
-     mutt_menuDestroy(&index);
-+  mutt_clear_xface ();
-   return (rc != -1 ? rc : 0);
- }
-diff -ruN mutt-1.4./parse.c mutt-1.4/parse.c
---- mutt-1.4./parse.c  Tue Jan 29 11:05:20 2002
-+++ mutt-1.4/parse.c   Mon Jan 20 00:28:32 2003
-@@ -90,6 +90,27 @@
-   /* 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;
-@@ -1207,6 +1228,11 @@
-       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 -ruN mutt-1.4./sendlib.c mutt-1.4/sendlib.c
---- mutt-1.4./sendlib.c        Sat Apr 20 09:25:49 2002
-+++ mutt-1.4/sendlib.c Mon Jan 20 00:28:32 2003
-@@ -1663,6 +1663,15 @@
-     fputc ('\n', 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))
-   {
-     /* Add a vanity header */
diff --git a/mutt.1.pl b/mutt.1.pl
deleted file mode 100644 (file)
index 9282562..0000000
--- a/mutt.1.pl
+++ /dev/null
@@ -1,197 +0,0 @@
-.\" -*-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.
diff --git a/mutt.desktop b/mutt.desktop
deleted file mode 100644 (file)
index 4278891..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-[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.png
-Exec=mutt
-Terminal=1
-Type=Application
-# vi: encoding=utf-8
diff --git a/mutt.png b/mutt.png
deleted file mode 100644 (file)
index 463d9d3..0000000
Binary files a/mutt.png and /dev/null differ
diff --git a/mutt.spec b/mutt.spec
deleted file mode 100644 (file)
index 2e682e1..0000000
--- a/mutt.spec
+++ /dev/null
@@ -1,201 +0,0 @@
-# conditionals:
-# --with slang:        use slang library instead of ncurses
-# --with nntp: use VVV's NNTP patch
-
-Summary:       The Mutt Mail User Agent
-Summary(de):   Der Mutt Mail-User-Agent
-Summary(es):   Mutt, cliente de correo electrónico
-Summary(fr):   Agent courrier Mutt
-Summary(pl):   Program pocztowy Mutt
-Summary(pt_BR):        Mutt, cliente de correio eletrônico
-Summary(ru):   ðÏÞÔÏ×ÁÑ ËÌÉÅÎÔÓËÁÑ ÐÒÏÇÒÁÍÍÁ Mutt
-Summary(tr):   Mutt elektronik posta programý
-Summary(uk):   ðÏÛÔÏ×Á Ë̦¤ÎÔÓØËÁ ÐÒÏÇÒÁÍÁ Mutt
-Name:          mutt
-Version:       1.4
-Release:       5.2
-Epoch:         5
-License:       GPL
-Group:         Applications/Mail
-Source0:       ftp://ftp.mutt.org/mutt/%{name}-%{version}i.tar.gz
-Source1:       %{name}.desktop
-Source2:       %{name}.png
-Source3:       %{name}.1.pl
-Patch0:                %{name}-home_etc.patch
-Patch1:                %{name}-forcedotlock.patch
-Patch2:                %{name}-muttbug-tmp.patch
-Patch3:                %{name}-rr.compressed.patch
-Patch4:                %{name}-cd.edit_threads.patch
-Patch5:                %{name}-bj.status-time.patch
-Patch6:                %{name}-devl.narrow_tree.patch
-Patch7:                %{name}-vvv.quote.gz
-Patch8:                %{name}-null_name.patch
-Patch9:                %{name}-cd.trash_folder.patch
-Patch10:       %{name}-cd.purge_message.patch
-Patch11:       %{name}-cd.signatures_menu.patch
-Patch12:       %{name}-folder_columns.patch
-Patch13:       %{name}-nr.tag_prefix_cond.patch
-Patch14:       %{name}-LIBOBJ.patch
-Patch15:       %{name}-pgp_hook.patch
-Patch16:       %{name}-manual.patch
-Patch17:       %{name}-send_charset.patch
-Patch18:       %{name}-xface.patch
-Patch19:       %{name}-sasl2.patch
-Patch20:       %{name}-nntp.patch
-URL:           http://www.mutt.org/
-BuildRequires: autoconf
-BuildRequires: automake
-%{!?_without_sasl:BuildRequires:       cyrus-sasl-devel >= 2.1.0}
-BuildRequires: gettext-devel
-%{!?_with_slang:BuildRequires:         ncurses-devel >= 5.0}
-BuildRequires: openssl-devel >= 0.9.7
-BuildRequires: sgml-tools
-%{?_with_slang:BuildRequires:          slang-devel}
-Requires:      iconv
-Requires:      mailcap
-Requires:      smtpdaemon
-BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%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
-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
-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
-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 pl
-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
-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
-Mutt - ÜÔÏ ÎÅÂÏÌØÛÏÊ, ÎÏ ÍÏÝÎÙÊ ÐÏÌÎÏÜËÒÁÎÎÙÊ ÐÏÞÔÏ×ÙÊ ËÌÉÅÎÔ.
-÷ËÌÀÞÁÅÔ ÐÏÄÄÅÒÖËÕ MIME, Ã×ÅÔ, ÐÏÄÄÅÒÖËÕ POP3 É IMAP, ÇÒÕÐÐÉÒÏ×ËÕ
-ÓÏÏÂÝÅÎÉÊ ÐÏ ÃÅÐÏÞËÁÍ, ÐÅÒÅÏÐÒÅÄÅÌÑÅÍÙÅ ËÌÁ×ÉÛÉ, ÐÏÄÄÅÒÖËÕ pgp/gpg É
-ÓÏÒÔÉÒÏ×ËÕ ÓÏÏÂÝÅÎÉÊ × ÃÅÐÏÞËÁÈ. ÷ËÌÀÞÁÅÔ ÔÁËÖÅ (ÐÏËÁ ÞÔÏ
-ÜËÓÐÅÒÉÍÅÎÔÁÌØÎÕÀ) ÐÏÄÄÅÒÖËÕ NNTP.
-
-%description -l tr
-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
-Mutt - ÃÅ ÎÅ×ÅÌÉËÉÊ, ÁÌÅ ÐÏÔÕÖÎÉÊ ÐÏ×ÎÏÅËÒÁÎÎÉÊ ÐÏÛÔÏ×ÉÊ Ë̦¤ÎÔ.
-í¦ÓÔÉÔؠЦÄÔÒÉÍËÕ MIME, ËÏ̦Ò, Ð¦ÄÔÒÉÍËÕ POP3 ÔÁ IMAP, ÇÒÕÐÕ×ÁÎÎÑ
-ÐÏצÄÏÍÌÅÎØ ÐÏ ÌÁÎÃÀÖËÁÍ, ÐÅÒÅ×ÉÚÎÁÞÅÎÎÑ ËÌÁצÛ, Ð¦ÄÔÒÉÍËÕ pgp/gpg ÔÁ
-ÓÏÒÔÕ×ÁÎÎÑ ÐÏצÄÏÍÌÅÎØ Õ ÌÁÎÃÀÖËÁÈ. í¦ÓÔÉÔØ ÔÁËÏÖ (ÐÏËÉ ÝÏ
-ÅËÓÐÅÒÉÍÅÎÔÁÌØÎÕ) Ð¦ÄÔÒÉÍËÕ NNTP.
-
-%prep
-%setup -q -n %{name}-%(echo %{version} | sed 's/i$//')
-%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 -p0
-%patch14 -p1
-%patch15 -p1
-%patch16 -p1
-%patch18 -p1
-%{!?_without_sasl:%patch19 -p1}
-%{?_with_nntp:%patch20 -p1}
-
-%build
-%{__aclocal} -I m4
-%{__autoconf}
-%{__automake}
-%configure \
-       %{!?debug:--disable-debug} %{?debug:--enable-debug} \
-       %{!?_with_slang:--with-curses} \
-       %{?_with_slang:--with-slang} \
-       --enable-compressed \
-       --enable-external-dotlock \
-       --enable-imap \
-       --without-included-gettext \
-       --enable-mailtool \
-       --with-mixmaster \
-       --enable-pop \
-       %{?_with_nntp:--enable-nntp} \
-       --with-regex \
-       %{!?_without_sasl:--with-sasl} %{?_without_sasl:--without-sasl} \
-       --with-ssl \
-       --disable-warnings \
-       --with-docdir=%{_docdir}/%{name}-%{version} \
-       --with-homespool=Maildir \
-       --with-mailpath=/var/mail \
-       --with-sharedir=%{_datadir} \
-       --prefix=%{_prefix} \
-       --bindir=%{_bindir} \
-       --datadir=%{_datadir} \
-       --mandir=%{_mandir} \
-       --sysconfdir=%{_sysconfdir}
-
-%{__make}
-%{__make} manual.txt -C doc
-
-%install
-rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_applnkdir}/Network/Mail,%{_pixmapsdir}} \
-       $RPM_BUILD_ROOT%{_mandir}/pl/man1
-
-%{__make} install DESTDIR=$RPM_BUILD_ROOT
-
-%{__patch} -p0 -d $RPM_BUILD_ROOT%{_sysconfdir} < %PATCH17
-
-install %{SOURCE1} $RPM_BUILD_ROOT%{_applnkdir}/Network/Mail
-install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
-install %{SOURCE3} $RPM_BUILD_ROOT%{_mandir}/pl/man1
-
-# 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 doc/manual.txt README.xface
-%config(noreplace,missingok) %verify(not md5 size mtime) %{_sysconfdir}/Muttrc
-%attr(755,root,root) %{_bindir}/mutt
-%attr(755,root,root) %{_bindir}/flea
-%attr(755,root,root) %{_bindir}/muttbug
-%attr(755,root,root) %{_bindir}/pgp*
-%attr(2755,root,mail) %{_bindir}/mutt_dotlock
-
-%{_applnkdir}/Network/Mail/mutt.desktop
-%{_pixmapsdir}/mutt.png
-%{_mandir}/man*/*
-%lang(pl) %{_mandir}/pl/man*/*
This page took 0.411164 seconds and 4 git commands to generate.