Cannot find the include file I need

doelz at urz.unibas.ch doelz at urz.unibas.ch
Wed Jun 13 18:01:45 AEST 1990


In article <14637 at thorin.cs.unc.edu>, taylorr at 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 <sgtty.h> 
# 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 



More information about the Comp.sys.sgi mailing list