Rename all binary I/O procedures to "legacy".
authorChris Hanson <org/chris-hanson/cph>
Fri, 13 Jan 2017 20:11:00 +0000 (12:11 -0800)
committerChris Hanson <org/chris-hanson/cph>
Fri, 13 Jan 2017 20:11:00 +0000 (12:11 -0800)
18 files changed:
src/blowfish/blowfish-check.scm
src/blowfish/blowfish.scm
src/edwin/docstr.scm
src/edwin/filcom.scm
src/edwin/sendmail.scm
src/imail/imail-rmail.scm
src/imail/imail-top.scm
src/imail/imail-umail.scm
src/imail/imail-util.scm
src/md5/md5.scm
src/mhash/mhash.scm
src/runtime/blowfish.scm
src/runtime/cpress.scm
src/runtime/crypto.scm
src/runtime/fileio.scm
src/runtime/infutl.scm
src/runtime/load.scm
src/runtime/runtime.pkg

index 0da3acd65fd7c2d770944194ad644a59842b0682..e5e4e30b334d1d4f3232a440afd09b187026b006 100644 (file)
@@ -27,7 +27,7 @@ USA.
 ;;;; Test the BLOWFISH option.
 
 (let ((sample "Some text to encrypt and decrypt."))
-  (call-with-binary-output-file "test"
+  (call-with-legacy-binary-output-file "test"
     (lambda (output)
       (call-with-input-string sample
        (lambda (input)
@@ -35,7 +35,7 @@ USA.
                                 (write-blowfish-file-header output)
                                 #t)))))
   (let ((read-back
-        (call-with-binary-input-file "test"
+        (call-with-legacy-binary-input-file "test"
           (lambda (input)
             (call-with-output-string
              (lambda (output)
index d10fd834cb462c799c0d446ee85872795d74903c..fbd881fcbc8bcb20b13046c8e112c49a976b7d2b 100644 (file)
@@ -227,7 +227,7 @@ USA.
           (error:bad-range-argument port 'READ-BLOWFISH-FILE-HEADER)))))
 
 (define (blowfish-file? pathname)
-  (let ((line (call-with-binary-input-file pathname read-line)))
+  (let ((line (call-with-legacy-binary-input-file pathname read-line)))
     (and (not (eof-object? line))
         (or (string=? line blowfish-file-header-v1)
             (string=? line blowfish-file-header-v2)))))
index 7556845689dae474f2cd1384f651ef34dc2737e3..3731297cbb0c12c238bb99fc5ee23c06be64a4b6 100644 (file)
@@ -143,7 +143,7 @@ USA.
            output
            permanent)) 
   (set-string-length! *doc-strings* *doc-string-posn*)
-  (call-with-binary-output-file
+  (call-with-legacy-binary-output-file
    output
    (lambda (port)
      (output-port/write-string port *doc-strings*)))
index fea998b69541621ee8a74186f0a2b2672b3c93e0..2ee4ee37cf2b46154d46d0c0d75320bb28d973f7 100644 (file)
@@ -667,7 +667,7 @@ Prefix arg means treat the plaintext file as binary data."
                           " already exists; overwrite")))
        (begin
         ((if binary-plaintext?
-             call-with-binary-input-file
+             call-with-legacy-binary-input-file
              call-with-input-file)
          from
          (lambda (input)
@@ -687,7 +687,7 @@ Prefix arg means treat the plaintext file as binary data."
                           " already exists; overwrite")))
        (begin
         ((if binary-plaintext?
-             call-with-binary-output-file
+             call-with-legacy-binary-output-file
              call-with-output-file)
          to
          (lambda (output)
@@ -699,7 +699,7 @@ Prefix arg means treat the plaintext file as binary data."
         #t)))
 
 (define (%blowfish-encrypt-file pathname input)
-  (call-with-binary-output-file pathname
+  (call-with-legacy-binary-output-file pathname
     (lambda (output)
       (call-with-sensitive-string (call-with-confirmed-pass-phrase md5-string)
        (lambda (key-string)
@@ -708,7 +708,7 @@ Prefix arg means treat the plaintext file as binary data."
                                 #t))))))
 
 (define (%blowfish-decrypt-file pathname output)
-  (call-with-binary-input-file pathname
+  (call-with-legacy-binary-input-file pathname
     (lambda (input)
       (call-with-sensitive-string
        (call-with-pass-phrase "Pass phrase" md5-string)
index 2d2fe4a5f909c29d7a5a4f95c0205b700812d0d2..e632cb6bd064dbb8a90ee11f5c8923cbba5cd456 100644 (file)
@@ -1457,7 +1457,7 @@ the user from the mailer."
          (let ((context (initialize port text?)))
            ((if (eq? type 'TEXT)
                 call-with-input-file
-                call-with-binary-input-file)
+                call-with-legacy-binary-input-file)
             (mime-attachment-pathname attachment)
             (lambda (input-port)
               (let ((buffer (make-string 4096)))
index ee1eb20473c7aaf0b91197b2ea7764035ff306ee..81ebbaa8c4b0dd27695bd0f6ba9fc508a5def9cd 100644 (file)
@@ -38,7 +38,7 @@ USA.
 
 (define-method create-file-folder-file (url (type <rmail-folder-type>))
   type
-  (call-with-binary-output-file (pathname-url-pathname url)
+  (call-with-legacy-binary-output-file (pathname-url-pathname url)
     (lambda (port)
       (write-rmail-file-header (make-rmail-folder-header-fields '()) port))))
 
@@ -233,7 +233,7 @@ USA.
 ;;;; Write RMAIL file
 
 (define-method write-file-folder ((folder <rmail-folder>) pathname)
-  (call-with-binary-output-file pathname
+  (call-with-legacy-binary-output-file pathname
     (lambda (port)
       (write-rmail-file-header (rmail-folder-header-fields folder) port)
       (for-each-vector-element (file-folder-messages folder)
@@ -243,7 +243,7 @@ USA.
 
 (define-method append-message-to-file (message url (type <rmail-folder-type>))
   type
-  (call-with-binary-append-file (pathname-url-pathname url)
+  (call-with-legacy-binary-append-file (pathname-url-pathname url)
     (lambda (port)
       (write-rmail-message message port))))
 
index 8b9d901a883d5dfc91ac88f82a4c6a8fa71f6477..9f41b76333e79f8cacde3136c2eed64f7bc20834 100644 (file)
@@ -1097,7 +1097,7 @@ With prefix argument, prompt even when point is on an attachment."
                 (eq? type 'MESSAGE)))))
       (if (or (not (file-exists? filename))
              (prompt-for-yes-or-no? "File already exists; overwrite"))
-         ((if text? call-with-output-file call-with-binary-output-file)
+         ((if text? call-with-output-file call-with-legacy-binary-output-file)
           filename
           (lambda (port)
             (call-with-mime-decoding-output-port
index 9643afb2edd74d4e551e68fa54ccd64c3055c973..f5906cb998770562d129722902eb724bdb3df6a6 100644 (file)
@@ -38,7 +38,7 @@ USA.
 
 (define-method create-file-folder-file (url (type <umail-folder-type>))
   type
-  (call-with-binary-output-file (pathname-url-pathname url)
+  (call-with-legacy-binary-output-file (pathname-url-pathname url)
     (lambda (port)
       port
       unspecific)))
@@ -144,7 +144,7 @@ USA.
 ;;;; Write unix mail file
 
 (define-method write-file-folder ((folder <umail-folder>) pathname)
-  (call-with-binary-output-file pathname
+  (call-with-legacy-binary-output-file pathname
     (lambda (port)
       (for-each-vector-element (file-folder-messages folder)
        (lambda (message)
@@ -153,7 +153,7 @@ USA.
 
 (define-method append-message-to-file (message url (type <umail-folder-type>))
   type
-  (call-with-binary-append-file (pathname-url-pathname url)
+  (call-with-legacy-binary-append-file (pathname-url-pathname url)
     (lambda (port)
       (write-umail-message message #t port))))
 
index ef546ff1617fee6c32bc1bf5284f0e119969ab10..b1476200763bbb222fb7069525040b59e8202405 100644 (file)
@@ -423,7 +423,7 @@ USA.
 ;;;; Extended-string input port
 
 (define (read-file-into-xstring pathname)
-  (call-with-binary-input-file pathname
+  (call-with-legacy-binary-input-file pathname
     (lambda (port)
       (let ((n-bytes ((port/operation port 'LENGTH) port)))
        (let ((xstring (make-string n-bytes)))
index 0649f0555947d7db7ea14b961d43f202450ea1fe..6fd1a56813d042810b92e269ca731d68be7d500f 100644 (file)
@@ -68,7 +68,7 @@ USA.
     result))
 
 (define (md5-file filename)
-  (call-with-binary-input-file filename
+  (call-with-legacy-binary-input-file filename
     (lambda (port)
       (let ((buffer (make-string 4096))
            (context (%md5-init)))
index 4ed16fe72e2af97d657efa110f16079fa5f8c20d..2b23a8bcbd6dafe26dffa05a86abc06d4f51e9ea 100644 (file)
@@ -393,7 +393,7 @@ USA.
   unspecific)
 
 (define (mhash-file hash-type filename)
-  (call-with-binary-input-file filename
+  (call-with-legacy-binary-input-file filename
     (lambda (port)
       (let ((buffer (make-string 4096))
            (context (mhash-init hash-type)))
index e2996c7aeafae65780bad364f3101464f4276fc1..9534d69af7afd3f404276eee52413cffa26688d0 100644 (file)
@@ -95,7 +95,7 @@ USA.
           (error:bad-range-argument port 'READ-BLOWFISH-FILE-HEADER)))))
 
 (define (blowfish-file? pathname)
-  (let ((line (call-with-binary-input-file pathname read-line)))
+  (let ((line (call-with-legacy-binary-input-file pathname read-line)))
     (and (not (eof-object? line))
         (or (string=? line blowfish-file-header-v1)
             (string=? line blowfish-file-header-v2)))))
index 3c63f54747a479173f1801f3663073fe6cdf0035..ed7c4a529d51522d35bc9700a7bc750aa2509bfd 100644 (file)
@@ -86,9 +86,9 @@ USA.
 ;;; determines the algorithm.
 \f
 (define (compress ifile ofile)
-  (call-with-binary-input-file (merge-pathnames ifile)
+  (call-with-legacy-binary-input-file (merge-pathnames ifile)
     (lambda (input)
-      (call-with-binary-output-file (merge-pathnames ofile)
+      (call-with-legacy-binary-output-file (merge-pathnames ofile)
         (lambda (output)
          (write-string "Compressed-B1-1.00" output)
          (compress-ports input output))))))
index 10d8eeaa07c95c7ca6d4f11cde1e5ae1fa0b2847..5e22c64e1a138c2c2e7d03f568744f91eec0ae52 100644 (file)
@@ -240,7 +240,7 @@ USA.
   unspecific)
 
 (define (mhash-file hash-type filename)
-  (call-with-binary-input-file filename
+  (call-with-legacy-binary-input-file filename
     (lambda (port)
       (let ((buffer (make-string 4096))
            (context (mhash-init hash-type)))
@@ -304,7 +304,7 @@ USA.
         (error "This Scheme system was built without MD5 support."))))
 
 (define (%md5-file filename)
-  (call-with-binary-input-file filename
+  (call-with-legacy-binary-input-file filename
     (lambda (port)
       (let ((buffer (make-string 4096))
            (context ((ucode-primitive md5-init 0))))
index f4047bbe5a44193f679a1b8391bfa9d6e644b198..e279a2dfcbf1339b773068bb1aef5cf5e20f66da 100644 (file)
@@ -133,7 +133,7 @@ USA.
     (port/set-line-ending port (file-line-ending pathname))
     port))
 
-(define (open-binary-input-file filename)
+(define (open-legacy-binary-input-file filename)
   (let* ((pathname (merge-pathnames filename))
         (channel (file-open-input-channel (->namestring pathname)))
         (port (make-generic-i/o-port channel #f input-file-type pathname)))
@@ -142,7 +142,7 @@ USA.
     (port/set-line-ending port 'BINARY)
     port))
 
-(define (open-binary-output-file filename #!optional append?)
+(define (open-legacy-binary-output-file filename #!optional append?)
   (let* ((pathname (merge-pathnames filename))
         (channel
          (let ((filename (->namestring pathname)))
@@ -155,7 +155,7 @@ USA.
     (port/set-line-ending port 'BINARY)
     port))
 
-(define (open-exclusive-binary-output-file filename)
+(define (open-exclusive-legacy-binary-output-file filename)
   (let* ((pathname (merge-pathnames filename))
         (channel (file-open-exclusive-output-channel (->namestring pathname)))
         (port (make-generic-i/o-port #f channel output-file-type pathname)))
@@ -164,7 +164,7 @@ USA.
     (port/set-line-ending port 'BINARY)
     port))
 
-(define (open-binary-i/o-file filename)
+(define (open-legacy-binary-i/o-file filename)
   (let* ((pathname (merge-pathnames filename))
         (channel (file-open-io-channel (->namestring pathname)))
         (port (make-generic-i/o-port channel channel i/o-file-type pathname)))
@@ -182,8 +182,8 @@ USA.
 (define call-with-input-file
   (make-call-with-file open-input-file))
 
-(define call-with-binary-input-file
-  (make-call-with-file open-binary-input-file))
+(define call-with-legacy-binary-input-file
+  (make-call-with-file open-legacy-binary-input-file))
 
 (define call-with-output-file
   (make-call-with-file open-output-file))
@@ -191,18 +191,18 @@ USA.
 (define call-with-exclusive-output-file
   (make-call-with-file open-exclusive-output-file))
 
-(define call-with-binary-output-file
-  (make-call-with-file open-binary-output-file))
+(define call-with-legacy-binary-output-file
+  (make-call-with-file open-legacy-binary-output-file))
 
-(define call-with-exclusive-binary-output-file
-  (make-call-with-file open-exclusive-binary-output-file))
+(define call-with-exclusive-legacy-binary-output-file
+  (make-call-with-file open-exclusive-legacy-binary-output-file))
 
 (define call-with-append-file
   (make-call-with-file (lambda (filename) (open-output-file filename #t))))
 
-(define call-with-binary-append-file
+(define call-with-legacy-binary-append-file
   (make-call-with-file
-   (lambda (filename) (open-binary-output-file filename #t))))
+   (lambda (filename) (open-legacy-binary-output-file filename #t))))
 
 (define ((make-with-input-from-file call) input-specifier thunk)
   (call input-specifier
@@ -213,7 +213,7 @@ USA.
   (make-with-input-from-file call-with-input-file))
 
 (define with-input-from-binary-file
-  (make-with-input-from-file call-with-binary-input-file))
+  (make-with-input-from-file call-with-legacy-binary-input-file))
 
 (define ((make-with-output-to-file call) output-specifier thunk)
   (call output-specifier
@@ -227,7 +227,7 @@ USA.
   (make-with-output-to-file call-with-exclusive-output-file))
 
 (define with-output-to-binary-file
-  (make-with-output-to-file call-with-binary-output-file))
+  (make-with-output-to-file call-with-legacy-binary-output-file))
 
-(define with-output-to-exclusive-binary-file
-  (make-with-output-to-file call-with-exclusive-binary-output-file))
\ No newline at end of file
+(define with-output-to-exclusive-legacy-binary-file
+  (make-with-output-to-file call-with-exclusive-legacy-binary-output-file))
\ No newline at end of file
index b370fd53cc9c40ebc1d8398c0e520cb5af2c024a..a6ccf04820c508725e92295b90093ffd8e4e93ce 100644 (file)
@@ -604,7 +604,7 @@ USA.
        (fasload-loader temporary-file))))))
 
 (define (uncompress-internal ifile ofile if-fail)
-  (call-with-binary-input-file (merge-pathnames ifile)
+  (call-with-legacy-binary-input-file (merge-pathnames ifile)
     (lambda (input)
       (let* ((file-marker "Compressed-B1-1.00")
             (marker-size (string-length file-marker))
@@ -614,7 +614,7 @@ USA.
                                                   actual-marker 0 marker-size)
                        marker-size)
                 (string=? file-marker actual-marker))
-           (call-with-binary-output-file (merge-pathnames ofile)
-             (lambda (output)
+           (call-with-legacy-binary-output-file (merge-pathnames ofile)
+             (lambda (output)
                (uncompress-ports input output (fix:* (file-length ifile) 2))))
            (if-fail "Not a recognized compressed file:" ifile))))))
\ No newline at end of file
index 1b24a39f295344269264067d1a5cb3c922b8fdf2..3d60793a6d7989efdd098abcb3e2d2956b8753e4 100644 (file)
@@ -203,7 +203,7 @@ USA.
 \f
 (define (fasl-file? pathname)
   (and (file-regular? pathname)
-       (call-with-binary-input-file pathname
+       (call-with-legacy-binary-input-file pathname
         (lambda (port)
           (let ((n (vector-ref (gc-space-status) 0)))
             (let ((marker (make-string n)))
index 392c9923ff6e361b6095302d95a34c2d510cb2db..d4fa461714052a414f9e0d97c7861a919bd772cd 100644 (file)
@@ -973,6 +973,7 @@ USA.
          guarantee-string
          guarantee-string-index
          guarantee-xstring
+         legacy-string?
          ;; END deprecated bindings
          (set-vector-8b-length! set-string-length!)
          (vector-8b-length string-length)
@@ -987,7 +988,6 @@ USA.
          guarantee-substring-end-index
          guarantee-substring-start-index
          hexadecimal->vector-8b
-         legacy-string?
          lisp-string->camel-case
          list->string
          make-string
@@ -1135,6 +1135,9 @@ USA.
   (files "bytevector")
   (parent (runtime))
   (export ()
+         ;; BEGIN deprecated bindings
+         legacy-string->bytevector
+         ;; END deprecated bindings
          byte?
          bytevector
          bytevector-append
@@ -1146,7 +1149,6 @@ USA.
          bytevector-u8-set!
          bytevector=?
          bytevector?
-         legacy-string->bytevector
          make-bytevector
          string->utf8
          utf8->string))
@@ -2100,27 +2102,27 @@ USA.
   (parent (runtime))
   (export ()
          ;; BEGIN deprecated bindings
+         call-with-exclusive-legacy-binary-output-file
+         call-with-legacy-binary-append-file
+         call-with-legacy-binary-input-file
+         call-with-legacy-binary-output-file
+         open-exclusive-legacy-binary-output-file
+         open-legacy-binary-i/o-file
+         open-legacy-binary-input-file
+         open-legacy-binary-output-file
          with-input-from-binary-file
          with-output-to-binary-file
+         with-output-to-exclusive-legacy-binary-file
          ;; END deprecated bindings
          call-with-append-file
-         call-with-binary-append-file
-         call-with-binary-input-file
-         call-with-binary-output-file
-         call-with-exclusive-binary-output-file
          call-with-exclusive-output-file
          call-with-input-file
          call-with-output-file
-         open-binary-i/o-file
-         open-binary-input-file
-         open-binary-output-file
-         open-exclusive-binary-output-file
          open-exclusive-output-file
          open-i/o-file
          open-input-file
          open-output-file
          with-input-from-file
-         with-output-to-exclusive-binary-file
          with-output-to-exclusive-file
          with-output-to-file)
   (initialization (initialize-package!)))