X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=functions%2Fstdio%2Fsetbuf.c;h=163f1f550e749def67d7397bee05e6ece986c94c;hb=refs%2Ftags%2FOLD;hp=6d689b0f3f0fc2f8fdf66fb7cba894abfbd1a318;hpb=34893ecc2200dc7017c36a54cb6c5f4c2378b5ec;p=pdclib diff --git a/functions/stdio/setbuf.c b/functions/stdio/setbuf.c index 6d689b0..163f1f5 100644 --- a/functions/stdio/setbuf.c +++ b/functions/stdio/setbuf.c @@ -1,8 +1,24 @@ -// ---------------------------------------------------------------------------- -// $Id$ -// ---------------------------------------------------------------------------- -// Public Domain C Library - http://pdclib.sourceforge.net -// This code is Public Domain. Use, modify, and redistribute at will. -// ---------------------------------------------------------------------------- +/* ---------------------------------------------------------------------------- + * $Id$ + * ---------------------------------------------------------------------------- + * Public Domain C Library - http://pdclib.sourceforge.net + * This code is Public Domain. Use, modify, and redistribute at will. + * --------------------------------------------------------------------------*/ void setbuf( FILE * restrict stream, char * restrict buf ) { /* TODO */ }; + +/* PDPC code - unreviewed +{ + int ret; + + if (buf == NULL) + { + ret = setvbuf(stream, NULL, _IONBF, 0); + } + else + { + ret = setvbuf(stream, buf, _IOFBF, BUFSIZ); + } + return (ret); +} +*/