DEADSOFTWARE

CommV24
[bbcp.git] / Trurl-based / _Linux_ / Lin / Mod / Termios.txt
1 MODULE LinTermios ["libc.so.6"];
3 (*
4 A. V. Shiryaev, 2012.11
6 Linux
7 i386
8 *)
10 CONST
11 NCCS* = 32;
12 _HAVE_STRUCT_TERMIOS_C_ISPEED* = 1;
13 _HAVE_STRUCT_TERMIOS_C_OSPEED* = 1;
14 VINTR* = 0;
15 VQUIT* = 1;
16 VERASE* = 2;
17 VKILL* = 3;
18 VEOF* = 4;
19 VTIME* = 5;
20 VMIN* = 6;
21 VSWTC* = 7;
22 VSTART* = 8;
23 VSTOP* = 9;
24 VSUSP* = 10;
25 VEOL* = 11;
26 VREPRINT* = 12;
27 VDISCARD* = 13;
28 VWERASE* = 14;
29 VLNEXT* = 15;
30 VEOL2* = 16;
31 IGNBRK* = 1;
32 BRKINT* = 2;
33 IGNPAR* = 4;
34 PARMRK* = 8;
35 INPCK* = 16;
36 ISTRIP* = 32;
37 INLCR* = 64;
38 IGNCR* = 128;
39 ICRNL* = 256;
40 IUCLC* = 512;
41 IXON* = 1024;
42 IXANY* = 2048;
43 IXOFF* = 4096;
44 IMAXBEL* = 8192;
45 IUTF8* = 16384;
46 OPOST* = 1;
47 OLCUC* = 2;
48 ONLCR* = 4;
49 OCRNL* = 8;
50 ONOCR* = 16;
51 ONLRET* = 32;
52 OFILL* = 64;
53 OFDEL* = 128;
54 VTDLY* = 16384;
55 VT0* = 0;
56 VT1* = 16384;
57 B0* = 0; (* hang up *)
58 B50* = 1;
59 B75* = 2;
60 B110* = 3;
61 B134* = 4;
62 B150* = 5;
63 B200* = 6;
64 B300* = 7;
65 B600* = 8;
66 B1200* = 9;
67 B1800* = 10;
68 B2400* = 11;
69 B4800* = 12;
70 B9600* = 13;
71 B19200* = 14;
72 B38400* = 15;
73 CSIZE* = 48;
74 CS5* = 0;
75 CS6* = 16;
76 CS7* = 32;
77 CS8* = 48;
78 CSTOPB* = 64;
79 CREAD* = 128;
80 PARENB* = 256;
81 PARODD* = 512;
82 HUPCL* = 1024;
83 CLOCAL* = 2048;
84 B57600* = 4097;
85 B115200* = 4098;
86 B230400* = 4099;
87 B460800* = 4100;
88 B500000* = 4101;
89 B576000* = 4102;
90 B921600* = 4103;
91 B1000000* = 4104;
92 B1152000* = 4105;
93 B1500000* = 4106;
94 B2000000* = 4107;
95 B2500000* = 4108;
96 B3000000* = 4109;
97 B3500000* = 4110;
98 B4000000* = 4111;
99 __MAX_BAUD* = B4000000;
100 ISIG* = 1;
101 ICANON* = 2;
102 ECHO* = 8;
103 ECHOE* = 16;
104 ECHOK* = 32;
105 ECHONL* = 64;
106 NOFLSH* = 128;
107 TOSTOP* = 256;
108 IEXTEN* = 32768;
109 TCOOFF* = 0;
110 TCOON* = 1;
111 TCIOFF* = 2;
112 TCION* = 3;
113 TCIFLUSH* = 0;
114 TCOFLUSH* = 1;
115 TCIOFLUSH* = 2;
116 TCSANOW* = 0;
117 TCSADRAIN* = 1;
118 TCSAFLUSH* = 2;
120 TYPE
121 tcflag_t* = INTEGER; (* unsigned int *)
122 cc_t* = SHORTCHAR; (* unsigned char *)
123 speed_t* = INTEGER; (* unsigned int *)
124 termios* = RECORD [untagged]
125 c_iflag*: tcflag_t; (* input mode flags *)
126 c_oflag*: tcflag_t; (* output mode flags *)
127 c_cflag*: tcflag_t; (* control mode flags *)
128 c_lflag*: tcflag_t; (* local mode flags *)
129 c_line*: cc_t; (* line discipline *)
130 cc_c*: ARRAY [untagged] NCCS OF cc_t; (* control chars *)
131 c_ispeed*: INTEGER; (* input speed *)
132 c_ospeed*: INTEGER; (* output speed *)
133 END;
135 (* POSIX.1 *)
136 PROCEDURE [ccall] cfgetispeed* (VAR tp: termios): speed_t;
137 PROCEDURE [ccall] cfsetispeed* (VAR tp: termios; ispeed: speed_t): INTEGER;
138 PROCEDURE [ccall] cfgetospeed* (VAR tp: termios): speed_t;
139 PROCEDURE [ccall] cfsetospeed* (VAR tp: termios; ospeed: speed_t): INTEGER;
140 PROCEDURE [ccall] tcgetattr* (fd: INTEGER; VAR tp: termios): INTEGER;
141 PROCEDURE [ccall] tcsetattr* (fd: INTEGER; action: INTEGER; VAR tp: termios): INTEGER;
143 PROCEDURE [ccall] tcdrain* (fd: INTEGER): INTEGER;
144 PROCEDURE [ccall] tcflow* (fd: INTEGER; action: INTEGER): INTEGER;
145 PROCEDURE [ccall] tcflush* (fd: INTEGER; action: INTEGER): INTEGER;
146 PROCEDURE [ccall] tcsendbreak* (fd: INTEGER; len: INTEGER): INTEGER;
148 END LinTermios.