]> pd.if.org Git - pdclib/blobdiff - functions/stdio/setbuf.c
Re-import from Subversion.
[pdclib] / functions / stdio / setbuf.c
index 6d689b0f3f0fc2f8fdf66fb7cba894abfbd1a318..163f1f550e749def67d7397bee05e6ece986c94c 100644 (file)
@@ -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);
+}
+*/