1 MODULE LinTermios ["libc.so.70.0"];
3 (*
4 A. V. Shiryaev, 2012.11, 2013.08
6 OpenBSD 5.4
7 32-bit
8 *)
10 CONST
11 %%defs-termios%%
12 TYPE
13 tcflag_t* = INTEGER; (* unsigned int *)
14 cc_t* = SHORTCHAR; (* unsigned char *)
15 speed_t* = INTEGER; (* unsigned int *)
16 termios* = RECORD [untagged]
17 c_iflag*: tcflag_t; (* input flags *)
18 c_oflag*: tcflag_t; (* output flags *)
19 c_cflag*: tcflag_t; (* control flags *)
20 c_lflag*: tcflag_t; (* local flags *)
21 c_cc*: ARRAY [untagged] NCCS OF cc_t; (* control chars *)
22 c_ispeed*: INTEGER; (* input speed *)
23 c_ospeed*: INTEGER; (* output speed *)
24 END;
26 (* POSIX.1 *)
27 PROCEDURE [ccall] cfgetispeed* (VAR tp: termios): speed_t;
28 PROCEDURE [ccall] cfsetispeed* (VAR tp: termios; ispeed: speed_t): INTEGER;
29 PROCEDURE [ccall] cfgetospeed* (VAR tp: termios): speed_t;
30 PROCEDURE [ccall] cfsetospeed* (VAR tp: termios; ospeed: speed_t): INTEGER;
31 PROCEDURE [ccall] tcgetattr* (fd: INTEGER; VAR tp: termios): INTEGER;
32 PROCEDURE [ccall] tcsetattr* (fd: INTEGER; action: INTEGER; VAR tp: termios): INTEGER;
34 PROCEDURE [ccall] tcdrain* (fd: INTEGER): INTEGER;
35 PROCEDURE [ccall] tcflow* (fd: INTEGER; action: INTEGER): INTEGER;
36 PROCEDURE [ccall] tcflush* (fd: INTEGER; action: INTEGER): INTEGER;
37 PROCEDURE [ccall] tcsendbreak* (fd: INTEGER; len: INTEGER): INTEGER;
39 (* extensions *)
40 (*
41 PROCEDURE [ccall] cfsetspeed* (VAR tp: termios; speed: speed_t): INTEGER;
42 PROCEDURE [ccall] cfmakeraw* (VAR tp: termios);
43 *)
45 END LinTermios.