12 lines
169 B
C
12 lines
169 B
C
|
#include <stdio.h>
|
||
|
|
||
|
void setbuf(FILE * restrict fp, char * restrict buf)
|
||
|
{
|
||
|
if(buf) {
|
||
|
setvbuf(fp, buf, _IOFBF, BUFSIZ);
|
||
|
}
|
||
|
else {
|
||
|
setvbuf(fp, buf, _IONBF, 0);
|
||
|
}
|
||
|
}
|