#include <stdarg.h>
#include <stdio.h>

struct S { int i; int j; };

void f(int x, ...) {
  va_list ap;
  va_start(ap, x);
  for (;;) {
  	struct S s = va_arg(ap, struct S);
  	if (!s.i) break;
  	printf("%d %d\n", s.i, s.j);
  }
  va_end(ap);
}

int main(void) {
	struct S s = {5, 6}, t = {7, 8}, z = {0, 0};
	f(0, s, t, z);
}
