scsh-hackers
[Top] [All Lists]

[Scsh-hackers] [ scsh-Bugs-505155 ] Problems with `tty-info' under GNU/L

To: noreply@sourceforge.net
Subject: [Scsh-hackers] [ scsh-Bugs-505155 ] Problems with `tty-info' under GNU/Linux
From: noreply@sourceforge.net
Date: Thu Jan 17 15:34:04 2002
List-id: Discussion among the implementors <scsh-hackers.lists.sourceforge.net>
Sender: scsh-hackers-admin@lists.sourceforge.net
Bugs item #505155, was opened at 2002-01-17 15:33
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=110493&aid=505155&group_id=10493

Category: run-time
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Detlev Zundel (dzu)
Assigned to: Nobody/Anonymous (nobody)
Summary: Problems with `tty-info' under GNU/Linux

Initial Comment:
Trying to retrieve the tty-info failed for me on my
current GNU/Linux
system (Kernel 2.4.9 - glibc 2.2.4):

> (tty-info (current-input-port))

Error: exception
       index-out-of-range
       (call-external-value "scheme_tcgetattr" 19 0 18)


I traced the problem to `scsh/tty1.c' where the C code
uses the
constant `NCCS' whereas the scheme code uses
`num-ttychars'.
The latter is defined in scsh/linux/tty-consts.scm to
be 19.

The small test program

#include <termios.h>

void main() {
  printf("%d\n", NCCS);
}

prints `32'.  Looking for the definition I found these
contradicting
definitions:

$ rgrep NCCS /usr/include 
/usr/include/asm/termbits.h:#define NCCS 19
/usr/include/asm/termbits.h:    cc_t
c_cc[NCCS];                /* control characters */
/usr/include/sys/ttydefaults.h:cc_t    
ttydefchars[NCCS] = {
/usr/include/bits/termios.h:#define NCCS 32
/usr/include/bits/termios.h:    cc_t
c_cc[NCCS];                /* control characters */
/usr/include/bits/termios.h:  _IOT (_IOTS (cflag_t), 4,
_IOTS (cc_t), NCCS, _IOTS (speed_t), 2)
$ 


Changing `num-ttychars' in scsh/linux/tty-consts.scm to
32 solved
the problem for me.

I am not sure since when `32' is the answer or why the
definitions
contradict each other anyway.

Cheers
  Detlev


----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=110493&aid=505155&group_id=10493


<Prev in Thread] Current Thread [Next in Thread>