diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2000-04-25 16:42:23 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2000-04-25 16:42:23 +0000 |
commit | 23547d7f01a15aa84cbd62168e6925d262abe0c5 (patch) | |
tree | 2e039b898ad01af6e80d9970bd4a2264ed017750 /usr.bin/mail/aux.c | |
parent | 477a76c67b716181e665e202f0f05f930d09716e (diff) |
When incorporating new messages, clear the "new" count before the
inc so the count of new messages is useful afterwards. This makes
mail behave more like the SunOS version in this respect.
Diffstat (limited to 'usr.bin/mail/aux.c')
-rw-r--r-- | usr.bin/mail/aux.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/usr.bin/mail/aux.c b/usr.bin/mail/aux.c index 2cc229af5e5..f82bd763a69 100644 --- a/usr.bin/mail/aux.c +++ b/usr.bin/mail/aux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aux.c,v 1.13 1997/11/14 00:23:41 millert Exp $ */ +/* $OpenBSD: aux.c,v 1.14 2000/04/25 16:42:22 millert Exp $ */ /* $NetBSD: aux.c,v 1.5 1997/05/13 06:15:52 mikel Exp $ */ /* @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)aux.c 8.1 (Berkeley) 6/6/93"; #else -static char rcsid[] = "$OpenBSD: aux.c,v 1.13 1997/11/14 00:23:41 millert Exp $"; +static char rcsid[] = "$OpenBSD: aux.c,v 1.14 2000/04/25 16:42:22 millert Exp $"; #endif #endif /* not lint */ @@ -689,3 +689,16 @@ member(realfield, table) return(1); return(0); } + +void +clearnew() +{ + struct message *mp; + + for (mp = &message[0]; mp < &message[msgCount]; mp++) { + if (mp->m_flag & MNEW) { + mp->m_flag &= ~MNEW; + mp->m_flag |= MSTATUS; + } + } +} |