From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jan Nieuwenhuizen Newsgroups: gmane.lisp.guile.devel Subject: Re: srfi-13 bug2 Date: Mon, 13 Sep 2004 21:30:46 +0200 Organization: Jan at Appel Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <87d60qkluh.fsf_-_@peder.flower> References: <1094681451.3785.368.camel@localhost> <87isan90sd.fsf@peder.flower> <87oekam2lf.fsf_-_@peder.flower> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1095104296 22231 80.91.229.6 (13 Sep 2004 19:38:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 13 Sep 2004 19:38:16 +0000 (UTC) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Sep 13 21:38:01 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1C6wXm-0002kQ-00 for ; Mon, 13 Sep 2004 21:31:19 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C6wdJ-0002U3-So for guile-devel@m.gmane.org; Mon, 13 Sep 2004 15:37:01 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C6wdA-0002T8-U5 for guile-devel@gnu.org; Mon, 13 Sep 2004 15:36:53 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C6wd9-0002SQ-1I for guile-devel@gnu.org; Mon, 13 Sep 2004 15:36:52 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C6wd8-0002Ry-Qv for guile-devel@gnu.org; Mon, 13 Sep 2004 15:36:50 -0400 Original-Received: from [194.109.24.29] (helo=smtp-vbr9.xs4all.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C6wXH-0001CU-GS for guile-devel@gnu.org; Mon, 13 Sep 2004 15:30:47 -0400 Original-Received: from peder.flower (appel.xs4all.nl [80.126.34.178]) by smtp-vbr9.xs4all.nl (8.12.11/8.12.11) with ESMTP id i8DJUkNm041055 for ; Mon, 13 Sep 2004 21:30:47 +0200 (CEST) (envelope-from janneke@gnu.org) Original-Received: from localhost ([127.0.0.1] helo=peder.flower ident=janneke) by peder.flower with esmtp (Exim 4.34) id 1C6wXG-0004hB-HM for guile-devel@gnu.org; Mon, 13 Sep 2004 21:30:46 +0200 Original-To: guile-devel@gnu.org In-Reply-To: <87oekam2lf.fsf_-_@peder.flower> (Jan Nieuwenhuizen's message of "Mon, 13 Sep 2004 20:43:40 +0200") User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) X-Virus-Scanned: by XS4ALL Virus Scanner X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 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 Xref: main.gmane.org gmane.lisp.guile.devel:4122 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:4122 Jan Nieuwenhuizen writes: > Found it. It turns out that > > guile -c '(string-contains "" "a")' > > hangs with guile CVS. See fix below. Too quick. Same for string-contains-ci, of course. Jan. ? do-diff ? doconf Index: libguile/ChangeLog =================================================================== RCS file: /cvsroot/guile/guile/guile-core/libguile/ChangeLog,v retrieving revision 1.2146 diff -p -u -r1.2146 ChangeLog --- libguile/ChangeLog 8 Sep 2004 23:04:08 -0000 1.2146 +++ libguile/ChangeLog 13 Sep 2004 19:29:14 -0000 @@ -1,3 +1,9 @@ +2004-09-13 Jan Nieuwenhuizen + + * srfi-13.c (scm_string_contains, s_scm_string_contains_ci): + Bugfix: when subtracting unsigned values, make sure that result + does not wrap. + 2004-09-09 Kevin Ryde * filesys.c, stime.c (_POSIX_C_SOURCE): Use this only on hpux, it Index: libguile/srfi-13.c =================================================================== RCS file: /cvsroot/guile/guile/guile-core/libguile/srfi-13.c,v retrieving revision 1.4 diff -p -u -r1.4 srfi-13.c --- libguile/srfi-13.c 7 Sep 2004 13:48:49 -0000 1.4 +++ libguile/srfi-13.c 13 Sep 2004 19:29:15 -0000 @@ -2253,7 +2253,7 @@ SCM_DEFINE (scm_string_contains, "string 5, start2, cstart2, 6, end2, cend2); len2 = cend2 - cstart2; - while (cstart1 <= cend1 - len2) + while (cstart1 <= cend1 - len2 && cend1 >= len2) { i = cstart1; j = cstart2; @@ -2299,7 +2299,7 @@ SCM_DEFINE (scm_string_contains_ci, "str 5, start2, cstart2, 6, end2, cend2); len2 = cend2 - cstart2; - while (cstart1 <= cend1 - len2) + while (cstart1 <= cend1 - len2 && cend1 >= len2) { i = cstart1; j = cstart2; -- Jan Nieuwenhuizen | GNU LilyPond - The music typesetter http://www.xs4all.nl/~jantien | http://www.lilypond.org _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel