1#include <stdio.h> 2 3void setbuf(FILE* restrict f, char* restrict buf) { 4 setvbuf(f, buf, buf ? _IOFBF : _IONBF, BUFSIZ); 5} 6