]> diplodocus.org Git - nmh/blob - sbr/seq_bits.c
Sigh. I put the documentation about the -tls switch in the long description,
[nmh] / sbr / seq_bits.c
1
2 /*
3 * seq_bits.c -- return the snprintb() string for a sequence
4 *
5 * This code is Copyright (c) 2002, by the authors of nmh. See the
6 * COPYRIGHT file in the root directory of the nmh distribution for
7 * complete copyright information.
8 */
9
10 #include <h/mh.h>
11
12
13 char *
14 seq_bits (struct msgs *mp)
15 {
16 int i;
17 size_t len;
18 static char buffer[BUFSIZ];
19
20 strncpy (buffer, MBITS, sizeof(buffer));
21
22 for (i = 0; mp->msgattrs[i]; i++) {
23 len = strlen (buffer);
24 snprintf (buffer + len, sizeof(buffer) - len,
25 "%c%s", FFATTRSLOT + 1 + i, mp->msgattrs[i]);
26 }
27
28 return buffer;
29 }