/* $Id$ */ /* Release $Name$ */ /* setbuf( FILE *, char * ) This file is part of the Public Domain C Library (PDCLib). Permission is granted to use, modify, and / or redistribute at will. */ #include #ifndef REGTEST void setbuf( FILE * _PDCLIB_restrict stream, char * _PDCLIB_restrict buf ) { /* TODO: Only allowed on a "virgin" stream; add check. */ if ( buf == NULL ) { setvbuf( stream, buf, _IONBF, BUFSIZ ); } else { setvbuf( stream, buf, _IOFBF, BUFSIZ ); } } #endif #ifdef TEST #include <_PDCLIB_test.h> int main( void ) { TESTCASE( NO_TESTDRIVER ); return TEST_RESULTS; } #endif