Read and write .KY files as binary rather than text.
authorChris Hanson <org/chris-hanson/cph>
Wed, 21 May 1997 18:01:46 +0000 (18:01 +0000)
committerChris Hanson <org/chris-hanson/cph>
Wed, 21 May 1997 18:01:46 +0000 (18:01 +0000)
v7/src/edwin/os2.scm
v7/src/edwin/unix.scm

index 552dd29074f464dd80229926db05a7b08f88ab34..bd37866ec5c08b5c229e4c4d850e15faf92c96c7 100644 (file)
@@ -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")))
index d36dd772531d0d8e3af792ccd7e665394fd6a62b..56c35e38b47fce6110ff5648e53f60cbd72cb0ba 100644 (file)
@@ -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")))