From: Chris Hanson Date: Thu, 1 Jun 2000 19:29:05 +0000 (+0000) Subject: When decoding BASE64 text strings, must return two values. X-Git-Tag: 20090517-FFI~3645 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=857aef1f08c7dafcb68c977dfd3d05469323cbbd;p=mit-scheme.git When decoding BASE64 text strings, must return two values. --- diff --git a/v7/src/imail/mime-codec.scm b/v7/src/imail/mime-codec.scm index d2dd123fc..4ef81b9e0 100644 --- a/v7/src/imail/mime-codec.scm +++ b/v7/src/imail/mime-codec.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: mime-codec.scm,v 1.5 2000/06/01 18:25:37 cph Exp $ +;;; $Id: mime-codec.scm,v 1.6 2000/06/01 19:29:05 cph Exp $ ;;; ;;; Copyright (c) 2000 Massachusetts Institute of Technology ;;; @@ -100,23 +100,24 @@ pending-return?)) (define (decode-base64-text-substring string start end pending-return?) - (decode-base64-internal string start end - (lambda (port) - (lambda (char) - (if pending-return? - (case char - ((#\linefeed) - (set! pending-return? #f) - (newline port)) - ((#\return) - (write-char #\return port)) - (else - (set! pending-return? #f) - (write-char #\return port))) - (if (char=? char #\return) - (set! pending-return? #t) - (write-char char port)))))) - pending-return?) + (let ((result + (decode-base64-internal string start end + (lambda (port) + (lambda (char) + (if pending-return? + (case char + ((#\linefeed) + (set! pending-return? #f) + (newline port)) + ((#\return) + (write-char #\return port)) + (else + (set! pending-return? #f) + (write-char #\return port))) + (if (char=? char #\return) + (set! pending-return? #t) + (write-char char port)))))))) + (values result pending-return?))) (define (decode-base64-internal string start end make-output) (let ((input (string->input-port string start end)))