Wrap print_buf as C code.