1
0
Fork 0
qmail/stralloc_opyb.c
D. J. Bernstein af9625ddf9 qmail 1.01
2009-12-18 13:07:04 +01:00

14 lines
255 B
C

#include "stralloc.h"
#include "byte.h"
int stralloc_copyb(sa,s,n)
stralloc *sa;
char *s;
unsigned int n;
{
if (!stralloc_ready(sa,n + 1)) return 0;
byte_copy(sa->s,n,s);
sa->len = n;
sa->s[n] = 'Z'; /* ``offensive programming'' */
return 1;
}