From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ian Price Newsgroups: gmane.lisp.guile.bugs Subject: bug#10616: flush procedure for soft ports isn't called Date: Fri, 27 Jan 2012 20:51:52 +0000 Message-ID: <87obtoyil3.fsf@Kagami.home> References: <878vkuyv1e.fsf@Kagami.home> <874nvhzokk.fsf@Kagami.home> <87zkd9y80s.fsf@Kagami.home> <87vcnxy78b.fsf@Kagami.home> <8762fwublq.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1327697980 11525 80.91.229.12 (27 Jan 2012 20:59:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 27 Jan 2012 20:59:40 +0000 (UTC) Cc: 10616@debbugs.gnu.org To: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Fri Jan 27 21:59:28 2012 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RqstL-0003yx-KI for guile-bugs@m.gmane.org; Fri, 27 Jan 2012 21:59:28 +0100 Original-Received: from localhost ([::1]:55551 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqstL-0004cq-2C for guile-bugs@m.gmane.org; Fri, 27 Jan 2012 15:59:27 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:43712) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqstI-0004cZ-OA for bug-guile@gnu.org; Fri, 27 Jan 2012 15:59:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RqstH-0003pz-Dv for bug-guile@gnu.org; Fri, 27 Jan 2012 15:59:24 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41685) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RqstH-0003pv-B1 for bug-guile@gnu.org; Fri, 27 Jan 2012 15:59:23 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Rqstu-0004WP-2V for bug-guile@gnu.org; Fri, 27 Jan 2012 16:00:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ian Price Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Fri, 27 Jan 2012 21:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 10616 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 10616-submit@debbugs.gnu.org id=B10616.132769799117340 (code B ref 10616); Fri, 27 Jan 2012 21:00:02 +0000 Original-Received: (at 10616) by debbugs.gnu.org; 27 Jan 2012 20:59:51 +0000 Original-Received: from localhost ([127.0.0.1]:47072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rqsti-0004Va-Dj for submit@debbugs.gnu.org; Fri, 27 Jan 2012 15:59:51 -0500 Original-Received: from mail-we0-f172.google.com ([74.125.82.172]:39432) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Rqstf-0004VL-Px for 10616@debbugs.gnu.org; Fri, 27 Jan 2012 15:59:48 -0500 Original-Received: by werm10 with SMTP id m10so1570288wer.3 for <10616@debbugs.gnu.org>; Fri, 27 Jan 2012 12:59:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=m72jpdGwt1dzncUoCJNflcXCwmrFs9qg5xHZtysiSG0=; b=v90jN/dRvW16uDqHXs203dgqwUIAdkoDuIIIT8aUYbflZE2H42A4LLuvSp5EtqPMYA EJz+Ag5Jm8OYZo+S0DxRG+cjJfrS0fBm5DjSTmB4mOR/yRwm10diLI4ccW/1g/6wWyly fGV/nuEo5sLiPcQea1MyNsem2dZ9xgg3CVPn8= Original-Received: by 10.216.133.141 with SMTP id q13mr3656093wei.1.1327697942662; Fri, 27 Jan 2012 12:59:02 -0800 (PST) Original-Received: from Kagami.home (host86-161-100-160.range86-161.btcentralplus.com. [86.161.100.160]) by mx.google.com with ESMTPS id t6sm14316167wid.1.2012.01.27.12.59.01 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 27 Jan 2012 12:59:01 -0800 (PST) In-Reply-To: <8762fwublq.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Fri, 27 Jan 2012 21:36:17 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:6099 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Hi Ian, > > I fail to see the patch, and to retrieve it from > . Could you resend it inline? Bah, that's twice this has happened recently. --=20 Ian Price "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled" --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Fix-flush-on-soft-ports-so-that-it-actually-runs.patch Content-Description: soft port patch >From 8a9524014ce85fb34fe5cfd7a2667395ce0cdf5d Mon Sep 17 00:00:00 2001 From: Ian Price 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 --=-=-=--