unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Ian Price <ianprice90@googlemail.com>
To: ludo@gnu.org (Ludovic Courtès)
Cc: 10616@debbugs.gnu.org
Subject: bug#10616: flush procedure for soft ports isn't called
Date: Fri, 27 Jan 2012 20:51:52 +0000	[thread overview]
Message-ID: <87obtoyil3.fsf@Kagami.home> (raw)
In-Reply-To: <8762fwublq.fsf@gnu.org> ("Ludovic Courtès"'s message of "Fri, 27 Jan 2012 21:36:17 +0100")

[-- Attachment #1: Type: text/plain, Size: 365 bytes --]

ludo@gnu.org (Ludovic Courtès) writes:

> Hi Ian,
>
> I fail to see the patch, and to retrieve it from
> <http://bugs.gnu.org/10616>.  Could you resend it inline?
Bah, that's twice this has happened recently.

-- 
Ian Price

"Programming is like pinball. The reward for doing it well is
the opportunity to do it again" - from "The Wizardy Compiled"


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: soft port patch --]
[-- Type: text/x-patch, Size: 1179 bytes --]

From 8a9524014ce85fb34fe5cfd7a2667395ce0cdf5d Mon Sep 17 00:00:00 2001
From: Ian Price <ianprice90@googlemail.com>
Date: Fri, 27 Jan 2012 06:38:09 +0000
Subject: [PATCH] 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.
---
 libguile/vports.c |   18 ++++--------------
 1 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/libguile/vports.c b/libguile/vports.c
index 5178d79..75e7df3 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
-- 
1.7.7.6


  reply	other threads:[~2012-01-27 20:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-26 22:10 bug#10616: flush procedure for soft ports isn't called Ian Price
2012-01-27  5:44 ` Ian Price
2012-01-27  6:27   ` Ian Price
2012-01-27  6:44     ` Ian Price
2012-01-27 20:36       ` Ludovic Courtès
2012-01-27 20:51         ` Ian Price [this message]
2012-03-08  5:06           ` Mark H Weaver
2012-03-08 13:53           ` Ludovic Courtès
2012-03-08 15:39             ` Mark H Weaver
2012-03-10 22:14               ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87obtoyil3.fsf@Kagami.home \
    --to=ianprice90@googlemail.com \
    --cc=10616@debbugs.gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).