i'm sure this has already been addressed and patches submitted, but just
in case, here's a patch to get pine 4.33 to sort maildirs with pre and
post 1000000000 time messages correctly.  it should be applied overtop of
the pine-maildir-4.33 patch found on qmail.org.

-tcl.



--- pine4.33/imap/src/osdep/unix/maildir.c.old  Wed Sep 12 22:08:53 2001
+++ pine4.33/imap/src/osdep/unix/maildir.c      Wed Sep 12 22:10:38 2001
@@ -537,6 +537,18 @@

 int maildir_namesort (struct direct **d1,struct direct **d2)
 {
+   long int lia, lib;
+   int ia, ib, ic, id;
+   ic = sscanf((*d1)->d_name, "%ld.%d.", &lia, &ia);
+   id = sscanf((*d2)->d_name, "%ld.%d.", &lib, &ib);
+   if((ic == 2) && (id == 2)) {
+      if(lia != lib) {
+         return (lia - lib);
+      }
+      if(ia != ib) {
+         return (ia - ib);
+      }
+   }
   return strcmp ((*d1)->d_name,(*d2)->d_name);
 }


Reply via email to