From: Chris Hanson Date: Tue, 22 Jun 1999 01:06:52 +0000 (+0000) Subject: Fix fencepost error in STRING-SEARCH-ALL. X-Git-Tag: 20090517-FFI~4518 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=2b4d6b3055565405e1b94f10378112936dcbb2b0;p=mit-scheme.git Fix fencepost error in STRING-SEARCH-ALL. --- diff --git a/v7/src/runtime/string.scm b/v7/src/runtime/string.scm index afa6eb277..488852f54 100644 --- a/v7/src/runtime/string.scm +++ b/v7/src/runtime/string.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: string.scm,v 14.25 1999/06/21 21:05:24 cph Exp $ +$Id: string.scm,v 14.26 1999/06/22 01:06:52 cph Exp $ Copyright (c) 1988-1999 Massachusetts Institute of Technology @@ -769,7 +769,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (lambda* (compute-last-occurrence-function pattern pstart pend)) (gamma0 (compute-gamma0 pattern pstart pend))) (let ((gamma (compute-good-suffix-function pattern pstart pend gamma0)) - (gamma0+1 (fix:+ gamma0 1)) (tend-m (fix:- tend m)) (m-1 (fix:- m 1))) (let outer ((s tstart) (occurrences '())) @@ -777,7 +776,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (let inner ((pj pend-1) (tj (fix:+ s m-1))) (if (fix:= (vector-8b-ref pattern pj) (vector-8b-ref text tj)) (if (fix:= pstart pj) - (outer (fix:+ s gamma0+1) (cons s occurrences)) + (outer (fix:+ s gamma0) (cons s occurrences)) (inner (fix:- pj 1) (fix:- tj 1))) (outer (fix:+ s (fix:max (fix:- (fix:- pj pstart-1)