Back to index

glibc  2.9
tcsetattr.c File Reference
#include <errno.h>
#include <stddef.h>
#include <termios.h>
#include <sys/ioctl.h>

Go to the source code of this file.


int tcsetattr (int fd, int optional_actions, const struct termios *termios_p)

Function Documentation

int tcsetattr ( int  fd,
int  optional_actions,
const struct termios termios_p 

Definition at line 36 of file tcsetattr.c.

  struct termios myt;

  if (optional_actions & TCSASOFT)
      myt = *termios_p;
      myt.c_cflag |= CIGNORE;
      termios_p = &myt;
      optional_actions &= ~TCSASOFT;

  switch (optional_actions)
    case TCSANOW:
      return __ioctl (fd, TIOCSETA, termios_p);

    case TCSADRAIN:
      return __ioctl (fd, TIOCSETAW, termios_p);

      return __ioctl (fd, TIOCSETAF, termios_p);