use of SGTTY.H and stuff involving IOCTLs

Thomas Russo russo at chaos.utexas.edu
Tue Dec 19 08:37:25 AEST 1989


I've been trying to port a program which uses facilities of sgtty.h,
namely it uses the sgttyb structure to set CBREAK mode and turn off
echoing with a call to ioctl like this:

ioerr = ioctl(fileno(stdin), TIOCGETP, &tty_orig);	
		/* get std input characteristics */
...
		ttybuf = tty_new = tty_orig;						/* make a copy of tty control structure */
		tty_new.sg_flags = (tty_new.sg_flags & ~ECHO & ~CRMOD)
			| CBREAK;
...
		ioctl(fileno(stdin), TIOCSETP, &tty_new);
			/* set flags  */

Is there any slick way to take out this kind of
incompatibility when porting to the iris4d?   I can't find any
reference to CBREAK mode in the FM so RTFM is so far no good. 
Also, repeated reference is made to requests like TIOCSET[CP] and the
like, and I have no way of knowing what the correct functions are on
the iris.   Any hints?



Thomas Russo
Center for Nonlinear Dynamics, University of Texas at Austin          
russo at chaos.utexas.edu or phib421 at utchpc.bitnet
------



More information about the Comp.sys.sgi mailing list