Annotation of 43BSD/contrib/mh/sbr/m_setvis.c, revision 1.1.1.1

1.1       root        1: /* m_setvis.c - set the unseen-sequence */
                      2: 
                      3: #include "../h/mh.h"
                      4: #include <stdio.h>
                      5: 
                      6: 
                      7: void m_setvis (mp, seen)
                      8: register struct msgs *mp;
                      9: int    seen;
                     10: {
                     11:     register int    msgnum;
                     12:     register char  *cp,
                     13:                    *dp,
                     14:                   **ap;
                     15: 
                     16:     dp = NULL;
                     17:     if ((cp = m_find (usequence)) == NULL
                     18:            || (ap = brkstring (dp = getcpy (cp), " ", "\n")) == NULL
                     19:            || *ap == NULL) {
                     20:        if (dp)
                     21:            free (dp);
                     22:        return;
                     23:     }
                     24: 
                     25:     for (; *ap; ap++)
                     26:        if (seen) {
                     27:            if (m_seqflag (mp, *ap))
                     28:                for (msgnum = mp -> lowsel; msgnum <= mp -> hghsel; msgnum++)
                     29:                    if (mp -> msgstats[msgnum] & UNSEEN)
                     30:                        (void) m_seqdel (mp, *ap, msgnum);
                     31:        }
                     32:        else
                     33:            for (msgnum = mp -> lowmsg; msgnum <= mp -> hghmsg; msgnum++)
                     34:                if (mp -> msgstats[msgnum] & UNSEEN)
                     35:                    (void) m_seqadd (mp, *ap, msgnum, -1);
                     36: 
                     37:     if (dp)
                     38:        free (dp);
                     39: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.