2005-05-18 11:24:49 -04:00
|
|
|
(define *tty-port* #f)
|
|
|
|
|
|
|
|
(define (init-tty-debug-output!)
|
|
|
|
(call-with-values
|
|
|
|
open-pty
|
|
|
|
(lambda (input-port name)
|
|
|
|
(set! *tty-port* (dup->outport input-port))
|
2005-05-18 14:56:30 -04:00
|
|
|
(close input-port)
|
2005-05-18 11:24:49 -04:00
|
|
|
(set-port-buffering *tty-port* bufpol/none)
|
|
|
|
name)))
|
|
|
|
|
|
|
|
(define debug-message
|
|
|
|
(lambda args
|
|
|
|
(with-current-output-port*
|
|
|
|
*tty-port*
|
|
|
|
(lambda ()
|
|
|
|
(for-each display args)
|
2005-05-18 14:56:30 -04:00
|
|
|
(newline)))))
|
|
|
|
|