From djb-qmail-return-12870-nelson-l-6ca615d95fcb76f5bb3afdc1a6ef9814=crynwr.com@koobera.math.uic.edu Sun Feb 08 19:26:02 1998 X-VM-v5-Data: ([nil nil nil nil nil nil nil nil nil] ["1542" "Sun" "8" "February" "1998" "11:23:51" "-0800" "Dean Gaudet" "dgaudet-list-qmail@arctic.org" nil "52" "[PATCH] update for pine maildir support" "^From:" nil nil "2" nil nil nil nil nil] nil) Return-Path: Delivered-To: nelson-l-6ca615d95fcb76f5bb3afdc1a6ef9814@desk.crynwr.com Received: (qmail 10761 invoked from network); 8 Feb 1998 19:26:01 -0000 Received: from ns.crynwr.com (192.203.178.14) by desk.crynwr.com with SMTP; 8 Feb 1998 19:26:01 -0000 Received: (qmail 16639 invoked by uid 500); 8 Feb 1998 19:25:15 -0000 Delivered-To: nelson-l-6ca615d95fcb76f5bb3afdc1a6ef9814@crynwr.com Received: (qmail 16635 invoked by uid 0); 8 Feb 1998 19:25:15 -0000 Received: from cruncher.math.uic.edu (131.193.178.241) by pdam.crynwr.com with SMTP; 8 Feb 1998 19:25:15 -0000 Received: (qmail 32696 invoked by uid 1001); 8 Feb 1998 19:18:31 -0000 Mailing-List: contact djb-qmail-help@koobera.math.uic.edu; run by ezmlm Precedence: bulk Delivered-To: mailing list djb-qmail@koobera.math.uic.edu Received: (qmail 32691 invoked from network); 8 Feb 1998 19:18:31 -0000 Received: from koobera.math.uic.edu (qmailr@131.193.178.247) by cruncher.math.uic.edu with SMTP; 8 Feb 1998 19:18:31 -0000 Received: (qmail 7057 invoked by uid 666); 8 Feb 1998 19:25:28 -0000 Delivered-To: djb-qmail@koobera.math.uic.edu Received: (qmail 7053 invoked from network); 8 Feb 1998 19:25:27 -0000 Received: from twinlark.arctic.org (204.62.130.91) by koobera.math.uic.edu with SMTP; 8 Feb 1998 19:25:27 -0000 Received: (qmail 4550 invoked by uid 500); 8 Feb 1998 19:23:52 -0000 Message-ID: X-Comment: Visit http://www.arctic.org/~dgaudet/legal for information regarding copyright and disclaimer. Organization: Transmeta Corp. MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII From: Dean Gaudet To: djb-qmail@koobera.math.uic.edu Subject: [PATCH] update for pine maildir support Date: Sun, 8 Feb 1998 11:23:51 -0800 (PST) This patch to the Bloodhounds International maildir module for pine makes it properly deal with new mail... the bh patch works great if you've only got one inbox. But if you're using multiple inboxes and TAB to move to the next new inbox it will stop you at every inbox. This fixes that problem. Dean --- maildir.module-970707/maildir.c Mon Jul 7 16:47:40 1997 +++ pine3.96/imap/ANSI/c-client/maildir.c Sat Feb 7 20:31:52 1998 @@ -441,6 +441,8 @@ stream->sequence++; /* bump sequence number */ stream->nmsgs = stream->recent = 0; + /* do it twice so that we can check for new messages correctly */ + maildir_ping_core(stream); if (maildir_ping (stream) && !(stream->nmsgs || stream->silent)) mm_log ("Mailbox is empty",(long) NIL); @@ -826,7 +830,7 @@ * Note: this depends on qmail naming of messages */ -long maildir_ping (MAILSTREAM *stream) +long maildir_ping_core (MAILSTREAM *stream) { char tmp[MAILTMPLEN]; MESSAGECACHE *elt; @@ -840,8 +844,6 @@ char *s; mailcache_t mc = (mailcache_t) mail_parameters (NIL,GET_CACHE,NIL); - maildir_copynew (LOCAL->dir); - if (stat (LOCAL->dir,&sbuf) < 0) { sprintf (tmp,"Unable to open maildir: %s",strerror (errno)); mm_log (tmp,ERROR); @@ -912,6 +914,12 @@ return T; /* return that we are alive */ } +long maildir_ping (MAILSTREAM *stream) +{ + maildir_copynew (LOCAL->dir); + return maildir_ping_core(stream); +} + /* Maildir check mailbox * Accepts: MAIL stream