-
Notifications
You must be signed in to change notification settings - Fork 1
/
bh-pine-patch
90 lines (78 loc) · 3.75 KB
/
bh-pine-patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
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" "[email protected]" nil "52" "[PATCH] update for pine maildir support" "^From:" nil nil "2" nil nil nil nil nil]
nil)
Return-Path: <djb-qmail-return-12870-nelson-l-6ca615d95fcb76f5bb3afdc1a6ef9814=crynwr.com@koobera.math.uic.edu>
Delivered-To: [email protected]
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: [email protected]
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 [email protected]; run by ezmlm
Precedence: bulk
Delivered-To: mailing list [email protected]
Received: (qmail 32691 invoked from network); 8 Feb 1998 19:18:31 -0000
Received: from koobera.math.uic.edu ([email protected])
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: [email protected]
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: <[email protected]>
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 <[email protected]>
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
<http://www.imaxx.net/bh/Info/downloads.html#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