@[typedef]
struct C.va_list {}

fn C.va_start(voidptr, voidptr)
fn C.va_end(voidptr)

fn C.vfprintf(&C.FILE, &char, C.va_list) int

fn C.printf(&char, ...)

fn t2(fmt voidptr, ...) {
	ap := C.va_list{}
	C.va_start(ap, fmt)
	C.vfprintf(C.stdout, fmt, ap)
	C.va_end(ap)
}

fn main() {
	a := 1
	b := 2.5
	t2(c'%s : %d : %.2f\n', c'foo', a, b)
	C.printf(c'%s\n', c'foo')
}
