source: trunk/third/nmh/sbr/seq_bits.c @ 12455

Revision 12455, 482 bytes checked in by danw, 26 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r12454, which included commits to RCS files with non-trunk default branches.
Line 
1
2/*
3 * seq_bits.c -- return the snprintb() string for a sequence
4 *
5 * $Id: seq_bits.c,v 1.1.1.1 1999-02-07 18:14:10 danw Exp $
6 */
7
8#include <h/mh.h>
9
10
11char *
12seq_bits (struct msgs *mp)
13{
14    int i;
15    size_t len;
16    static char buffer[BUFSIZ];
17
18    strncpy (buffer, MBITS, sizeof(buffer));
19
20    for (i = 0; mp->msgattrs[i]; i++) {
21        len = strlen (buffer);
22        snprintf (buffer + len, sizeof(buffer) - len,
23                "%c%s", FFATTRSLOT + 1 + i, mp->msgattrs[i]);
24    }
25
26    return buffer;
27}
Note: See TracBrowser for help on using the repository browser.