Comment 2 for bug 175517

Revision history for this message
Derick Eddington (derick-eddington) wrote :

I think make-custom-textual-{input|output}-port need to use one of the fast-put- textual tags for the port attributes because:

Ikarus Scheme version 0.0.2patched+ (revision 1242, build 2007-12-14)
Copyright (c) 2006-2007 Abdulaziz Ghuloum

(define ctop
    (make-custom-textual-output-port
      "ctop"
      (lambda (str start count)
        (printf "*** (write! ~s)\n" (substring str start (+ start count)))
        count)
      #f #f #f))
> (textual-port? ctop)
#t
> (binary-port? ctop)
#f
> (write-char #\c ctop)
Unhandled exception
 Condition components:
   1. &error
   2. &who: write-char
   3. &message: "not a textual port"
   4. &irritants: (#<output-port "ctop">)