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