From: Chris Hanson Date: Wed, 21 May 1997 18:01:46 +0000 (+0000) Subject: Read and write .KY files as binary rather than text. X-Git-Tag: 20090517-FFI~5170 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=dcb5fc5c12ade2d6488dbf63de569508f8123124;p=mit-scheme.git Read and write .KY files as binary rather than text. --- diff --git a/v7/src/edwin/os2.scm b/v7/src/edwin/os2.scm index 552dd2907..bd37866ec 100644 --- a/v7/src/edwin/os2.scm +++ b/v7/src/edwin/os2.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: os2.scm,v 1.37 1997/02/12 08:08:16 cph Exp $ +;;; $Id: os2.scm,v 1.38 1997/05/21 18:00:39 cph Exp $ ;;; ;;; Copyright (c) 1994-97 Massachusetts Institute of Technology ;;; @@ -352,7 +352,7 @@ filename suffix \".KY\"." (let ((password (prompt-for-password "Password: "))) (temporary-message "Decrypting file " (->namestring pathname) "...") (insert-string (let ((the-encrypted-file - (call-with-input-file pathname + (call-with-binary-input-file pathname (lambda (port) (read-string (char-set) port))))) (decrypt the-encrypted-file password @@ -378,7 +378,7 @@ filename suffix \".KY\"." (let ((the-encrypted-file (encrypt (extract-string (region-start region) (region-end region)) password))) - (call-with-output-file pathname + (call-with-binary-output-file pathname (lambda (port) (write-string the-encrypted-file port)))) (append-message "done"))) diff --git a/v7/src/edwin/unix.scm b/v7/src/edwin/unix.scm index d36dd7725..56c35e38b 100644 --- a/v7/src/edwin/unix.scm +++ b/v7/src/edwin/unix.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: unix.scm,v 1.75 1997/03/04 06:43:49 cph Exp $ +;;; $Id: unix.scm,v 1.76 1997/05/21 18:01:46 cph Exp $ ;;; ;;; Copyright (c) 1989-97 Massachusetts Institute of Technology ;;; @@ -502,7 +502,7 @@ filename suffix \".KY\"." (let ((password (prompt-for-password "Password: "))) (temporary-message "Decrypting file " (->namestring pathname) "...") (insert-string (let ((the-encrypted-file - (call-with-input-file pathname + (call-with-binary-input-file pathname (lambda (port) (read-string (char-set) port))))) (decrypt the-encrypted-file password @@ -528,7 +528,7 @@ filename suffix \".KY\"." (let ((the-encrypted-file (encrypt (extract-string (region-start region) (region-end region)) password))) - (call-with-output-file pathname + (call-with-binary-output-file pathname (lambda (port) (write-string the-encrypted-file port)))) (append-message "done")))