Eliminate use of deprecated guarantee-FOO-port procedures.
authorChris Hanson <org/chris-hanson/cph>
Fri, 13 Jan 2017 09:04:41 +0000 (01:04 -0800)
committerChris Hanson <org/chris-hanson/cph>
Fri, 13 Jan 2017 09:04:41 +0000 (01:04 -0800)
src/edwin/lisppaste.scm
src/runtime/error.scm
src/runtime/fileio.scm
src/runtime/output.scm
src/runtime/regsexp.scm
src/runtime/stream.scm
src/runtime/usrint.scm

index 875ac1156edded172a037eb9549a347a5e4f4faa..039d038134fed6c2402a943371c8af2f70f5c4de 100644 (file)
@@ -144,11 +144,10 @@ With a prefix argument, list pastes starting at a certain number."
           (else (list count)))))
 
 (define (show-lisppaste entry #!optional port)
-  (let ((port (if (default-object? port)
-                  (current-output-port)
-                  (begin
-                    (guarantee-output-port port 'SHOW-LISPPASTE)
-                    port))))
+  (let ((port
+        (if (default-object? port)
+            (current-output-port)
+            (guarantee textual-output-port? port 'SHOW-LISPPASTE))))
     (receive (number time author channel title annotations content)
         (lisppaste-entry/components entry)
       (write-string "Paste " port)
index df2a827dd01cf463c4533628ff61743fa76c7ac7..d3064e2dc67155f2fb222104cc72e2cacc96834d 100644 (file)
@@ -288,7 +288,7 @@ USA.
 
 (define (write-condition-report condition port)
   (guarantee-condition condition 'WRITE-CONDITION-REPORT)
-  (guarantee-output-port port 'WRITE-CONDITION-REPORT)
+  (guarantee textual-output-port? port 'WRITE-CONDITION-REPORT)
   (let ((reporter (%condition-type/reporter (%condition/type condition))))
     (if (%condition/error? condition)
        (ignore-errors (lambda () (reporter condition port)))
@@ -352,7 +352,7 @@ USA.
 
 (define (write-restart-report restart port)
   (guarantee-restart restart 'WRITE-RESTART-REPORT)
-  (guarantee-output-port port 'WRITE-RESTART-REPORT)
+  (guarantee textual-output-port? port 'WRITE-RESTART-REPORT)
   (let ((reporter (%restart/reporter restart)))
     (if (string? reporter)
        (write-string reporter port)
index 237bb506cd1116613ffda16e0119c7d934f17737..f4047bbe5a44193f679a1b8391bfa9d6e644b198 100644 (file)
@@ -84,7 +84,7 @@ USA.
                             position))
 
 (define (guarantee-positionable-port port caller)
-  (guarantee-port port caller)
+  (guarantee textual-port? port caller)
   (if (and (i/o-port? port)
           (not (eq? (input-port-channel port) (output-port-channel port))))
       (error:bad-range-argument port caller))
index 3c36d1924391879a570f73861322b8aa5ae71b30..949a078e608eb657813b746eff9b7f8f2fa9647d 100644 (file)
@@ -174,7 +174,7 @@ USA.
   (if (not (list-of-type? strings string?))
       (error:wrong-type-argument strings "list of strings"
                                 'WRITE-STRINGS-IN-COLUMNS))
-  (guarantee-output-port port 'WRITE-STRINGS-IN-COLUMNS)
+  (guarantee textual-output-port? port 'WRITE-STRINGS-IN-COLUMNS)
   (guarantee-exact-positive-integer min-minor 'WRITE-STRINGS-IN-COLUMNS)
   (guarantee-string left-margin 'WRITE-STRINGS-IN-COLUMNS)
   (guarantee-string col-sep 'WRITE-STRINGS-IN-COLUMNS)
@@ -299,7 +299,7 @@ USA.
           (pair? strings))
       (error:wrong-type-argument strings "non-empty list of strings"
                                 'WRITE-STRINGS-IN-PARAGRAPH))
-  (guarantee-output-port port 'WRITE-STRINGS-IN-PARAGRAPH)
+  (guarantee textual-output-port? port 'WRITE-STRINGS-IN-PARAGRAPH)
   (guarantee-exact-positive-integer width 'WRITE-STRINGS-IN-PARAGRAPH)
   (guarantee-exact-nonnegative-integer indent 'WRITE-STRINGS-IN-PARAGRAPH)
   (guarantee-exact-nonnegative-integer first 'WRITE-STRINGS-IN-PARAGRAPH)
index ffc1d669f4a74ebfedb73ffe67d22abb41547663..60c12594c445d557356f10a22abfcefe3b5c1bc3 100644 (file)
@@ -560,7 +560,7 @@ USA.
 (define (regsexp-match-input-port crsexp port)
   (let ((caller 'REGSEXP-MATCH-INPUT-PORT))
     (guarantee-compiled-regsexp crsexp caller)
-    (guarantee-input-port port caller)
+    (guarantee textual-input-port? port caller)
     (%top-level-match crsexp
                      (%char-source->position
                       (lambda ()
index e8f8dc71b084be07fcad924dfdfb57f873b4c3cc..e436af828aa1c9a61b707ccebdef75bd7ccd193c 100644 (file)
@@ -241,7 +241,7 @@ USA.
   (let ((port
         (if (default-object? port)
             (current-output-port)
-            (guarantee-output-port port 'STREAM-WRITE))))
+            (guarantee textual-output-port? port 'STREAM-WRITE))))
     (if (stream-pair? stream)
        (begin
          (write-char #\{ port)
index b5dbef379926c680e80c4707c39657b76f776b62..271420d2ddd93a5ddb85ed750028a078fabbfb4e 100644 (file)
@@ -41,7 +41,7 @@ USA.
       (if operation
          (operation port environment prompt level)
          (begin
-           (guarantee-i/o-port port 'PROMPT-FOR-COMMAND-EXPRESSION)
+           (guarantee textual-i/o-port? port 'PROMPT-FOR-COMMAND-EXPRESSION)
            (write-command-prompt port prompt level)
            (with-input-port-terminal-mode port 'COOKED
              (lambda ()
@@ -71,7 +71,7 @@ USA.
       (if operation
          (operation port environment prompt)
          (begin
-           (guarantee-i/o-port port caller)
+           (guarantee textual-i/o-port? port caller)
            (with-output-port-terminal-mode port 'COOKED
              (lambda ()
                (fresh-line port)
@@ -85,9 +85,7 @@ USA.
 (define (optional-port port caller)
   (if (default-object? port)
       (interaction-i/o-port)
-      (begin
-       (guarantee-port port caller)
-       port)))
+      (guarantee textual-port? port caller)))
 
 (define (optional-environment environment caller)
   (if (default-object? environment)
@@ -238,7 +236,7 @@ USA.
                  (port/set-line-ending port outside)
                  (set! outside)))))))
 
-  (guarantee-i/o-port port 'default/call-with-pass-phrase)
+  (guarantee textual-i/o-port? port 'default/call-with-pass-phrase)
   (with-output-port-terminal-mode port 'COOKED
     (lambda ()
       (fresh-line port)