]> pd.if.org Git - pdclib/blobdiff - functions/stdio/ungetc.c
Re-import from Subversion.
[pdclib] / functions / stdio / ungetc.c
index c355afcd0c7c4b9f7f5336f3ac5ad94a93a470db..1bd7323ba80eb7345f26586de79d48912e386439 100644 (file)
@@ -1,8 +1,20 @@
-// ----------------------------------------------------------------------------
-// $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.
+ * --------------------------------------------------------------------------*/
 
 int ungetc( int c, FILE * stream ) { /* TODO */ };
+
+/* PDPC code - unreviewed
+{
+    if ((stream->ungetCh != -1) || (c == EOF))
+    {
+        return (EOF);
+    }
+    stream->ungetCh = (unsigned char)c;
+    stream->quickText = 0;
+    return ((unsigned char)c);
+}
+*/