File:  [CSRG BSD Unix] / 43BSD / contrib / mh / sbr / m_setcur.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 16:12:54 2018 UTC (8 years, 1 month ago) by root
Branches: MAIN, BSD
CVS tags: HEAD, BSD43
BSD 4.3

/* m_setcur.c - set "cur" */

#include "../h/mh.h"
#include <stdio.h>


void m_setcur (mp, num)
register struct  msgs *mp;
register int     num;
{
    int     bits,
            public;
    register int    i;

    public = mp -> msgflags & READONLY ? 0 : 1;
    bits = FFATTRSLOT;
    for (i = 0; mp -> msgattrs[i]; i++)
	if (strcmp (mp -> msgattrs[i], current) == 0) {
	    public = mp -> attrstats & (1 << (bits + i)) ? 0 : 1;
	    break;
	}

    if (!m_seqnew (mp, current, public))
	return;
    (void) m_seqadd (mp, current, mp -> curmsg = num, public);
}

unix.superglobalmegacorp.com

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