From e468aeb3978300e9355a21879c00e4d42227f696 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 18 May 2004 16:15:12 +0000 Subject: [PATCH] . original commit: 7da358f4d0c49fcca9081b0d8fa5abf90cefc8e8 --- collects/mzlib/port.ss | 6 +++--- collects/mzlib/string.ss | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/collects/mzlib/port.ss b/collects/mzlib/port.ss index 1d0e9e2..eea6f0c 100644 --- a/collects/mzlib/port.ss +++ b/collects/mzlib/port.ss @@ -192,7 +192,7 @@ ;; Not enough even in the special queue. ;; Read once and add it. (let* ([t (make-bytes (min 4096 (+ sk (bytes-length s))))] - [r (read s)]) + [r (read t)]) (cond [(evt? r) ;; We can't deal with an event, so complain @@ -206,7 +206,7 @@ [else (let ([v (if (number? r) (subbytes t 0 r) r)]) - (set-cdr! special-peeked-tail v) + (set-cdr! special-peeked-tail (cons v null)) ;; Got something; now try again (do-peek-it s skip unless-evt))]))] [(eof-object? (car l)) @@ -547,7 +547,7 @@ (let try-again () (let* ([progress-evt (port-progress-evt input-port)] [m ((if poll? - regexp-match-peek-positions* + regexp-match-peek-positions-immediate regexp-match-peek-positions) pattern input-port 0 #f progress-evt)]) (cond diff --git a/collects/mzlib/string.ss b/collects/mzlib/string.ss index 6f45605..dbe8609 100644 --- a/collects/mzlib/string.ss +++ b/collects/mzlib/string.ss @@ -10,7 +10,7 @@ regexp-replace-quote regexp-match* regexp-match-positions* - regexp-match-peek-positions** + regexp-match-peek-positions* regexp-split regexp-match-exact? regexp-match/fail-without-reading) @@ -316,12 +316,12 @@ (wrap regexp-match-positions* -regexp-match-positions*) ;; Returns all the positions at which the pattern matched. - (define -regexp-match-peek-positions** - (regexp-fn 'regexp-match-peek-positions** + (define -regexp-match-peek-positions* + (regexp-fn 'regexp-match-peek-positions* ;; success-k: (lambda (expr string start end match-start match-end) (cons (cons match-start match-end) - (regexp-match-peek-positions** expr string match-end end))) + (regexp-match-peek-positions* expr string match-end end))) ;; port-success-k --- use string case #f ;; fail-k: @@ -331,7 +331,7 @@ #f #f #t)) - (wrap regexp-match-peek-positions** -regexp-match-peek-positions**) + (wrap regexp-match-peek-positions* -regexp-match-peek-positions*) ;; Splits a string into a list by removing any piece which matches ;; the pattern.