Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. /* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
  2. #include <errno.h>
  3. #include <stddef.h>
  4. #include <termios.h>
  5. #include <sys/exceptn.h>
  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. }
  26.