if (n < cbuf->maxlen - cbuf->end - 1 + e) {
dprintf("s[%d] -> d[%d] (%d)\n", 0, cbuf->end + !e, n);
memcpy(cbuf->buf + cbuf->end + !e, c, n);
if (n < cbuf->maxlen - cbuf->end - 1 + e) {
dprintf("s[%d] -> d[%d] (%d)\n", 0, cbuf->end + !e, n);
memcpy(cbuf->buf + cbuf->end + !e, c, n);