#include void setbuf(FILE * restrict fp, char * restrict buf) { if(buf) { setvbuf(fp, buf, _IOFBF, BUFSIZ); } else { setvbuf(fp, buf, _IONBF, 0); } }