Mercurial > hg > Applications > mh
diff sbr/m_seqbits.c @ 0:bce86c4163a3
Initial revision
author | kono |
---|---|
date | Mon, 18 Apr 2005 23:46:02 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sbr/m_seqbits.c Mon Apr 18 23:46:02 2005 +0900 @@ -0,0 +1,21 @@ +/* m_seqbits.c - return the sprintb() string for a sequence */ + +#include "../h/mh.h" +#include <stdio.h> + + +char *m_seqbits (mp) +register struct msgs *mp; +{ + int bits; + register int i; + static char buffer[BUFSIZ]; + + bits = FFATTRSLOT; + (void) strcpy (buffer, MBITS); + for (i = 0; mp -> msgattrs[i]; i++) + (void) sprintf (buffer + strlen (buffer), "%c%s", + bits + i + 1, mp -> msgattrs[i]); + + return buffer; +}