to set MSTATUS.
SCCS-vsn: usr.bin/mail/aux.c 1.2
* Auxiliary functions.
*/
* Auxiliary functions.
*/
-static char *SccsId = "@(#)aux.c 1.1 %G%";
+static char *SccsId = "@(#)aux.c 1.2 %G%";
/*
* Return a pointer to a dynamic copy of the argument.
/*
* Return a pointer to a dynamic copy of the argument.
- if (mesg >= 1 && mesg <= msgCount)
- message[mesg-1].m_flag |= MTOUCH;
+ register struct message *mp;
+
+ if (mesg < 1 || mesg > msgCount)
+ return;
+ mp = &message[mesg-1];
+ mp->m_flag |= MTOUCH;
+ if ((mp->m_flag & MREAD) == 0)
+ mp->m_flag |= MREAD|MSTATUS;