(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)
(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)))
(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)
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))
(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)
(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)
(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 ()
(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)
(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 ()
(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)
(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)
(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)