]> git.pld-linux.org Git - packages/mutt.git/blobdiff - mutt-rr.compressed.patch
- patch fixing new message count for Courier-IMAP folders (http://dev.mutt.org/trac...
[packages/mutt.git] / mutt-rr.compressed.patch
index 60ab97457876ce2d0ea24cef658c24adf3d51482..aa660d33f6a90267feca43ce698f4d0048a4b713 100644 (file)
@@ -1,93 +1,42 @@
-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 @@
+diff -udprP mutt-1.5.16.orig/Makefile.am mutt-1.5.16/Makefile.am
+--- mutt-1.5.16.orig/Makefile.am       2007-06-04 07:20:01.000000000 +0300
++++ mutt-1.5.16/Makefile.am    2007-06-12 14:22:35.000000000 +0300
+@@ -18,6 +18,7 @@ BUILT_SOURCES = keymap_defs.h patchlist.
  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 
++      compress.c \
+       crypt.c cryptglue.c \
+       commands.c complete.c compose.c copy.c curs_lib.c curs_main.c date.c \
+       edit.c enter.c flags.c init.c filter.c from.c \
+@@ -67,6 +68,7 @@ EXTRA_mutt_SOURCES = account.c md5c.c mu
  
- 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 \
+ EXTRA_DIST = COPYRIGHT GPL OPS OPS.PGP OPS.CRYPT OPS.SMIME TODO UPDATING \
+       configure account.h \
++      compress.h \
+       attach.h buffy.h charset.h copy.h crypthash.h dotlock.h functions.h gen_defs \
+       globals.h hash.h history.h init.h keymap.h mutt_crypt.h \
        mailbox.h mapping.h md5.h mime.h mutt.h mutt_curses.h mutt_menu.h \
-       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 
+diff -udprP mutt-1.5.16.orig/Makefile.in mutt-1.5.16/Makefile.in
+--- mutt-1.5.16.orig/Makefile.in       2007-06-10 05:43:26.000000000 +0300
++++ mutt-1.5.16/Makefile.in    2007-06-12 14:22:35.000000000 +0300
+@@ -14,6 +14,10 @@
  
+ @SET_MAKE@
  
--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,11 @@
- 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"
++mutt_SOURCES += compress.c
++EXTRA_DIST += compress.h
++mutt_OBJECTS += compress.o
 +
- # 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,11 @@
- 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"
-+
- # 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,11 @@
- macro index   <f1> "!less @docdir@/manual.txt\n" "Show Mutt documentation"
- macro pager   <f1> "!less @docdir@/manual.txt\n" "Show Mutt documentation"
+ srcdir = @srcdir@
+ top_srcdir = @top_srcdir@
+diff -udprP mutt-1.5.16.orig/Muttrc.head mutt-1.5.16/Muttrc.head
+--- mutt-1.5.16.orig/Muttrc.head       2007-06-06 19:02:56.000000000 +0300
++++ mutt-1.5.16/Muttrc.head    2007-06-12 14:22:35.000000000 +0300
+@@ -24,6 +24,11 @@ macro generic,pager <F1> "<shell-escape>
+ macro index,pager y "<change-folder>?<toggle-mailboxes>" "show incoming mailboxes list"
+ bind browser y exit
  
 +# Use folders which match on \\.gz$ as gzipped folders:
 +# open-hook \\.gz$ "gzip -cd %f > %t"
@@ -97,15 +46,15 @@ diff -Nur mutt-1.3.27.orig/Muttrc.head.in mutt-1.3.27/Muttrc.head.in
  # 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
+diff -udprP mutt-1.5.16.orig/PATCHES mutt-1.5.16/PATCHES
+--- mutt-1.5.16.orig/PATCHES   2007-04-30 05:07:48.000000000 +0300
++++ mutt-1.5.16/PATCHES        2007-06-12 14:22:35.000000000 +0300
 @@ -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 @@
++rr.compressed
+diff -udprP mutt-1.5.16.orig/compress.c mutt-1.5.16/compress.c
+--- mutt-1.5.16.orig/compress.c        1970-01-01 03:00:00.000000000 +0300
++++ mutt-1.5.16/compress.c     2007-06-12 14:22:35.000000000 +0300
+@@ -0,0 +1,490 @@
 +/*
 + * Copyright (C) 1997 Alain Penders <Alain@Finale-Dev.com>
 + *
@@ -124,6 +73,10 @@ diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
 + *     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 + */
 +
++#if HAVE_CONFIG_H
++# include "config.h"
++#endif
++
 +#include "mutt.h"
 +
 +#ifdef USE_COMPRESSED
@@ -145,8 +98,9 @@ diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
 +  off_t size;         /* size of real folder */
 +} COMPRESS_INFO;
 +
++char echo_cmd[HUGE_STRING];
 +
-+/*
++/* parameters:
 + * ctx - context to lock
 + * excl - exclusive lock?
 + * retry - should retry if unable to lock?
@@ -193,16 +147,15 @@ diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
 +  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
++/* 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;
@@ -211,12 +164,12 @@ diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
 +    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_OPENHOOK, path) 
 +            && find_compress_hook (M_CLOSEHOOK, path))) ? 1 : 0;
 +}
 +
@@ -233,7 +186,7 @@ diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
 +  ci->close = find_compress_hook (M_CLOSEHOOK, ctx->path);
 +  return ci;
 +}
-+
++  
 +static void set_path (CONTEXT* ctx)
 +{
 +  char tmppath[_POSIX_PATH_MAX];
@@ -247,7 +200,7 @@ diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
 +  strcpy (ctx->path, tmppath);
 +}
 +
-+static int get_size (const char* path)
++static int get_size (const char* path) 
 +{
 +  struct stat sb;
 +  if (stat (path, &sb) != 0)
@@ -255,7 +208,7 @@ diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
 +  return (sb.st_size);
 +}
 +
-+static void store_size (CONTEXT* ctx)
++static void store_size (CONTEXT* ctx) 
 +{
 +  COMPRESS_INFO *ci = (COMPRESS_INFO *) ctx->compressinfo;
 +  ci->size = get_size (ctx->realpath);
@@ -263,12 +216,12 @@ diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
 +
 +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,
++                       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)
 +  {
@@ -284,8 +237,7 @@ diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
 +  return (src);
 +}
 +
-+/*
-+ * check that the command has both %f and %t
++/* check that the command has both %f and %t
 + * 0 means OK, -1 means error
 + */
 +int mutt_test_compress_command (const char* cmd)
@@ -296,7 +248,7 @@ diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
 +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,
++  mutt_FormatString (expanded, sizeof (expanded), 0, cmd, compresshook_format_str,
 +                   (unsigned long) ctx, 0);
 +  return safe_strdup (expanded);
 +}
@@ -306,8 +258,8 @@ diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
 +  COMPRESS_INFO *ci = (COMPRESS_INFO *) ctx->compressinfo;
 +  if (ci->size != get_size (ctx->realpath))
 +  {
-+    safe_free ((void**)&ctx->compressinfo);
-+    safe_free ((void**)&ctx->realpath);
++    FREE (&ctx->compressinfo);
++    FREE (&ctx->realpath);
 +    mutt_error _("Mailbox was corrupted!");
 +    return (-1);
 +  }
@@ -323,7 +275,7 @@ diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
 +  COMPRESS_INFO *ci = set_compress_info (ctx);
 +  if (!ci->open) {
 +    ctx->magic = 0;
-+    safe_free ((void**)ctx->compressinfo);
++    FREE (ctx->compressinfo);
 +    return (-1);
 +  }
 +  if (!ci->close || access (ctx->path, W_OK) != 0)
@@ -336,14 +288,14 @@ diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
 +    mutt_message (_("Decompressing %s..."), ctx->realpath);
 +
 +  cmd = get_compression_cmd (ci->open, ctx);
-+  if (cmd == NULL)
++  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);
++    FREE (&cmd);
 +    return (-1);
 +  }
 +  mutt_block_signals ();
@@ -352,13 +304,14 @@ diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
 +    fclose (fp);
 +    mutt_unblock_signals ();
 +    mutt_error _("Unable to lock mailbox!");
-+    safe_free ((void **)&cmd);
++    FREE (&cmd);
 +    return (-1);
 +  }
 +
 +  endwin ();
 +  fflush (stdout);
-+  fprintf (stderr, _("Decompressing %s...\n"),ctx->realpath);
++  sprintf(echo_cmd,_("echo Decompressing %s..."),ctx->realpath); 
++  mutt_system(echo_cmd);
 +  rc = mutt_system (cmd);
 +  mbox_unlock_compressed (ctx, fp);
 +  mutt_unblock_signals ();
@@ -368,11 +321,11 @@ diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
 +  {
 +    mutt_any_key_to_continue (NULL);
 +    ctx->magic = 0;
-+    safe_free ((void**)ctx->compressinfo);
++    FREE (ctx->compressinfo);
 +    mutt_error (_("Error executing: %s : unable to open the mailbox!\n"), cmd);
 +  }
-+  safe_free ((void **)&cmd);
-+  if (rc)
++  FREE (&cmd);
++  if (rc) 
 +    return (-1);
 +
 +  if (mutt_check_mailbox_compressed (ctx))
@@ -385,12 +338,12 @@ diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
 +
 +void restore_path (CONTEXT* ctx)
 +{
-+  safe_free ((void **)&ctx->path);
++  FREE (&ctx->path);
 +  ctx->path = ctx->realpath;
 +}
 +
 +/* remove the temporary mailbox */
-+void remove_file (CONTEXT* ctx)
++void remove_file (CONTEXT* ctx) 
 +{
 +  if (ctx->magic == M_MBOX || ctx->magic == M_MMDF)
 +    remove (ctx->path);
@@ -407,7 +360,7 @@ diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
 +      return (mutt_open_read_compressed (ctx));
 +
 +    ctx->magic = 0;
-+    safe_free ((void**)&ctx->compressinfo);
++    FREE (&ctx->compressinfo);
 +    return (-1);
 +  }
 +
@@ -436,15 +389,13 @@ diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
 +      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))
++    if (access (ctx->path, F_OK) != 0 && ! option (OPTSAVEEMPTY))
 +      remove (ctx->realpath);
 +    else
 +      remove_file (ctx);
 +
 +    restore_path (ctx);
-+    safe_free ((void**)&ctx->compressinfo);
++    FREE (&ctx->compressinfo);
 +  }
 +}
 +
@@ -460,13 +411,13 @@ diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
 +    mutt_message (_("Compressing %s..."), ctx->realpath);
 +
 +  cmd = get_compression_cmd (ci->close, ctx);
-+  if (cmd == NULL)
++  if (cmd == NULL) 
 +    return (-1);
 +
 +  if ((fp = fopen (ctx->realpath, "a")) == NULL)
 +  {
 +    mutt_perror (ctx->realpath);
-+    safe_free ((void **)&cmd);
++    FREE (&cmd);
 +    return (-1);
 +  }
 +  mutt_block_signals ();
@@ -475,8 +426,10 @@ diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
 +    fclose (fp);
 +    mutt_unblock_signals ();
 +    mutt_error _("Unable to lock mailbox!");
-+    store_size (ctx);
-+    safe_free ((void **)&cmd);
++
++  store_size (ctx);
++
++    FREE (&cmd);
 +    return (-1);
 +  }
 +
@@ -484,7 +437,8 @@ diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
 +
 +  endwin ();
 +  fflush (stdout);
-+  fprintf (stderr, _("Compressing %s...\n"), ctx->realpath);
++  sprintf(echo_cmd,_("echo Compressing %s..."), ctx->realpath); 
++  mutt_system(echo_cmd);
 +  if (mutt_system (cmd))
 +  {
 +    mutt_any_key_to_continue (NULL);
@@ -496,8 +450,8 @@ diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
 +  mutt_unblock_signals ();
 +  fclose (fp);
 +
-+  safe_free ((void **)&cmd);
-+
++  FREE (&cmd);
++  
 +  store_size (ctx);
 +
 +  return (rc);
@@ -510,15 +464,16 @@ diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
 +  char *cmd;
 +  COMPRESS_INFO *ci = (COMPRESS_INFO *) ctx->compressinfo;
 +
-+  dprint (2, (debugfile, "mutt_slow_close_compressed called on '%s'\n",
++  dprint (2, (debugfile, "mutt_slow_close_compressed called on '%s'\n", 
 +            ctx->path));
 +
-+  if (! (ctx->append
++  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               */
++  { /* 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);
 +  }
@@ -536,13 +491,13 @@ diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
 +  }
 +
 +  cmd = get_compression_cmd (append, ctx);
-+  if (cmd == NULL)
++  if (cmd == NULL) 
 +    return (-1);
 +
 +  if ((fp = fopen (ctx->realpath, "a")) == NULL)
 +  {
 +    mutt_perror (ctx->realpath);
-+    safe_free ((void **)&cmd);
++    FREE (&cmd);
 +    return (-1);
 +  }
 +  mutt_block_signals ();
@@ -551,7 +506,7 @@ diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
 +    fclose (fp);
 +    mutt_unblock_signals ();
 +    mutt_error _("Unable to lock mailbox!");
-+    safe_free ((void **)&cmd);
++    FREE (&cmd);
 +    return (-1);
 +  }
 +
@@ -561,16 +516,17 @@ diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
 +  fflush (stdout);
 +
 +  if (append == ci->close)
-+    fprintf (stderr, _("Compressing %s...\n"), ctx->realpath);
++    sprintf(echo_cmd,_("echo Compressing %s..."), ctx->realpath); 
 +  else
-+    fprintf (stderr, _("Compressed-appending to %s...\n"), ctx->realpath);
++    sprintf(echo_cmd,_("echo Compressed-appending to %s..."), ctx->realpath); 
++  mutt_system(echo_cmd);
 +
 +  if (mutt_system (cmd))
 +  {
 +    mutt_any_key_to_continue (NULL);
 +    mutt_error (_(" %s: Error compressing mailbox!  Uncompressed one kept!\n"),
 +              ctx->path);
-+    safe_free ((void **)&cmd);
++    FREE (&cmd);
 +    mbox_unlock_compressed (ctx, fp);
 +    mutt_unblock_signals ();
 +    fclose (fp);
@@ -582,16 +538,16 @@ diff -Nur mutt-1.3.27.orig/compress.c mutt-1.3.27/compress.c
 +  fclose (fp);
 +  remove_file (ctx);
 +  restore_path (ctx);
-+  safe_free ((void **)&cmd);
-+  safe_free ((void **)&ctx->compressinfo);
++  FREE (&cmd);
++  FREE (&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
+diff -udprP mutt-1.5.16.orig/compress.h mutt-1.5.16/compress.h
+--- mutt-1.5.16.orig/compress.h        1970-01-01 03:00:00.000000000 +0300
++++ mutt-1.5.16/compress.h     2007-06-12 14:22:35.000000000 +0300
 @@ -0,0 +1,27 @@
 +/*
 + * Copyright (C) 1997 Alain Penders <Alain@Finale-Dev.com>
@@ -620,37 +576,34 @@ diff -Nur mutt-1.3.27.orig/compress.h mutt-1.3.27/compress.h
 +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
+diff -udprP mutt-1.5.16.orig/config.h.in mutt-1.5.16/config.h.in
+--- mutt-1.5.16.orig/config.h.in       2007-06-10 05:44:57.000000000 +0300
++++ mutt-1.5.16/config.h.in    2007-06-12 14:22:35.000000000 +0300
+@@ -512,6 +512,9 @@
  
-+/* Define to enable compressed mailboxes support */
+ /* Define to enable Sun mailtool attachments support. */
+ #undef SUN_ATTACHMENT
++  
++/* The 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
  
+ /* Define to use dotlocking for mailboxes. */
+ #undef USE_DOTLOCK
+diff -udprP mutt-1.5.16.orig/configure mutt-1.5.16/configure
+--- mutt-1.5.16.orig/configure 2007-06-10 05:43:29.000000000 +0300
++++ mutt-1.5.16/configure      2007-06-12 14:22:35.000000000 +0300
+@@ -1350,6 +1350,7 @@ Optional Features:
+   --disable-warnings      Turn off compiler warnings (not recommended)
+   --enable-nfs-fix        Work around an NFS with broken attributes caching
+   --enable-mailtool       Enable Sun mailtool attachments support
++  --enable-compressed     Enable compressed folders support
+   --enable-locales-fix    The result of isprint() is unreliable
+   --enable-exact-address  Enable regeneration of email addresses
+   --enable-hcache         Enable header caching
+@@ -14414,6 +14415,18 @@ echo "${ECHO_T}$mutt_cv_regex_broken" >&
          fi
-+fi
-+
+ fi
 +
 +# Check whether --enable-compressed or --disable-compressed was given.
 +if test "${enable_compressed+set}" = set; then
@@ -661,28 +614,30 @@ diff -Nur mutt-1.3.27.orig/configure mutt-1.3.27/configure
 +EOF
 +
 +        fi
- fi
++fi
++
+ if test $mutt_cv_regex = yes; then
  
-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. ])
+ cat >>confdefs.h <<\_ACEOF
+diff -udprP mutt-1.5.16.orig/configure.ac mutt-1.5.16/configure.ac
+--- mutt-1.5.16.orig/configure.ac      2007-06-04 07:20:01.000000000 +0300
++++ mutt-1.5.16/configure.ac   2007-06-12 14:22:35.000000000 +0300
+@@ -780,6 +780,11 @@ AC_ARG_ENABLE(mailtool, AC_HELP_STRING([
+                 AC_DEFINE(SUN_ATTACHMENT,1,[ Define to enable Sun mailtool attachments support. ])
          fi])
  
-+AC_ARG_ENABLE(compressed, [  --enable-compressed        Enable compressed folders support ],
-+      [if test x$enableval = xyes; then
-+                AC_DEFINE(USE_COMPRESSED,1, [ Define to support compressed folders. ])
++AC_ARG_ENABLE(compressed, AC_HELP_STRING([--enable-compressed], [Enable compressed folders support]),
++        [if test x$enableval = xyes; then
++                AC_DEFINE(USE_COMPRESSED,1,[ Define to enable compressed folders support. ])
 +        fi])
 +
- AC_ARG_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 @@
+ AC_ARG_ENABLE(locales-fix, AC_HELP_STRING([--enable-locales-fix], [The result of isprint() is unreliable]),
+         [if test x$enableval = xyes; then
+                 AC_DEFINE(LOCALES_HACK,1,[ Define if the result of isprint() is unreliable. ])
+diff -udprP mutt-1.5.16.orig/curs_main.c mutt-1.5.16/curs_main.c
+--- mutt-1.5.16.orig/curs_main.c       2007-05-20 10:30:00.000000000 +0300
++++ mutt-1.5.16/curs_main.c    2007-06-12 14:22:35.000000000 +0300
+@@ -1111,6 +1111,11 @@ int mutt_index_menu (void)
          {
          int check;
  
@@ -694,815 +649,361 @@ diff -Nur mutt-1.3.27.orig/curs_main.c mutt-1.3.27/curs_main.c
          mutt_str_replace (&LastFolder, Context->path);
          oldcount = Context ? Context->msgcount : 0;
  
-diff -Nur mutt-1.3.27.orig/doc/manual-4.html mutt-1.3.27/doc/manual-4.html
---- mutt-1.3.27.orig/doc/manual-4.html Tue Jan  1 21:18:11 2002
-+++ mutt-1.3.27/doc/manual-4.html      Fri Feb  1 22:51:32 2002
-@@ -788,7 +788,176 @@
- macro pager \cb |urlview\n
- </PRE>
- </CODE></BLOCKQUOTE>
-+</P>
-+
-+<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>
-+<P>The <EM>command</EM> is the command that can be used for opening the
-+folders whose names match <EM>regexp</EM>.</P>
-+<P>The <EM>command</EM> 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.</P>
-+<P>%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.</P>
-+<P>The <EM>command</EM> should <B>not</B> remove the original compressed file.
-+The <EM>command</EM> should return non-zero exit status if it fails, so
-+mutt knows something's wrong.</P>
-+<P>Example:</P>
-+<P>
-+<BLOCKQUOTE><CODE>
-+<PRE>
-+open-hook \\.gz$ "gzip -cd %f &gt; %t" 
-+</PRE>
-+</CODE></BLOCKQUOTE>
-+</P>
-+<P>If the <EM>command</EM> is empty, this operation is disabled for this file
-+type.</P>
-+
-+<H3><A NAME="close-hook"></A> Write a compressed mailbox</H3>
-+
-+<P>Usage: <CODE>close-hook</CODE> <EM>regexp</EM> &quot;<EM>command</EM>&quot;</P>
-+<P>This is used to close the folder that was open with the 
-+<A HREF="#open-hook">open-hook</A> command after some changes were made to it.</P>
-+<P>The <EM>command</EM> string is the command that can be used for closing the
-+folders whose names match <EM>regexp</EM>. It has the same format as in 
-+the 
-+<A HREF="#open-hook">open-hook</A> command. Temporary folder
-+in this case is the folder previously produced by the 
-+<A HREF="#open-hook">open-hook</A> command.</P>
-+<P>The <EM>command</EM> should <B>not</B> remove the decompressed file. The
-+<EM>command</EM> should return non-zero exit status if it fails, so mutt
-+knows something's wrong.</P>
-+<P>Example:</P>
-+<P>
-+<BLOCKQUOTE><CODE>
-+<PRE>
-+close-hook \\.gz$ "gzip -c %t &gt; %f"
-+</PRE>
-+</CODE></BLOCKQUOTE>
-+</P>
-+<P>If the <EM>command</EM> is empty, this operation is disabled for this file
-+type, and the file can only be open in the read-only mode.</P>
-+<P>
-+<A HREF="#close-hook">close-hook</A> is not called when you exit
-+from the folder if the folder was not changed.</P>
-+
-+<H3><A NAME="append-hook"></A> Append a message to a compressed mailbox</H3>
-+
-+<P>Usage: <CODE>append-hook</CODE> <EM>regexp</EM> &quot;<EM>command</EM>&quot;</P>
-+<P>This command is used for saving to an existing compressed folder.
-+The <EM>command</EM> is the command that can be used for appending to the
-+folders whose names match <EM>regexp</EM>. It has the same format as in 
-+the 
-+<A HREF="#open-hook">open-hook</A> command.
-+The temporary folder in this case contains the messages that are being
-+appended. </P>
-+<P>The <EM>command</EM> should <B>not</B> remove the decompressed file. The
-+<EM>command</EM> should return non-zero exit status if it fails, so mutt
-+knows something's wrong.</P>
-+<P>Example:</P>
-+<P>
-+<BLOCKQUOTE><CODE>
-+<PRE>
-+append-hook \\.gz$ "gzip -c %t &gt;&gt; %f" 
-+</PRE>
-+</CODE></BLOCKQUOTE>
-+</P>
-+<P>When 
-+<A HREF="#append-hook">append-hook</A> 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 (
-+<A HREF="manual-6.html#mbox_type">$mbox_type</A>) type is always supposed (i.e.
-+this is the format used for the temporary folder).</P>
-+<P>If the file does not exist when you save to it, 
-+<A HREF="#close-hook">close-hook</A> is called, and not 
-+<A HREF="#append-hook">append-hook</A>. 
-+<A HREF="#append-hook">append-hook</A> is only
-+for appending to existing folders.</P>
-+<P>If the <EM>command</EM> is empty, this operation is disabled for this file
-+type. In this case, the folder will be open and closed again (using
-+<A HREF="#open-hook">open-hook</A> and 
-+<A HREF="#close-hook">close-hook</A>respectively) each time you will add to it.</P>
-+
-+<H3>Encrypted folders</H3>
-+
-+<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:</P>
-+<P>
-+<BLOCKQUOTE><CODE>
-+<PRE>
-+open-hook  \\.pgp$ "pgp -f &lt; %f &gt; %t"
-+close-hook \\.pgp$ "pgp -fe YourPgpUserIdOrKeyId &lt; %t &gt; %f"
-+</PRE>
-+</CODE></BLOCKQUOTE>
-+</P>
-+<P>Please note, that PGP does not support appending to an encrypted
-+folder, so there is no append-hook defined.</P>
-+<P>If you are using GnuPG instead of PGP, you may use the following hooks
-+instead:</P>
-+<P>
-+<BLOCKQUOTE><CODE>
-+<PRE>
-+open-hook  \\.gpg$ "gpg --decrypt &lt; %f &gt; %t"
-+close-hook \\.gpg$ "gpg --encrypt --recipient YourGpgUserIdOrKeyId &lt; %t &gt; %f"
-+</PRE>
-+</CODE></BLOCKQUOTE>
-+</P>
-+<P><B>Note:</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.</P>
-+
- <HR>
- <A HREF="manual-5.html">Next</A>
- <A HREF="manual-3.html">Previous</A>
-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>
+diff -udprP mutt-1.5.16.orig/doc/Makefile.am mutt-1.5.16/doc/Makefile.am
+--- mutt-1.5.16.orig/doc/Makefile.am   2007-04-13 19:43:45.000000000 +0300
++++ mutt-1.5.16/doc/Makefile.am        2007-06-12 14:22:35.000000000 +0300
+@@ -27,7 +27,8 @@ EXTRA_DIST = dotlock.man             \
  
-+<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>
+ HTML_DOCFILES = manual.html index.html intro.html gettingstarted.html \
+       configuration.html mimesupport.html advancedusage.html \
+-      optionalfeatures.html tuning.html reference.html miscellany.html
++      optionalfeatures.html tuning.html reference.html miscellany.html \
++      compressed-folders.html
+ BUILT_DISTFILES = stamp-doc-xml stamp-doc-chunked manual.txt $(HTML_DOCFILES)
+diff -udprP mutt-1.5.16.orig/doc/Makefile.in mutt-1.5.16/doc/Makefile.in
+--- mutt-1.5.16.orig/doc/Makefile.in   2007-06-10 05:43:25.000000000 +0300
++++ mutt-1.5.16/doc/Makefile.in        2007-06-12 14:22:35.000000000 +0300
+@@ -223,7 +223,8 @@
+ HTML_DOCFILES = manual.html index.html intro.html gettingstarted.html \
+       configuration.html mimesupport.html advancedusage.html \
+-      optionalfeatures.html tuning.html reference.html miscellany.html
++      optionalfeatures.html tuning.html reference.html miscellany.html \
++      compressed-folders.html
+ BUILT_DISTFILES = stamp-doc-xml stamp-doc-chunked manual.txt $(HTML_DOCFILES)
+ srcdir_DOCFILES = PGP-Notes.txt applying-patches.txt  \
+diff -udprP mutt-1.5.16.orig/doc/manual.xml.head mutt-1.5.16/doc/manual.xml.head
+--- mutt-1.5.16.orig/doc/manual.xml.head       2007-04-04 08:37:13.000000000 +0300
++++ mutt-1.5.16/doc/manual.xml.head    2007-06-12 14:22:35.000000000 +0300
+@@ -4083,6 +4083,24 @@ configuration option/command.  See
+ <link linkend="fcc-save-hook">fcc-save-hook</link>
+ </para>
+ </listitem>
++<listitem>
++
++<para>
++<link linkend="open-hook">open-hook</link>
++</para>
++</listitem>
++<listitem>
++
++<para>
++<link linkend="close-hook">close-hook</link>
++</para>
++</listitem>
++<listitem>
++
++<para>
++<link linkend="append-hook">append-hook</link>
++</para>
++</listitem>
+ </itemizedlist>
+@@ -4910,6 +4928,254 @@ becomes an issue as mutt will silently f
+ </chapter>
  
-+<sect1>Compressed folders Support (OPTIONAL)
-+<p>
++<chapter id="compressed-folders">
++<title>Compressed folders Support (OPTIONAL)</title>
 +
++<para>
 +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.
++<emphasis>configure</emphasis> script with the
++<emphasis>--enable-compressed</emphasis> flag), Mutt can open folders
++stored in an arbitrary format, provided that the user has a script to
++convert from/to this format to one of the accepted.
++</para>
 +
++<para>
 +The most common use is to open compressed archived folders e.g. with
 +gzip.
++</para>
 +
++<para>
 +In addition, the user can provide a script that gets a folder in an
 +accepted format and appends its context to the folder in the
 +user-defined format, which may be faster than converting the entire
 +folder to the accepted format, appending to it and converting back to
 +the user-defined format.
-+
-+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.
-+
++</para>
++
++<para>
++There are three hooks defined
++(<link linkend="open-hook">open-hook</link>,
++<link linkend="close-hook">close-hook</link> and
++<link linkend="append-hook">append-hook</link>) which define commands
++to uncompress and compress a folder and to append messages to an
++existing compressed folder respectively.
++</para>
++
++<para>
 +For example:
 +
-+<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.
-+
++<screen>
++open-hook \\.gz$ "gzip -cd %f > %t" 
++close-hook \\.gz$ "gzip -c %t > %f"
++append-hook \\.gz$ "gzip -c %t >> %f" 
++</screen>
++</para>
++
++<para>
++You do not have to specify all of the commands. If you omit
++<link linkend="append-hook">append-hook</link>, the folder will be open
++and closed again each time you will add to it. If you omit
++<link linkend="close-hook">close-hook</link> (or give empty command),
++the folder will be open in the  mode. If you specify
++<link linkend="append-hook">append-hook</link> though you'll be able to
++append to the folder.
++</para>
++
++<para>
 +Note that Mutt will only try to use hooks if the file is not in one of
 +the accepted formats. In particular, if the file is empty, mutt
 +supposes it is not compressed. This is important because it allows the
 +use of programs that do not have well defined extensions. Just use
-+&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.
-+
++``.'' as a regexp. But this may be surprising if your compressing
++script produces empty files. In this situation, unset
++<link linkend="save-empty">&dollar;save&lowbar;empty</link>, so that
++the compressed file will be removed if you delete all of the messages.
++</para>
++
++<sect1 id="open-hook">
++<title>Open a compressed mailbox for reading</title>
++
++<para>
++Usage: <literal>open-hook</literal> <emphasis>regexp</emphasis> <emphasis>command</emphasis>
++</para>
++
++<para>
++The <emphasis>command</emphasis> is the command that can be used for
++opening the folders whose names match <emphasis>regexp</emphasis>.
++</para>
++
++<para>
++The <emphasis>command</emphasis> string is the printf-like format
++string, and it should accept two parameters: &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.
++</para>
++
++<para>
 +&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.
++</para>
 +
-+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.
++<para>
++The <emphasis>command</emphasis> should <emphasis role="bold">not</emphasis>
++remove the original compressed file. The <emphasis>command</emphasis>
++should return non-zero exit status if it fails, so mutt knows
++something's wrong.
++</para>
 +
++<para>
 +Example:
 +
-+<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.
-+
++<screen>
++open-hook \\.gz$ "gzip -cd %f > %t" 
++</screen>
++</para>
++
++<para>
++If the <emphasis>command</emphasis> is empty, this operation is
++disabled for this file type.
++</para>
++
++</sect1>
++
++<sect1 id="close-hook">
++<title>Write a compressed mailbox</title>
++
++<para>
++Usage: <literal>close-hook</literal> <emphasis>regexp</emphasis> <emphasis>command</emphasis>
++</para>
++
++<para>
++This is used to close the folder that was open with the
++<link linkend="open-hook">open-hook</link> command after some changes
++were made to it.
++</para>
++
++<para>
++The <emphasis>command</emphasis> string is the command that can be
++used for closing the folders whose names match <emphasis>regexp</emphasis>.
++It has the same format as in the <link linkend="open-hook">open-hook</link>
++command. Temporary folder in this case is the folder previously
++produced by the <link linkend="open-hook">open-hook</link> command.
++</para>
++
++<para>
++The <emphasis>command</emphasis> should <emphasis role="bold">not</emphasis>
++remove the decompressed file. The <emphasis>command</emphasis> should
++return non-zero exit status if it fails, so mutt knows something's
++wrong.
++</para>
++
++<para>
 +Example:
 +
-+<tscreen><verb>
-+close-hook \\.gz$ "gzip -c %t &gt; %f"
-+</verb></tscreen>
++<screen>
++close-hook \\.gz$ "gzip -c %t > %f"
++</screen>
++</para>
 +
-+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.
++<para>
++If the <emphasis>command</emphasis> is empty, this operation is
++disabled for this file type, and the file can only be open in the
++readonly mode.
++</para>
 +
-+<ref id="close-hook" name ="close-hook"> is not called when you exit
-+from the folder if the folder was not changed.
++<para>
++<link linkend="close-hook">close-hook</link> is not called when you
++exit from the folder if the folder was not changed.
++</para>
 +
-+<sect2>Append a message to a compressed mailbox<label id="append-hook">
-+<p>
-+Usage: <tt/append-hook/ <em/regexp/ &dquot;<em/command/&dquot;
++</sect1>
 +
-+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. 
++<sect1 id="append-hook">
++<title>Append a message to a compressed mailbox</title>
 +
-+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.
++<para>
++Usage: <literal>append-hook</literal> <emphasis>regexp</emphasis> <emphasis>command</emphasis>
++</para>
 +
++<para>
++This command is used for saving to an existing compressed folder.
++The <emphasis>command</emphasis> is the command that can be used for
++appending to the folders whose names match <emphasis>regexp</emphasis>.
++It has the same format as in the <link linkend="open-hook">open-hook</link>
++command. The temporary folder in this case contains the messages that
++are being appended. 
++</para>
++
++<para>
++The <emphasis>command</emphasis> should <emphasis role="bold">not</emphasis>
++remove the decompressed file. The <emphasis>command</emphasis> should
++return non-zero exit status if it fails, so mutt knows something's
++wrong.
++</para>
++
++<para>
 +Example:
 +
-+<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>
++<screen>
++append-hook \\.gz$ "gzip -c %t >> %f" 
++</screen>
++</para>
++
++<para>
++When <link linkend="append-hook">append-hook</link> is used, the folder
++is not opened, which saves time, but this means that we can not find
++out what the folder type is. Thus the default
++(<link linkend="mbox-type">&dollar;mbox&lowbar;type</link>) type is
++always supposed (i.e. this is the format used for the temporary
++folder).
++</para>
++
++<para>
++If the file does not exist when you save to it,
++<link linkend="close-hook">close-hook</link> is called, and not
++<link linkend="append-hook">append-hook</link>.
++<link linkend="append-hook">append-hook</link> is only for appending
++to existing folders.
++</para>
++
++<para>
++If the <emphasis>command</emphasis> is empty, this operation is
++disabled for this file type. In this case, the folder will be open and
++closed again (using <link linkend="open-hook">open-hook</link> and
++<link linkend="close-hook">close-hook</link> respectively) each time
++you will add to it.
++</para>
++
++</sect1>
++
++<sect1>
++<title>Encrypted folders</title>
++
++<para>
 +The compressed folders support can also be used to handle encrypted
 +folders. If you want to encrypt a folder with PGP, you may want to use
 +the following hooks:
 +
-+<tscreen><verb>
++<screen>
 +open-hook  \\.pgp$ "pgp -f &lt; %f &gt; %t"
 +close-hook \\.pgp$ "pgp -fe YourPgpUserIdOrKeyId &lt; %t &gt; %f"
-+</verb></tscreen>
++</screen>
++</para>
 +
++<para>
 +Please note, that PGP does not support appending to an encrypted
 +folder, so there is no append-hook defined.
++</para>
 +
-+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.
++<para>
++<emphasis role="bold">Note:</emphasis> the folder is temporary stored
++decrypted in the /tmp directory, where it can be read by your system
++administrator. So think about the security aspects of this.
++</para>
 +
-+  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.
++</sect1>
 +
-+  Example:
++</chapter>
 +
-+       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
+ <chapter id="mimesupport">
+ <title>Mutt's MIME Support</title>
  
-   Quite a bit of effort has been made to make Mutt the premier text-mode
-@@ -3148,6 +3303,8 @@
+@@ -6056,6 +6322,12 @@ The following are the commands understoo
+ <listitem>
  
-   ·  ``unmy_hdr'' _\bf_\bi_\be_\bl_\bd [ _\bf_\bi_\be_\bl_\bd ... ]
+ <para>
++<literal><link linkend="append-hook">append-hook</link></literal> <emphasis>pattern</emphasis> <emphasis>command</emphasis>
++</para>
++</listitem>
++<listitem>
++
++<para>
+ <literal><link linkend="auto-view">auto&lowbar;view</link></literal> <emphasis>mimetype</emphasis> &lsqb; <emphasis>mimetype</emphasis> ... &rsqb;
+ </para>
+ </listitem>
+@@ -6086,6 +6358,12 @@ The following are the commands understoo
+ <listitem>
  
-+  ·  ``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
+ <para>
++<literal><link linkend="close-hook">close-hook</link></literal> <emphasis>pattern</emphasis> <emphasis>command</emphasis>
++</para>
++</listitem>
++<listitem>
++
++<para>
+ <literal><link linkend="color">color</link></literal> <emphasis>object</emphasis> <emphasis>foreground</emphasis> <emphasis>background</emphasis> &lsqb; <emphasis>regexp</emphasis> &rsqb;
+ </para>
+ </listitem>
+@@ -6218,6 +6496,12 @@ The following are the commands understoo
+ <listitem>
  
-   ·  ``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.
+ <para>
++<literal><link linkend="open-hook">open-hook</link></literal> <emphasis>pattern</emphasis> <emphasis>command</emphasis>
++</para>
++</listitem>
++<listitem>
++
++<para>
+ <literal><link linkend="crypt-hook">crypt-hook</link></literal> <emphasis>pattern</emphasis> <emphasis>key-id</emphasis>
+ </para>
+ </listitem>
+diff -udprP mutt-1.5.16.orig/doc/muttrc.man.head mutt-1.5.16/doc/muttrc.man.head
+--- mutt-1.5.16.orig/doc/muttrc.man.head       2007-04-02 00:58:55.000000000 +0300
++++ mutt-1.5.16/doc/muttrc.man.head    2007-06-12 14:22:35.000000000 +0300
+@@ -345,6 +345,24 @@ specify the ID of the public key to be u
+ to a certain recipient.  The meaning of "key ID" is to be taken
+ broadly: This can be a different e-mail address, a numerical key ID,
+ or even just an arbitrary search string.
 +.PP
 +.nf
 +\fBopen-hook\fP \fIregexp\fP "\fIcommand\fP"
@@ -1524,40 +1025,12 @@ diff -Nur mutt-1.3.27.orig/doc/muttrc.man mutt-1.3.27/doc/muttrc.man
  .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"
+diff -udprP mutt-1.5.16.orig/hook.c mutt-1.5.16/hook.c
+--- mutt-1.5.16.orig/hook.c    2007-04-08 02:36:55.000000000 +0300
++++ mutt-1.5.16/hook.c 2007-06-12 14:22:35.000000000 +0300
+@@ -24,6 +24,10 @@
  #include "mailbox.h"
+ #include "mutt_crypt.h"
  
 +#ifdef USE_COMPRESSED
 +#include "compress.h"
@@ -1566,7 +1039,7 @@ diff -Nur mutt-1.3.27.orig/hook.c mutt-1.3.27/hook.c
  #include <limits.h>
  #include <string.h>
  #include <stdlib.h>
-@@ -87,6 +91,16 @@
+@@ -92,6 +96,16 @@ int mutt_parse_hook (BUFFER *buf, BUFFER
      memset (&pattern, 0, sizeof (pattern));
      pattern.data = safe_strdup (path);
    }
@@ -1575,18 +1048,18 @@ diff -Nur mutt-1.3.27.orig/hook.c mutt-1.3.27/hook.c
 +  {
 +    if (mutt_test_compress_command (command.data))
 +    {
-+      strfcpy (err->data, _("bad formatted command string"), err->dsize);
-+      return (-1);
++      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 @@
+   else if (DefaultHook && !(data & (M_CHARSETHOOK | M_ICONVHOOK | M_ACCOUNTHOOK))
+            && (!WithCrypto || !(data & M_CRYPTHOOK))
+       )
+diff -udprP mutt-1.5.16.orig/init.h mutt-1.5.16/init.h
+--- mutt-1.5.16.orig/init.h    2007-06-10 05:29:21.000000000 +0300
++++ mutt-1.5.16/init.h 2007-06-12 14:22:35.000000000 +0300
+@@ -3129,6 +3129,11 @@ struct command_t Commands[] = {
    { "fcc-hook",               mutt_parse_hook,        M_FCCHOOK },
    { "fcc-save-hook",  mutt_parse_hook,        M_FCCHOOK | M_SAVEHOOK },
    { "folder-hook",    mutt_parse_hook,        M_FOLDERHOOK },
@@ -1595,31 +1068,31 @@ diff -Nur mutt-1.3.27.orig/init.h mutt-1.3.27/init.h
 +  { "close-hook",     mutt_parse_hook,        M_CLOSEHOOK },
 +  { "append-hook",    mutt_parse_hook,        M_APPENDHOOK },
 +#endif
+   { "group",          parse_group,            0 },
+   { "ungroup",                parse_ungroup,          0 },
    { "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  "
+diff -udprP mutt-1.5.16.orig/main.c mutt-1.5.16/main.c
+--- mutt-1.5.16.orig/main.c    2007-04-10 23:53:08.000000000 +0300
++++ mutt-1.5.16/main.c 2007-06-12 14:22:35.000000000 +0300
+@@ -310,6 +310,12 @@ static void show_version (void)
+       "-USE_GNU_REGEX  "
  #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"
++
+       "\n"
+       
+ #ifdef HAVE_COLOR
+diff -udprP mutt-1.5.16.orig/mbox.c mutt-1.5.16/mbox.c
+--- mutt-1.5.16.orig/mbox.c    2007-04-02 00:58:56.000000000 +0300
++++ mutt-1.5.16/mbox.c 2007-06-12 14:22:35.000000000 +0300
+@@ -29,6 +29,10 @@
  #include "copy.h"
+ #include "mutt_curses.h"
  
 +#ifdef USE_COMPRESSED
 +#include "compress.h"
@@ -1628,7 +1101,7 @@ diff -Nur mutt-1.3.27.orig/mbox.c mutt-1.3.27/mbox.c
  #include <sys/stat.h>
  #include <dirent.h>
  #include <string.h>
-@@ -1045,6 +1049,12 @@
+@@ -1026,6 +1030,12 @@ bail:  /* Come here in case of disaster 
  int mbox_close_mailbox (CONTEXT *ctx)
  {
    mx_unlock_file (ctx->path, fileno (ctx->fp), 1);
@@ -1641,37 +1114,37 @@ diff -Nur mutt-1.3.27.orig/mbox.c mutt-1.3.27/mbox.c
    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
+diff -udprP mutt-1.5.16.orig/mutt.h mutt-1.5.16/mutt.h
+--- mutt-1.5.16.orig/mutt.h    2007-04-11 06:14:01.000000000 +0300
++++ mutt-1.5.16/mutt.h 2007-06-12 14:22:35.000000000 +0300
+@@ -160,6 +160,11 @@ typedef enum
  #define M_ACCOUNTHOOK (1<<9)
+ #define M_REPLYHOOK   (1<<10)
+ #define M_SEND2HOOK     (1<<11)
 +#ifdef USE_COMPRESSED
-+#define M_OPENHOOK    (1<<10)
-+#define M_APPENDHOOK  (1<<11)
-+#define M_CLOSEHOOK   (1<<12)
++#define M_OPENHOOK    (1<<12)
++#define M_APPENDHOOK  (1<<13)
++#define M_CLOSEHOOK   (1<<14)
 +#endif
  
  /* tree characters for linearize_tree and print_enriched_string */
  #define M_TREE_LLCORNER               1
-@@ -745,6 +750,11 @@
-   void *data;                 /* driver specific data */
#endif /* USE_IMAP */
+@@ -889,6 +894,11 @@ typedef struct _context
  unsigned char rights[(RIGHTSMAX + 7)/8];    /* ACL bits */
  
 +#ifdef USE_COMPRESSED
 +  void *compressinfo;         /* compressed mbox module private data */
 +  char *realpath;             /* path to compressed mailbox */
 +#endif /* USE_COMPRESSED */
 +
-   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 @@
+   unsigned int changed : 1;   /* mailbox has been modified */
+   unsigned int readonly : 1;    /* don't allow changes to the mailbox */
+diff -udprP mutt-1.5.16.orig/mx.c mutt-1.5.16/mx.c
+--- mutt-1.5.16.orig/mx.c      2007-04-03 20:41:14.000000000 +0300
++++ mutt-1.5.16/mx.c   2007-06-12 14:22:35.000000000 +0300
+@@ -30,6 +30,10 @@
  #include "keymap.h"
  #include "url.h"
  
@@ -1679,10 +1152,10 @@ diff -Nur mutt-1.3.27.orig/mx.c mutt-1.3.27/mx.c
 +#include "compress.h"
 +#endif
 +
- #ifdef HAVE_PGP
- #include "pgp.h"
+ #ifdef USE_IMAP
+ #include "imap.h"
  #endif
-@@ -448,6 +452,10 @@
+@@ -450,6 +454,11 @@ int mx_get_magic (const char *path)
      return (-1);
    }
  
@@ -1690,10 +1163,11 @@ diff -Nur mutt-1.3.27.orig/mx.c mutt-1.3.27/mx.c
 +  if (magic == 0 && mutt_can_read_compressed (path))
 +    return M_COMPRESSED;
 +#endif
++
    return (magic);
  }
  
-@@ -489,6 +497,13 @@
+@@ -489,6 +498,13 @@ static int mx_open_mailbox_append (CONTE
  {
    struct stat sb;
  
@@ -1707,12 +1181,10 @@ diff -Nur mutt-1.3.27.orig/mx.c mutt-1.3.27/mx.c
    ctx->append = 1;
  
  #ifdef USE_IMAP
-@@ -649,7 +664,12 @@
-   }
+@@ -653,6 +669,11 @@ CONTEXT *mx_open_mailbox (const char *pa
  
    ctx->magic = mx_get_magic (path);
--  
-+
+   
 +#ifdef USE_COMPRESSED
 +  if (ctx->magic == M_COMPRESSED)
 +    mutt_open_read_compressed (ctx);
@@ -1721,21 +1193,21 @@ diff -Nur mutt-1.3.27.orig/mx.c mutt-1.3.27/mx.c
    if(ctx->magic == 0)
      mutt_error (_("%s is not a mailbox."), path);
  
-@@ -755,6 +775,10 @@
+@@ -753,6 +774,10 @@ void mx_fastclose_mailbox (CONTEXT *ctx)
      mutt_free_header (&ctx->hdrs[i]);
-   safe_free ((void **) &ctx->hdrs);
-   safe_free ((void **) &ctx->v2r);
+   FREE (&ctx->hdrs);
+   FREE (&ctx->v2r);
 +#ifdef USE_COMPRESSED
 +  if (ctx->compressinfo)
 +    mutt_fast_close_compressed (ctx);
 +#endif
-   safe_free ((void **) &ctx->path);
-   safe_free ((void **) &ctx->pattern);
+   FREE (&ctx->path);
+   FREE (&ctx->pattern);
    if (ctx->limit_pattern) 
-@@ -812,6 +836,12 @@
+@@ -805,6 +830,12 @@ static int sync_mailbox (CONTEXT *ctx, i
+   
    if (tmp && tmp->new == 0)
      mutt_update_mailbox (tmp);
- #endif
 +
 +#ifdef USE_COMPRESSED
 +  if (rc == 0 && ctx->compressinfo)
@@ -1745,7 +1217,7 @@ diff -Nur mutt-1.3.27.orig/mx.c mutt-1.3.27/mx.c
    return rc;
  }
  
-@@ -1018,6 +1048,11 @@
+@@ -1006,6 +1037,11 @@ int mx_close_mailbox (CONTEXT *ctx, int 
        !mutt_is_spool(ctx->path) && !option (OPTSAVEEMPTY))
      mx_unlink_empty (ctx->path);
  
@@ -1757,7 +1229,7 @@ diff -Nur mutt-1.3.27.orig/mx.c mutt-1.3.27/mx.c
    mx_fastclose_mailbox (ctx);
  
    return 0;
-@@ -1325,6 +1360,11 @@
+@@ -1315,6 +1351,11 @@ int mx_check_mailbox (CONTEXT *ctx, int 
  {
    int rc;
  
@@ -1769,10 +1241,10 @@ diff -Nur mutt-1.3.27.orig/mx.c mutt-1.3.27/mx.c
    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 @@
+diff -udprP mutt-1.5.16.orig/mx.h mutt-1.5.16/mx.h
+--- mutt-1.5.16.orig/mx.h      2007-04-02 00:58:56.000000000 +0300
++++ mutt-1.5.16/mx.h   2007-06-12 14:22:35.000000000 +0300
+@@ -40,6 +40,9 @@ enum
  #ifdef USE_POP
    , M_POP
  #endif
@@ -1782,103 +1254,21 @@ diff -Nur mutt-1.3.27.orig/mx.h mutt-1.3.27/mx.h
  };
  
  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 @@
+diff -udprP mutt-1.5.16.orig/po/POTFILES.in mutt-1.5.16/po/POTFILES.in
+--- mutt-1.5.16.orig/po/POTFILES.in    2007-04-02 00:58:57.000000000 +0300
++++ mutt-1.5.16/po/POTFILES.in 2007-06-12 14:22:35.000000000 +0300
+@@ -8,6 +8,7 @@ charset.c
  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 @@
+ crypt-gpgme.c
+ crypt.c
+ cryptglue.c
+diff -udprP mutt-1.5.16.orig/status.c mutt-1.5.16/status.c
+--- mutt-1.5.16.orig/status.c  2007-04-16 02:56:26.000000000 +0300
++++ mutt-1.5.16/status.c       2007-06-12 14:22:35.000000000 +0300
+@@ -99,6 +99,14 @@ status_format_str (char *buf, size_t buf
  
      case 'f':
        snprintf (fmt, sizeof(fmt), "%%%ss", prefix);
This page took 0.156367 seconds and 4 git commands to generate.