1 /* m_seq.c - print out a message sequence */
3 static char ident[] = "@(#)$Id: m_seq.c,v 1.8 1992/12/15 00:20:22 jromine Exp $";
9 /* new version from VJ 2/90 - faster? */
19 static char buffer[BUFSIZ*2]; /* for big sequences */
21 if (strcmp (current, cp) == 0) {
22 /* assume this is in sync with msgstats["cur"] */
23 /* see m_seqadd() for details */
25 (void) sprintf(buffer, "%s", m_name(mp->curmsg));
30 for (i = 0; mp->msgattrs[i]; i++)
31 if (strcmp(mp->msgattrs[i], cp) == 0)
34 if (! mp->msgattrs[i])
37 mask = EXISTS | (1 << (FFATTRSLOT + i));
39 for (i = mp->lowmsg; i <= mp->hghmsg; ++i) {
40 if ((mp->msgstats[i] & mask) != mask)
46 (void) sprintf(bp, "%s", m_name(i));
49 for (++i; i <= mp->hghmsg && (mp->msgstats[i] & mask) == mask;
53 (void) sprintf(bp, "-%s", m_name(i - 1));
57 return (bp > buffer? buffer : NULL);