Fix flush on soft ports, so that it actually runs.
authorIan Price <ianprice90@googlemail.com>
Fri, 27 Jan 2012 06:38:09 +0000 (06:38 +0000)
committerMark H Weaver <mhw@netris.org>
Thu, 8 Mar 2012 04:54:24 +0000 (23:54 -0500)
* libguile/vports.c (sf_flush): Remove conditional testing the
  position in the port's write_buf, as it is no longer used.

libguile/vports.c

index 5178d79..75e7df3 100644 (file)
@@ -56,21 +56,11 @@ sf_flush (SCM port)
   scm_t_port *pt = SCM_PTAB_ENTRY (port);
   SCM stream = SCM_PACK (pt->stream);
 
-  if (pt->write_pos > pt->write_buf)
-    {
-      /* write the byte. */
-      scm_call_1 (SCM_SIMPLE_VECTOR_REF (stream, 0),
-                 SCM_MAKE_CHAR (*pt->write_buf));
-      pt->write_pos = pt->write_buf;
-  
-      /* flush the output.  */
-      {
-       SCM f = SCM_SIMPLE_VECTOR_REF (stream, 2);
+  SCM f = SCM_SIMPLE_VECTOR_REF (stream, 2);
+
+  if (scm_is_true (f))
+    scm_call_0 (f);
 
-       if (scm_is_true (f))
-         scm_call_0 (f);
-      }
-    }
 }
 
 static void