Achieving CBREAK without Curses

Robert Lansdale lansd at eecg.toronto.edu
Mon Jul 24 11:22:32 AEST 1989


	While porting my 3d graphics package from a SUN to an IRIS/4D
several weeks ago I came across a minor compatibility problem between
SUN's BSD Unix and the IRIX System V Unix; namely that the sgtty structure
does not have the CBREAK bit. Since this was my first port to SYS V, I was
stuck. Eventually I came across the cbreak() function in the curses library,
but it seems that I have to open a window (and use the usual window I/O)
just so I can call this routine - I don't want to have to use curses just
to set the tty to cbreak!

	My question: is the SYS V 'raw' bit in the sgtty struct functionally
similar to putting the tty into cbreak on a BSD system? From experience, 'raw'
mode under BSD Unix bypasses all terminal translation routines and in some
cases returns unexpected data (ie: on IBM terminals). Are there other ways to
achieve cbreak()?

----------------------------------------------------------------------------
CSNET: lansd%eecg.toronto.edu, ARPA: lansd%eecg.toronto.edu at relay.cs.net
Electrical Engineering Computer Group, University of Toronto.




>From postnews Sun Jul 23 21:20:42 1989
Subject: Achieving CBREAK without Curses
Newsgroups: comp.sys.sgi
Distribution: na


	While porting my 3d graphics package from a SUN to an IRIS/4D
several weeks ago I came across a minor compatibility problem between
SUN's BSD Unix and the IRIX System V Unix; namely that the sgtty structure
does not have the CBREAK bit. Since this was my first port to SYS V, I was
stuck. Eventually I came across the cbreak() function in the curses library,
but it seems that I have to open a window (and use the usual window I/O)
just so I can call this routine - I don't want to have to use curses just
to set the tty to cbreak!

	My question: is the SYS V 'raw' bit in the sgtty struct functionally
similar to putting the tty into cbreak on a BSD system? From experience, 'raw'
mode under BSD Unix bypasses all terminal translation routines and in some
cases returns unexpected data (ie: on IBM terminals). Are there other ways to
achieve cbreak()?

----------------------------------------------------------------------------
CSNET: lansd%eecg.toronto.edu, ARPA: lansd%eecg.toronto.edu at relay.cs.net
Electrical Engineering Computer Group, University of Toronto.








More information about the Comp.sys.sgi mailing list