Logo Search packages:      
Sourcecode: whowatch version File versions  Download package

term.c

#include <termios.h>
#include <fcntl.h>

struct termios tio;

void term_raw()
{
      struct termios t;
      tcgetattr(0, &tio);
      t = tio;
      t.c_lflag &= ~(ICANON|ECHO);
      tcsetattr(0, TCSANOW, &t);
      fcntl(0, F_SETFL, O_NONBLOCK);
}

void term_rest()
{
      tcsetattr(0, TCSANOW, &tio);
}

Generated by  Doxygen 1.6.0   Back to index