diff options
author | Ian Price <ianprice90@googlemail.com> | 2012-01-27 06:38:09 +0000 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2012-03-07 23:54:24 -0500 |
commit | be79627c21ba0848af3ac7bea25293170fec6480 (patch) | |
tree | 8914ba7f3178b0b9800181fbc1f77120e82e1262 | |
parent | da35d2eaa9dbc1d3cf098c9a1c9bc62dcb2515bd (diff) | |
download | guile-be79627c21ba0848af3ac7bea25293170fec6480.tar.gz |
Fix flush on soft ports, so that it actually runs.
* libguile/vports.c (sf_flush): Remove conditional testing the
position in the port's write_buf, as it is no longer used.
-rw-r--r-- | libguile/vports.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/libguile/vports.c b/libguile/vports.c index 5178d79c7..75e7df303 100644 --- a/libguile/vports.c +++ b/libguile/vports.c @@ -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 |