release
[hcoop/zz_old/debian/djbdns.git] / stralloc_catb.c
1 #include "stralloc.h"
2 #include "byte.h"
3
4 int stralloc_catb(stralloc *sa,const char *s,unsigned int n)
5 {
6 if (!sa->s) return stralloc_copyb(sa,s,n);
7 if (!stralloc_readyplus(sa,n + 1)) return 0;
8 byte_copy(sa->s + sa->len,n,s);
9 sa->len += n;
10 sa->s[sa->len] = 'Z'; /* ``offensive programming'' */
11 return 1;
12 }