nmh-workers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nmh-workers] unseen sequence after inc into initially-empty folder


From: Ahmon Dancy
Subject: [Nmh-workers] unseen sequence after inc into initially-empty folder
Date: Thu, 18 Sep 2003 11:49:00 -0700

Please consider the following patch.  My memory on it is somewhat
fuzzy but I believe it fixed a problem where the unseen sequence was
not being set up properly when inc'ing into an initially-empty folder.




*** inc.c       Fri Mar 17 12:11:04 2000
--- /usr/src/inc.c      Thu Sep 18 11:13:05 2003
***************
*** 755,761 ****
--- 755,793 ----
                    fflush (stdout);
  
                msgnum++;
+               
+               /*
+               fprintf(stderr, "nummsg: %d, lowmsg: %d, hghmsg: %d\n",
+                       mp->nummsg, mp->lowmsg, mp->hghmsg);
+               */
+                       
+               
+               /* This stuff sorta copied from folder_addmsg.c 
+                  by dancy */
+ 
+               /*
+                * check if this is highest or lowest message
+                */
+               if (mp->nummsg == 0) {
+                 mp->lowmsg = msgnum;
+                 mp->hghmsg = msgnum;
+               } else {
+                 if (msgnum < mp->lowmsg)
+                   mp->lowmsg = msgnum;
+                 if (msgnum > mp->hghmsg)
+                   mp->hghmsg = msgnum;
+               }
+               
+               /* increment message count */
+               mp->nummsg++;
+ 
+               /* end */
+               
+               
+               /* dancy:  this is handled in the above code 
                mp->hghmsg++;
+               */
+ 
                clear_msg_flags (mp, msgnum);
                set_exists (mp, msgnum);
                set_unseen (mp, msgnum);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]