nmh-workers
[Top] [All Lists]

Patch for you

1998-03-18 11:06:08

Greetings to mnh-workers and the FreeBSD nmh "port" maintainer:

OK.  I got tired of folder -pack printing a bogus message, which
confused mh mh-e, so I fixed it.  Enclosed please a patch which
corrects the problem.  This patch restores, as near as I can tell, the
proper 6.8.x behavior of folder -pack on an empty folder.  I strongly
suspect that the new behavior is an artifact of the cleanup rather
than an intended change.

Before the patch folder -pack would complain about not being able to
rename ? to 1.  Now it correctly reports that the folder in question
has no messages.  MH-E depends on this behavior, btw, for its ESC P
command (which packs the folder).  With this patch applied, MH-E no
longer gets confused.

This is against 0.23, although I've seen this bug at least as far back
as 0.19 and maybe earlier.

Warner

P.S.  to scott: this patch can be used as patch-ae for the freebsd
port.  Please let me know if you want me to commit it.

--- sbr/folder_pack.c~  Fri Jan  9 18:13:28 1998
+++ sbr/folder_pack.c   Tue Mar 17 22:33:19 1998
@@ -22,6 +22,12 @@
     mp = *mpp;
 
     /*
+     * This is a nop when there are no messages
+     */
+    if (mp->nummsg == 0)
+       return 0;
+
+    /*
      * Make sure we have message status space allocated
      * for all numbers from 1 to current high message.
      */


<Prev in Thread] Current Thread [Next in Thread>
  • Patch for you, Warner Losh <=