RETVAL
speed_t
-cfgetispeed(termios_ref)
- POSIX::Termios termios_ref
-
-speed_t
-cfgetospeed(termios_ref)
- POSIX::Termios termios_ref
-
-tcflag_t
-getiflag(termios_ref)
- POSIX::Termios termios_ref
- CODE:
-#ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */
- RETVAL = termios_ref->c_iflag;
-#else
- not_here("getiflag");
- RETVAL = 0;
-#endif
- OUTPUT:
- RETVAL
-
-tcflag_t
-getoflag(termios_ref)
- POSIX::Termios termios_ref
- CODE:
-#ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */
- RETVAL = termios_ref->c_oflag;
-#else
- not_here("getoflag");
- RETVAL = 0;
-#endif
- OUTPUT:
- RETVAL
-
-tcflag_t
-getcflag(termios_ref)
+getispeed(termios_ref)
POSIX::Termios termios_ref
+ ALIAS:
+ getospeed = 1
CODE:
-#ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */
- RETVAL = termios_ref->c_cflag;
-#else
- not_here("getcflag");
- RETVAL = 0;
-#endif
+ RETVAL = ix ? cfgetospeed(termios_ref) : cfgetispeed(termios_ref);
OUTPUT:
RETVAL
tcflag_t
-getlflag(termios_ref)
+getiflag(termios_ref)
POSIX::Termios termios_ref
+ ALIAS:
+ getoflag = 1
+ getcflag = 2
+ getlflag = 3
CODE:
#ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */
- RETVAL = termios_ref->c_lflag;
+ switch(ix) {
+ case 0:
+ RETVAL = termios_ref->c_iflag;
+ break;
+ case 1:
+ RETVAL = termios_ref->c_oflag;
+ break;
+ case 2:
+ RETVAL = termios_ref->c_cflag;
+ break;
+ case 3:
+ RETVAL = termios_ref->c_lflag;
+ break;
+ }
#else
- not_here("getlflag");
- RETVAL = 0;
+ not_here(GvNAME(CvGV(cv)));
+ RETVAL = 0;
#endif
OUTPUT:
RETVAL
RETVAL
SysRet
-cfsetispeed(termios_ref, speed)
+setispeed(termios_ref, speed)
POSIX::Termios termios_ref
speed_t speed
-
-SysRet
-cfsetospeed(termios_ref, speed)
- POSIX::Termios termios_ref
- speed_t speed
-
-void
-setiflag(termios_ref, iflag)
- POSIX::Termios termios_ref
- tcflag_t iflag
- CODE:
-#ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */
- termios_ref->c_iflag = iflag;
-#else
- not_here("setiflag");
-#endif
-
-void
-setoflag(termios_ref, oflag)
- POSIX::Termios termios_ref
- tcflag_t oflag
- CODE:
-#ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */
- termios_ref->c_oflag = oflag;
-#else
- not_here("setoflag");
-#endif
-
-void
-setcflag(termios_ref, cflag)
- POSIX::Termios termios_ref
- tcflag_t cflag
+ ALIAS:
+ setospeed = 1
CODE:
-#ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */
- termios_ref->c_cflag = cflag;
-#else
- not_here("setcflag");
-#endif
+ RETVAL = ix
+ ? cfsetospeed(termios_ref, speed) : cfsetispeed(termios_ref, speed);
+ OUTPUT:
+ RETVAL
void
-setlflag(termios_ref, lflag)
+setiflag(termios_ref, flag)
POSIX::Termios termios_ref
- tcflag_t lflag
+ tcflag_t flag
+ ALIAS:
+ setoflag = 1
+ setcflag = 2
+ setlflag = 3
CODE:
#ifdef I_TERMIOS /* References a termios structure member so ifdef it out. */
- termios_ref->c_lflag = lflag;
+ switch(ix) {
+ case 0:
+ termios_ref->c_iflag = flag;
+ break;
+ case 1:
+ termios_ref->c_oflag = flag;
+ break;
+ case 2:
+ termios_ref->c_cflag = flag;
+ break;
+ case 3:
+ termios_ref->c_lflag = flag;
+ break;
+ }
#else
- not_here("setlflag");
+ not_here(GvNAME(CvGV(cv)));
#endif
void