
May 7th, 2003, 11:20 AM
|
|
Junior Member
|
|
Join Date: May 2003
Posts: 16
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
ioctl() and termios for "canonical" read
Well, this app is giving me quite a headache 
I need to have a program read a char at a time and then process it, using read(). Therefore, I'll have to set the terminal to canonical mode (correct?), using ioctl() along with termios' flags. What I just can't get is what flag to use and wich values to set (I've already read ALL the man page...). My best bet is using the c_lflag and manipulating it's ICANON value. Can somebody point out a good solution for this problem? Some sample code would be usefull, I'm not very skilled...
Thanx in advance!
PS: I can't use getchar 
|