Kyle Burton on Wed, 5 Jan 2000 11:57:40 -0500 (EST) |
If anyone's interested, and doesn't mind the shameless plug (no pun intended), I've added a tutorial for this at http://www.bgw.org http://www.bgw.org/tutorials/programming/c/raw_mode.php3 k ------------------------------------------------------------------------------ Finding out what goes on in the C.I.A. is like performing acupuncture on a rock. -- New York Times, Jan. 20, 1981 mortis@voicenet.com http://www.voicenet.com/~mortis ------------------------------------------------------------------------------ On Wed, 5 Jan 2000, Kyle Burton wrote: > This has been driving me nuts, I've done this before, but couldn't remember > how/where I'd done it. > > At approximatly page 325 of the Lion book (UNIX Systems Programming for SVR4), > in Chapter 12: terminals, the text describes the difference between > cooked mode (aka canonical mode), and raw mode (aka non-canonical mode). > > Now, looking in the manpages on my linux laptop, I couldn't find anything > about cooked or raw modes -- but I had someone track down the Lion book > for me, and I've written and attached an example of what you have to > do. > > The manpages for tcsetattr should explain more if you need it...I hope > this helps. > > k > > ------------------------------------------------------------------------------ > Finding out what goes on in the C.I.A. is like performing acupuncture on a > rock. > -- New York Times, Jan. 20, 1981 > mortis@voicenet.com http://www.voicenet.com/~mortis > ------------------------------------------------------------------------------ > > On Wed, 5 Jan 2000, mattybeast wrote: > > > On Tue, 04 Jan 2000, you wrote: > > > i am trying to write a program that counts words and would prefer the user > > > not having to hit return. > > > i have tried to use setvbuf but it is not working. does anyone know how to > > > use this? > > > > I'm only familiar with good 'ol ANSI C > > but just at a glance I believe > > you need to define a valid mode for setvbuf > > legit values of mode are _IOFBF > > _IONBF > > _IOLBF > > here's a url that may help get you on track > > http://www.introl.com/introl-demo/Libraries/C/ANSI_C/stdio/setbuf.html > > the code you sent has issues ........but I digress > > > > I also feel while a bit off topic it is apropos as I use C every day with my linux boxen > > anyone else ever use csh? > > I'm not saying we need this list deluged with c questions, I just think being > > helpful to our fellow Linux users is what a lug is for... > > feel free to call me > > Matty > > > > Silence is not always tact and it is tact that is golden, not silence. > > -Samuel Butler 1912 > > > > _______________________________________________ > > PLUG maillist - PLUG@lists.nothinbut.net > > http://lists.nothinbut.net/mail/listinfo/plug > > > _______________________________________________ PLUG maillist - PLUG@lists.nothinbut.net http://lists.nothinbut.net/mail/listinfo/plug
|
|