Path: utzoo!utgpu!jarvis.csri.toronto.edu!eecg.toronto.edu!lansd From: lansd@eecg.toronto.edu (Robert Lansdale) Newsgroups: comp.sys.sgi Subject: Achieving CBREAK without Curses Message-ID: <1989Jul23.212232.12996@jarvis.csri.toronto.edu> Organization: EECG, University of Toronto Distribution: na Date: 24 Jul 89 01:22:32 GMT 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@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@relay.cs.net Electrical Engineering Computer Group, University of Toronto.