unsigned int buffer_tobuffer(buffer_t *to, buffer_t *from, int cap)
static unsigned int buffer_tobuffer(buffer_t *to, buffer_t *from, int cap)
unsigned int buffer_tobuffer(buffer_t *to, buffer_t *from, int cap){	unsigned int moved, tomove = from->used;	if((int)tomove > cap)		tomove = cap;	if(tomove == 0)		return 0;	moved = buffer_adddata(to, from->data, tomove);	if(moved == 0)		return 0;	buffer_takedata(from, NULL, moved);	return moved;}