TRIO_PUBLIC int trio_vsnprintfcat TRIO_ARGS4((buffer, max, format, args), char* buffer, size_t max,
                                             TRIO_CONST char* format, va_list args)
{
	int status;
	size_t buf_len;

	assert(VALID(buffer));
	assert(VALID(format));

	buf_len = trio_length(buffer);
	buffer = &buffer[buf_len];
	status =
	    TrioFormat(&buffer, max - 1 - buf_len, TrioOutStreamStringMax, format, args, NULL, NULL);
	*buffer = NIL;
	return status;
}
TRIO_PUBLIC int trio_vsnprintfcat TRIO_ARGS4((buffer, max, format, args), char* buffer, size_t max,
                                             TRIO_CONST char* format, va_list args)
{
	int status;
	size_t buf_len;

	assert(VALID(buffer));
	assert(VALID(format));

	buf_len = trio_length(buffer);
	buffer = &buffer[buf_len];
	status =
	    TrioFormat(&buffer, max - 1 - buf_len, TrioOutStreamStringMax, format, args, NULL, NULL);
	*buffer = NIL;
	return status;
}