dc0d77d7 CE |
1 | #include "stralloc.h" |
2 | #include "byte.h" |
3 | |
4 | int stralloc_copyb(stralloc *sa,const char *s,unsigned int n) |
5 | { |
6 | if (!stralloc_ready(sa,n + 1)) return 0; |
7 | byte_copy(sa->s,n,s); |
8 | sa->len = n; |
9 | sa->s[n] = 'Z'; /* ``offensive programming'' */ |
10 | return 1; |
11 | } |