Default argument for tty-info as promised in the manual.

This commit is contained in:
mainzelm 2002-03-22 10:23:34 +00:00
parent c9c0535f41
commit b222cfe4c3
1 changed files with 3 additions and 2 deletions

View File

@ -107,8 +107,9 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Retrieve tty-info bits from a tty. Arg defaults to current input port.
(define (tty-info fdport)
(let ((control-chars (make-string num-ttychars)))
(define (tty-info . maybe-fdport)
(let ((control-chars (make-string num-ttychars))
(fdport (:optional maybe-fdport (current-input-port))))
(apply
(lambda (iflag oflag cflag lflag ispeed-code ospeed-code)
(make-%tty-info control-chars