From: Chris Hanson Date: Sat, 27 May 2000 00:10:12 +0000 (+0000) Subject: Implement SKIP-LWSP-BACKWARDS. X-Git-Tag: 20090517-FFI~3672 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=a1798b313c2d7acbbe1e1b52cb615e54bd77457f;p=mit-scheme.git Implement SKIP-LWSP-BACKWARDS. --- diff --git a/v7/src/imail/imail-util.scm b/v7/src/imail/imail-util.scm index 65b9586f1..55f6bc560 100644 --- a/v7/src/imail/imail-util.scm +++ b/v7/src/imail/imail-util.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imail-util.scm,v 1.25 2000/05/23 03:55:08 cph Exp $ +;;; $Id: imail-util.scm,v 1.26 2000/05/27 00:10:12 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -126,6 +126,13 @@ (define char-set:lwsp (char-set #\space #\tab)) +(define (skip-lwsp-backwards string start end) + (let loop ((end end)) + (if (and (fix:< start end) + (char-lwsp? (string-ref string (fix:- end 1)))) + (loop (fix:- end 1)) + end))) + (define (quote-lines lines) (map (lambda (line) (string-append "\t" line)) @@ -170,12 +177,6 @@ (if (default-object? line-ending) "\n" line-ending) lines)) -(define (short-name->pathname name) - (merge-pathnames name (current-home-directory))) - -(define (pathname->short-name pathname) - (enough-namestring pathname (current-home-directory))) - (define (write-header-fields headers port) (for-each (lambda (header) (write-header-field header port))