28 August 2013 By Bhavyanshu Parasher
Well, i am writing this because sometimes there is a need to change the speed of the terminal dsession to match that of the device it is connected to.
Okay, well, does it sound a bit too technical?
Let me sum it up quickly.
Terminal devices can run into different states i.e, canonical mode/cooked mode or noncanonical mode/raw mode. In the former state, the terminal driver returns one line of data at a time and in the later, the terminal device returns one char at a time without assembling lines of data.
The third state is the the
cbreakmode, it is similar to raw mode but in this a signal is raised for the special characters.
Ever used vi? Well, it uses raw mode for i/o.
There is a struct named termios that has all the attributes controlling the terminal device.
The above mentioned structure is used with two functions mainly,
So those who are interested in developing a terminal based editor, they might be interested in reading more on terminal I/O.
blog comments powered by Disqus