Annotation of 43BSD/contrib/mh/sbr/m_setcur.c, revision 1.1

1.1     ! root        1: /* m_setcur.c - set "cur" */
        !             2: 
        !             3: #include "../h/mh.h"
        !             4: #include <stdio.h>
        !             5: 
        !             6: 
        !             7: void m_setcur (mp, num)
        !             8: register struct  msgs *mp;
        !             9: register int     num;
        !            10: {
        !            11:     int     bits,
        !            12:             public;
        !            13:     register int    i;
        !            14: 
        !            15:     public = mp -> msgflags & READONLY ? 0 : 1;
        !            16:     bits = FFATTRSLOT;
        !            17:     for (i = 0; mp -> msgattrs[i]; i++)
        !            18:        if (strcmp (mp -> msgattrs[i], current) == 0) {
        !            19:            public = mp -> attrstats & (1 << (bits + i)) ? 0 : 1;
        !            20:            break;
        !            21:        }
        !            22: 
        !            23:     if (!m_seqnew (mp, current, public))
        !            24:        return;
        !            25:     (void) m_seqadd (mp, current, mp -> curmsg = num, public);
        !            26: }

unix.superglobalmegacorp.com

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