/* Write data to the buffer if there is space. Whether there is space or not, the buffer pointer is incremented. */
static void append_data(char **ptrp, char *end, const void *data, int size)
/* Write data to the buffer if there is space. Whether there is space or not, the buffer pointer is incremented. */
static void append_data(char **ptrp, char *end, const void *data, int size)
{
	char *ptr = *ptrp;
	*ptrp += size;
	if (*ptrp > end)
		return;
	memcpy(ptr, data, size);
}