From 9c7f2562a229d6182ca928ff65e2b2c41ae9e4e4 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Wed, 19 Nov 1997 23:40:59 +0000 Subject: [PATCH] Change interface to process-filter. --- v7/src/edwin/process.scm | 7 +++---- v7/src/edwin/telnet.scm | 23 +++++++++++------------ 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/v7/src/edwin/process.scm b/v7/src/edwin/process.scm index 01369b956..a1d229ef7 100644 --- a/v7/src/edwin/process.scm +++ b/v7/src/edwin/process.scm @@ -1,8 +1,8 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: process.scm,v 1.51 1996/05/24 07:33:41 cph Exp $ +;;; $Id: process.scm,v 1.52 1997/11/19 23:40:59 cph Exp $ ;;; -;;; Copyright (c) 1991-96 Massachusetts Institute of Technology +;;; Copyright (c) 1991-97 Massachusetts Institute of Technology ;;; ;;; This material was developed by the Scheme project at the ;;; Massachusetts Institute of Technology, Department of @@ -404,8 +404,7 @@ Initialized from the SHELL environment variable." (cond ((process-filter process) => (lambda (filter) - (filter string 0 length) - true)) + (filter process string 0 length))) ((process-mark process) => (lambda (mark) diff --git a/v7/src/edwin/telnet.scm b/v7/src/edwin/telnet.scm index 22fb68da4..302deb76e 100644 --- a/v7/src/edwin/telnet.scm +++ b/v7/src/edwin/telnet.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: telnet.scm,v 1.10 1997/03/04 06:43:46 cph Exp $ +$Id: telnet.scm,v 1.11 1997/11/19 23:40:53 cph Exp $ Copyright (c) 1991-97 Massachusetts Institute of Technology @@ -128,17 +128,16 @@ With prefix arg, the character is repeated that many times." ((> argument 1) (process-send-string process (make-string argument char))))))) -(define (make-telnet-filter process) - (lambda (string start end) - (let ((mark (process-mark process))) - (and mark - (let ((index (mark-index mark)) - (new-string (telnet-filter-substring string start end))) - (let ((new-length (string-length new-string))) - (group-insert-substring! (mark-group mark) index - new-string 0 new-length) - (set-mark-index! mark (+ index new-length)) - true)))))) +(define (telnet-filter process string start end) + (let ((mark (process-mark process))) + (and mark + (let ((index (mark-index mark)) + (new-string (telnet-filter-substring string start end))) + (let ((new-length (string-length new-string))) + (group-insert-substring! (mark-group mark) index + new-string 0 new-length) + (set-mark-index! mark (+ index new-length)) + #t))))) (define (telnet-filter-substring string start end) (substring-substitute string start end -- 2.25.1