Bookstore_prj/input.h
/* Initialize new terminal i/o settings */
Initialize new terminal i/o settings
Initialize new terminal i / o settings
void initTermios(int echo) 
{
  tcgetattr(0, &old); 
  current = old; 
  current.c_lflag &= ~ICANON; 
  if (echo) {
      current.c_lflag |= ECHO; 
  } else {
      current.c_lflag &= ~ECHO; 
  }
  tcsetattr(0, TCSANOW, &current); 
}
void initTermios ( int echo ) { tcgetattr ( 0 , & old ) ; current = old ; current . c_lflag &= ~ ICANON ; if ( echo ) { current . c_lflag |= ECHO ; } else { current . c_lflag &= ~ ECHO ; } tcsetattr ( 0 , TCSANOW , & current ) ; }
Initialize new terminal i/o settings
Initialize new terminal i / o settings
/* grab old terminal i/o settings */ /* make new settings same as old settings */ /* disable buffered i/o */ /* set echo mode */ /* set no echo mode */ /* use these new terminal i/o settings now */