Path: utzoo!attcan!uunet!mcsun!cernvax!chx400!urz.unibas.ch!doelz From: doelz@urz.unibas.ch Newsgroups: comp.sys.sgi Subject: Re: Cannot find the include file I need Message-ID: <1990Jun13.090145.787@urz.unibas.ch> Date: 13 Jun 90 08:01:45 GMT References: <14637@thorin.cs.unc.edu> Organization: University of Basel, Switzerland Lines: 49 In article <14637@thorin.cs.unc.edu>, taylorr@glycine.cs.unc.edu (Russell Taylor) writes: > > We have an IRIS 4D running OS 3.2.2. I am trying to find the > include file that defines 'struct sgttyb'. I know it must be there > somewhere, because /usr/include/curses.h makes use of the structure No way. If you look at curses.h, it explicitly says #ifdef SYSV ... #else # ifndef _SGTTYB_ # include # endif typedef struct sgttyb SGTTY; ... #endif and this means that you won't need it on a IRIX (SYSV) in the view of an IRIY programmer. If you are porting from BSD, you will meet lots of incompatibilities like these. What sgtty does: It defines the speed, the erase and kill character, and the mode flags: struct sgttyb { char sg_ispeed; /* input speed */ char sg_ospeed; /* output speed */ char sg_erase; /* erase character */ char sg_kill; /* kill character */ short sg_flags; /* mode flags */ }; Unfortunately, gtty isn't supported as system call on IRIX. There is a smiling remark in /usr/include/sgtty.h pointing to /usr/include/bsd, and there - rien ne va plus. BUT: If you are looking at what gtty does, I suspect that this is a call which is doing the opposite of stty, namely reading the state of the terminal. This can be done easily by a ioctl(2) call. ioctl asks for the file descriptor (the terminal device), what you want to to (read terminal io parameters: TCGETA), and an argument which is device-specific. On IRIX, this one is in termio.h, and you need to refer to termio(7). Look at the end of the man page of termio(7). Hope this helps, Reinhard