MODULE LinTermios ["libc.so.6"]; (* A. V. Shiryaev, 2012.11 GNU/Linux i386 *) CONST NCCS* = 32; _HAVE_STRUCT_TERMIOS_C_ISPEED* = 1; _HAVE_STRUCT_TERMIOS_C_OSPEED* = 1; VINTR* = 0; VQUIT* = 1; VERASE* = 2; VKILL* = 3; VEOF* = 4; VTIME* = 5; VMIN* = 6; VSWTC* = 7; VSTART* = 8; VSTOP* = 9; VSUSP* = 10; VEOL* = 11; VREPRINT* = 12; VDISCARD* = 13; VWERASE* = 14; VLNEXT* = 15; VEOL2* = 16; IGNBRK* = 1; (* {0} *) BRKINT* = 2; (* {1} *) IGNPAR* = 4; (* {2} *) PARMRK* = 8; (* {3} *) INPCK* = 16; (* {4} *) ISTRIP* = 32; (* {5} *) INLCR* = 64; (* {6} *) IGNCR* = 128; (* {7} *) ICRNL* = 256; (* {8} *) IUCLC* = 512; (* {9} *) IXON* = 1024; (* {10} *) IXANY* = 2048; (* {11} *) IXOFF* = 4096; (* {12} *) IMAXBEL* = 8192; (* {13} *) IUTF8* = 16384; (* {14} *) OPOST* = 1; (* {0} *) OLCUC* = 2; (* {1} *) ONLCR* = 4; (* {2} *) OCRNL* = 8; (* {3} *) ONOCR* = 16; (* {4} *) ONLRET* = 32; (* {5} *) OFILL* = 64; (* {6} *) OFDEL* = 128; (* {7} *) VTDLY* = 16384; (* {14} *) VT0* = 0; (* {} *) VT1* = 16384; (* {14} *) B0* = 0; (* {} *) (* hang up *) B50* = 1; (* {0} *) B75* = 2; (* {1} *) B110* = 3; (* {0,1} *) B134* = 4; (* {2} *) B150* = 5; (* {0,2} *) B200* = 6; (* {1,2} *) B300* = 7; (* {0..2} *) B600* = 8; (* {3} *) B1200* = 9; (* {0,3} *) B1800* = 10; (* {1,3} *) B2400* = 11; (* {0,1,3} *) B4800* = 12; (* {2,3} *) B9600* = 13; (* {0,2,3} *) B19200* = 14; (* {1..3} *) B38400* = 15; (* {0..3} *) CSIZE* = 48; (* {4,5} *) CS5* = 0; (* {} *) CS6* = 16; (* {4} *) CS7* = 32; (* {5} *) CS8* = 48; (* {4,5} *) CSTOPB* = 64; (* {6} *) CREAD* = 128; (* {7} *) PARENB* = 256; (* {8} *) PARODD* = 512; (* {9} *) HUPCL* = 1024; (* {10} *) CLOCAL* = 2048; (* {11} *) B57600* = 4097; (* {0,12} *) B115200* = 4098; (* {1,12} *) B230400* = 4099; (* {0,1,12} *) B460800* = 4100; (* {2,12} *) B500000* = 4101; (* {0,2,12} *) B576000* = 4102; (* {1,2,12} *) B921600* = 4103; (* {0..2,12} *) B1000000* = 4104; (* {3,12} *) B1152000* = 4105; (* {0,3,12} *) B1500000* = 4106; (* {1,3,12} *) B2000000* = 4107; (* {0,1,3,12} *) B2500000* = 4108; (* {2,3,12} *) B3000000* = 4109; (* {0,2,3,12} *) B3500000* = 4110; (* {1..3,12} *) B4000000* = 4111; (* {0..3,12} *) __MAX_BAUD* = B4000000; ISIG* = 1; (* {0} *) ICANON* = 2; (* {1} *) ECHO* = 8; (* {3} *) ECHOE* = 16; (* {4} *) ECHOK* = 32; (* {5} *) ECHONL* = 64; (* {6} *) NOFLSH* = 128; (* {7} *) TOSTOP* = 256; (* {8} *) IEXTEN* = 32768; (* {15} *) TCOOFF* = 0; TCOON* = 1; TCIOFF* = 2; TCION* = 3; TCIFLUSH* = 0; TCOFLUSH* = 1; TCIOFLUSH* = 2; TCSANOW* = 0; TCSADRAIN* = 1; TCSAFLUSH* = 2; TYPE tcflag_t* = INTEGER; (* unsigned int *) cc_t* = SHORTCHAR; (* unsigned char *) speed_t* = INTEGER; (* unsigned int *) termios* = RECORD [untagged] c_iflag*: tcflag_t; (* input mode flags *) c_oflag*: tcflag_t; (* output mode flags *) c_cflag*: tcflag_t; (* control mode flags *) c_lflag*: tcflag_t; (* local mode flags *) c_line*: cc_t; (* line discipline *) cc_c*: ARRAY [untagged] NCCS OF cc_t; (* control chars *) c_ispeed*: INTEGER; (* input speed *) c_ospeed*: INTEGER; (* output speed *) END; (* POSIX.1 *) PROCEDURE [ccall] cfgetispeed* (VAR tp: termios): speed_t; PROCEDURE [ccall] cfsetispeed* (VAR tp: termios; ispeed: speed_t): INTEGER; PROCEDURE [ccall] cfgetospeed* (VAR tp: termios): speed_t; PROCEDURE [ccall] cfsetospeed* (VAR tp: termios; ospeed: speed_t): INTEGER; PROCEDURE [ccall] tcgetattr* (fd: INTEGER; VAR tp: termios): INTEGER; PROCEDURE [ccall] tcsetattr* (fd: INTEGER; action: INTEGER; VAR tp: termios): INTEGER; PROCEDURE [ccall] tcdrain* (fd: INTEGER): INTEGER; PROCEDURE [ccall] tcflow* (fd: INTEGER; action: INTEGER): INTEGER; PROCEDURE [ccall] tcflush* (fd: INTEGER; action: INTEGER): INTEGER; PROCEDURE [ccall] tcsendbreak* (fd: INTEGER; len: INTEGER): INTEGER; END LinTermios.