From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bruce Korb Newsgroups: gmane.lisp.guile.devel Subject: Re: Guile BUG: What's wrong with this? Date: Fri, 06 Jan 2012 15:28:30 -0800 Message-ID: <4F07839E.3090400@gnu.org> References: <4F027F35.5020001@gmail.com> <1325603029.22166.YahooMailNeo@web37906.mail.mud.yahoo.com> <4F032C41.3070300@gmail.com> <87mxa4ifux.fsf@gnu.org> <4F038BF4.1070200@gnu.org> <87obujzmmc.fsf@Kagami.home> <4F048972.5040803@gnu.org> <87lipnm8yx.fsf@Kagami.home> <4F04D01D.5050801@gnu.org> <8762grf28k.fsf@netris.org> <4F05DC47.1000202@gnu.org> <878vlldb4k.fsf@netris.org> <1325811764.22562.YahooMailNeo@web37903.mail.mud.yahoo.com> <87wr95bo9y.fsf@netris.org> <1325857075.77324.YahooMailNeo@web37903.mail.mud.yahoo.com> <877h14bsx0.fsf@netris.org> <4F07747A.4080202@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1325892525 10294 80.91.229.12 (6 Jan 2012 23:28:45 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 6 Jan 2012 23:28:45 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sat Jan 07 00:28:37 2012 Return-path: Envelope-to: guile-devel@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 1RjJDA-0005zb-TJ for guile-devel@m.gmane.org; Sat, 07 Jan 2012 00:28:37 +0100 Original-Received: from localhost ([::1]:59618 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjJDA-0008CN-Dj for guile-devel@m.gmane.org; Fri, 06 Jan 2012 18:28:36 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:52001) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjJD7-0008C2-HZ for guile-devel@gnu.org; Fri, 06 Jan 2012 18:28:34 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RjJD6-00065z-Mi for guile-devel@gnu.org; Fri, 06 Jan 2012 18:28:33 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]:58584) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RjJD6-00065v-Im for guile-devel@gnu.org; Fri, 06 Jan 2012 18:28:32 -0500 Original-Received: from adsl-75-0-186-252.dsl.pltn13.sbcglobal.net ([75.0.186.252]:50166 helo=[10.0.0.2]) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1RjJD5-0001wC-UC for guile-devel@gnu.org; Fri, 06 Jan 2012 18:28:32 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111220 Thunderbird/9.0 In-Reply-To: <4F07747A.4080202@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.10 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:13371 Archived-At: On 01/06/12 14:23, Bruce Korb wrote: Since I'm dead in the water, I've patched the 2.0.3 source: $ diff -u srfi-13.c~ srfi-13.c --- srfi-13.c~ 2011-07-06 15:50:00.000000000 -0700 +++ srfi-13.c 2012-01-06 15:26:44.963324773 -0800 @@ -2088,6 +2088,8 @@ string_upcase_x (SCM v, size_t start, size_t end) { size_t k; + if (start == end) + return v; v = scm_i_string_start_writing (v); for (k = start; k < end; ++k) @@ -2151,6 +2153,8 @@ string_downcase_x (SCM v, size_t start, size_t end) { size_t k; + if (start == end) + return v; v = scm_i_string_start_writing (v); for (k = start; k < end; ++k) @@ -2218,6 +2222,8 @@ SCM ch; size_t i; int in_word = 0; + if (start == end) + return str; str = scm_i_string_start_writing (str); for(i = start; i < end; i++) @@ -2310,6 +2316,8 @@ string_reverse_x (SCM str, size_t cstart, size_t cend) { SCM tmp; + if (cstart == cend) + return; str = scm_i_string_start_writing (str); if (cend > 0)