>>>>> "Michal" == Michal Maru¹ka <mmc@maruska.dyndns.org> writes:
Michal> The manual says tty-info takes _optional_ argument, but it seems not.
Michal> (running under emacs):
Michal> Welcome to scsh 0.6.1 (Combinatorial Algorithms)
Michal> Type ,? for help.
>>
>> (tty? (current-input-port))
Michal> #t
>> (tty-file-name (current-input-port))
Michal> "/dev/pts/32"
>> (tty-info)
Michal> Error: wrong number of arguments
>> ('#{Procedure 10606 (tty-info in scsh-level-0)})
Here is the patch:
Index: tty.scm
===================================================================
RCS file: /cvsroot/scsh/scsh-0.6/scsh/tty.scm,v
retrieving revision 1.7
diff -c -r1.7 tty.scm
*** tty.scm 12 Sep 2001 14:08:24 -0000 1.7
--- tty.scm 22 Mar 2002 08:52:03 -0000
***************
*** 107,114 ****
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Retrieve tty-info bits from a tty. Arg defaults to current input port.
! (define (tty-info fdport)
! (let ((control-chars (make-string num-ttychars)))
(apply
(lambda (iflag oflag cflag lflag ispeed-code ospeed-code)
(make-%tty-info control-chars
--- 107,115 ----
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Retrieve tty-info bits from a tty. Arg defaults to current input port.
! (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
1> (tty-info (current-input-port))
Michal> Process scheme segmentation fault (core dumped)
Please apply this patch:
Index: tty1.c
===================================================================
RCS file: /cvsroot/scsh/scsh-0.6/scsh/tty1.c,v
retrieving revision 1.8
diff -c -r1.8 tty1.c
*** tty1.c 12 Feb 2002 15:49:39 -0000 1.8
--- tty1.c 22 Mar 2002 10:20:21 -0000
***************
*** 64,71 ****
sch_oflag = s48_enter_integer(t.c_oflag);
sch_cflag = s48_enter_integer(t.c_cflag);
sch_lflag = s48_enter_integer(t.c_lflag);
! sch_ispeed = cfgetispeed(&t);
! sch_ospeed = cfgetospeed(&t);
sch_retval = s48_list_6 (sch_iflag, sch_oflag, sch_cflag, sch_lflag,
sch_ispeed, sch_ospeed);
--- 64,71 ----
sch_oflag = s48_enter_integer(t.c_oflag);
sch_cflag = s48_enter_integer(t.c_cflag);
sch_lflag = s48_enter_integer(t.c_lflag);
! sch_ispeed = s48_enter_integer(cfgetispeed(&t));
! sch_ospeed = s48_enter_integer(cfgetospeed(&t));
sch_retval = s48_list_6 (sch_iflag, sch_oflag, sch_cflag, sch_lflag,
sch_ispeed, sch_ospeed);
--
Martin
|