For the sake of education, and programming practice, I\'d like to write a simple library that can handle raw keyboard input, and output to the terminal in \'real time\'.
To set an open stream to be non-buffered using ANSI C, you can do this:
#include if (setvbuf(fd, NULL, _IONBF, 0) == 0) printf("Set stream to unbuffered mode\n");
(Reference: C89 4.9.5.6)
However, after that you're on your own. :-)