MODULE LinTermios ["libc.so.70.0"]; (* A. V. Shiryaev, 2012.11, 2013.08 OpenBSD 5.4 32-bit *) CONST %%defs-termios%% TYPE tcflag_t* = INTEGER; (* unsigned int *) cc_t* = SHORTCHAR; (* unsigned char *) speed_t* = INTEGER; (* unsigned int *) termios* = RECORD [untagged] c_iflag*: tcflag_t; (* input flags *) c_oflag*: tcflag_t; (* output flags *) c_cflag*: tcflag_t; (* control flags *) c_lflag*: tcflag_t; (* local flags *) c_cc*: 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; (* extensions *) (* PROCEDURE [ccall] cfsetspeed* (VAR tp: termios; speed: speed_t): INTEGER; PROCEDURE [ccall] cfmakeraw* (VAR tp: termios); *) END LinTermios.