Linux-Termios2

 view release on metacpan or  search on metacpan

lib/Linux/Termios2.xs  view on Meta::CPAN

void
DESTROY(self)
  Linux::Termios2 self
  CODE:
    Safefree(self);

void
getattr(self, fd)
  Linux::Termios2 self
  int             fd
  PPCODE:
    if(ioctl(fd, TCGETS2, self))
      XSRETURN_UNDEF;

    ST(0) = &PL_sv_yes;
    XSRETURN(1);

void
setattr(self, fd, act)
  Linux::Termios2 self
  int             fd
  int             act
  PPCODE:
  {
    int ctl;
    switch(act) {
      case TCSANOW:   ctl = TCSETS2; break;
      case TCSADRAIN: ctl = TCSETSW2; break;
      case TCSAFLUSH: ctl = TCSETSF2; break;
      default:
        SETERRNO(EINVAL, LIB_INVARG);
        XSRETURN_UNDEF;
    }



( run in 0.715 second using v1.01-cache-2.11-cpan-5511b514fd6 )