Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4973 right-hear 1
/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
2
#include 
3
#include 
4
#include 
5
#include 
6
 
7
void cfmakeraw (struct termios *termiosp)
8
{
9
  /* check arguments */
10
  if (termiosp == NULL)
11
    {
12
      errno = EINVAL;
13
      return;
14
    }
15
  termiosp->c_iflag &= ~(BRKINT|ICRNL|IGNBRK|IGNCR|INLCR|ISTRIP|PARMRK|IXON);
16
#if defined (IMAXBEL)
17
  termiosp->c_iflag &= ~IMAXBEL;
18
#endif
19
  termiosp->c_oflag &= ~OPOST;
20
  termiosp->c_lflag &= ~(ECHONL|ICANON|IEXTEN|ISIG);
21
  termiosp->c_cflag &= ~(CSIZE|PARENB);
22
  termiosp->c_cflag |= CS8;
23
  termiosp->c_cc[VMIN] = 1;
24
  termiosp->c_cc[VTIME] = 0;
25
}