20 #define N_GNEW(n,t) (t*)malloc((n)*sizeof(t))
51 size = (size_t) (xb->
eptr - xb->
buf);
53 if (size + ssz > nsize)
55 cnt = (size_t) (xb->
ptr - xb->
buf);
57 nbuf = realloc(xb->
buf, nsize);
59 nbuf =
N_GNEW(nsize,
unsigned char);
60 memcpy(nbuf, xb->
buf, cnt);
76 memcpy(xb->
ptr, s, ssz);
86 size_t ssz = strlen(s);
size_t agxbput(agxbuf *xb, const char *s)
void agxbinit(agxbuf *xb, unsigned int hint, unsigned char *init)
size_t agxbput_n(agxbuf *xb, const char *s, size_t ssz)
void agxbfree(agxbuf *xb)
int agxbmore(agxbuf *xb, size_t ssz)