index d8f2fd26cbfd4fe8f5be5e13ba7c83e9a91bf076..459b6b605183f5e85227bb8a250c8a8e8d60c985 100644 (file)
MODULE LinTermios ["libc.so.66.0"];
(*
- A. V. Shiryaev, 2012.09
+ A. V. Shiryaev, 2012.11
OpenBSD 5.2
32-bit
VMIN* = 16; (* !ICANON *)
VTIME* = 17; (* !ICANON *)
NCCS* = 20;
- IGNBRK* = 00000001H; (* ignore BREAK condition *)
- BRKINT* = 00000002H; (* map BREAK to SIGINT *)
- IGNPAR* = 00000004H; (* ignore (discard) parity errors *)
- PARMRK* = 00000008H; (* mark parity and framing errors *)
- INPCK* = 00000010H; (* enable checking of parity errors *)
- ISTRIP* = 00000020H; (* strip 8th bit off chars *)
- INLCR* = 00000040H; (* map NL into CR *)
- IGNCR* = 00000080H; (* ignore CR *)
- ICRNL* = 00000100H; (* map CR to NL (ala CRMOD) *)
- IXON* = 00000200H; (* enable output flow control *)
- IXOFF* = 00000400H; (* enable input flow control *)
- OPOST* = 00000001H; (* enable following output processing *)
- CSIZE* = 00000300H; (* character size mask *)
- CS5* = 00000000H; (* 5 bits (pseudo) *)
- CS6* = 00000100H; (* 6 bits *)
- CS7* = 00000200H; (* 7 bits *)
- CS8* = 00000300H; (* 8 bits *)
- CSTOPB* = 00000400H; (* send 2 stop bits *)
- CREAD* = 00000800H; (* enable receiver *)
- PARENB* = 00001000H; (* parity enable *)
- PARODD* = 00002000H; (* odd parity, else even *)
- HUPCL* = 00004000H; (* hang up on last close *)
- CLOCAL* = 00008000H; (* ignore modem status lines *)
- ECHOE* = 00000002H; (* visually erase chars *)
- ECHOK* = 00000004H; (* echo NL after line kill *)
- ECHO* = 00000008H; (* enable echoing *)
- ECHONL* = 00000010H; (* echo NL even if ECHO is off *)
- ISIG* = 00000080H; (* enable signals INTR, QUIT, [D]SUSP *)
- ICANON* = 00000100H; (* canonicalize input lines *)
- IEXTEN* = 00000400H; (* enable DISCARD and LNEXT *)
- EXTPROC* = 00000800H; (* external processing *)
- TOSTOP* = 00400000H; (* stop background jobs from output *)
- NOFLSH* = 80000000H; (* don't flush after interrupt *)
+ IGNBRK* = 00000001H; (* {0} *) (* ignore BREAK condition *)
+ BRKINT* = 00000002H; (* {1} *) (* map BREAK to SIGINT *)
+ IGNPAR* = 00000004H; (* {2} *) (* ignore (discard) parity errors *)
+ PARMRK* = 00000008H; (* {3} *) (* mark parity and framing errors *)
+ INPCK* = 00000010H; (* {4} *) (* enable checking of parity errors *)
+ ISTRIP* = 00000020H; (* {5} *) (* strip 8th bit off chars *)
+ INLCR* = 00000040H; (* {6} *) (* map NL into CR *)
+ IGNCR* = 00000080H; (* {7} *) (* ignore CR *)
+ ICRNL* = 00000100H; (* {8} *) (* map CR to NL (ala CRMOD) *)
+ IXON* = 00000200H; (* {9} *) (* enable output flow control *)
+ IXOFF* = 00000400H; (* {10} *) (* enable input flow control *)
+ OPOST* = 00000001H; (* {0} *) (* enable following output processing *)
+ CSIZE* = 00000300H; (* {8,9} *) (* character size mask *)
+ CS5* = 00000000H; (* {} *) (* 5 bits (pseudo) *)
+ CS6* = 00000100H; (* {8} *) (* 6 bits *)
+ CS7* = 00000200H; (* {9} *) (* 7 bits *)
+ CS8* = 00000300H; (* {8,9} *) (* 8 bits *)
+ CSTOPB* = 00000400H; (* {10} *) (* send 2 stop bits *)
+ CREAD* = 00000800H; (* {11} *) (* enable receiver *)
+ PARENB* = 00001000H; (* {12} *) (* parity enable *)
+ PARODD* = 00002000H; (* {13} *) (* odd parity, else even *)
+ HUPCL* = 00004000H; (* {14} *) (* hang up on last close *)
+ CLOCAL* = 00008000H; (* {15} *) (* ignore modem status lines *)
+ ECHOE* = 00000002H; (* {1} *) (* visually erase chars *)
+ ECHOK* = 00000004H; (* {2} *) (* echo NL after line kill *)
+ ECHO* = 00000008H; (* {3} *) (* enable echoing *)
+ ECHONL* = 00000010H; (* {4} *) (* echo NL even if ECHO is off *)
+ ISIG* = 00000080H; (* {7} *) (* enable signals INTR, QUIT, [D]SUSP *)
+ ICANON* = 00000100H; (* {8} *) (* canonicalize input lines *)
+ IEXTEN* = 00000400H; (* {10} *) (* enable DISCARD and LNEXT *)
+ EXTPROC* = 00000800H; (* {11} *) (* external processing *)
+ TOSTOP* = 00400000H; (* {22} *) (* stop background jobs from output *)
+ NOFLSH* = 80000000H; (* {31} *) (* don't flush after interrupt *)
TCSANOW* = 0; (* make change immediate *)
TCSADRAIN* = 1; (* drain output, then change *)
TCSAFLUSH* = 2; (* drain output, flush input *)
VLNEXT* = 14; (* IEXTEN *)
VDISCARD* = 15; (* IEXTEN *)
VSTATUS* = 18; (* ICANON *)
- IXANY* = 00000800H; (* any char will restart after stop *)
- IUCLC* = 00001000H; (* translate upper to lower case *)
- IMAXBEL* = 00002000H; (* ring bell on input queue full *)
- ONLCR* = 00000002H; (* map NL to CR-NL (ala CRMOD) *)
- OXTABS* = 00000004H; (* expand tabs to spaces *)
- ONOEOT* = 00000008H; (* discard EOT's (^D) on output *)
- OCRNL* = 00000010H; (* map CR to NL *)
- OLCUC* = 00000020H; (* translate lower case to upper case *)
- ONOCR* = 00000040H; (* No CR output at column 0 *)
- ONLRET* = 00000080H; (* NL performs the CR function *)
- CIGNORE* = 00000001H; (* ignore control flags *)
- CRTSCTS* = 00010000H; (* RTS/CTS full-duplex flow control *)
- CRTS_IFLOW* = CRTSCTS; (* XXX compat *)
- CCTS_OFLOW* = CRTSCTS; (* XXX compat *)
- MDMBUF* = 00100000H; (* DTR/DCD hardware flow control *)
- ECHOKE* = 00000001H; (* visual erase for line kill *)
- ECHOPRT* = 00000020H; (* visual erase mode for hardcopy *)
- ECHOCTL* = 00000040H; (* echo control chars as ^(Char) *)
- ALTWERASE* = 00000200H; (* use alternate WERASE algorithm *)
- FLUSHO* = 00800000H; (* output being flushed (state) *)
- XCASE* = 01000000H; (* canonical upper/lower case *)
- NOKERNINFO* = 02000000H; (* no kernel output from VSTATUS *)
- PENDIN* = 20000000H; (* XXX retype pending input (state) *)
- TCSASOFT* = 10H; (* flag - don't alter h.w. state *)
+ IXANY* = 00000800H; (* {11} *) (* any char will restart after stop *)
+ IUCLC* = 00001000H; (* {12} *) (* translate upper to lower case *)
+ IMAXBEL* = 00002000H; (* {13} *) (* ring bell on input queue full *)
+ ONLCR* = 00000002H; (* {1} *) (* map NL to CR-NL (ala CRMOD) *)
+ OXTABS* = 00000004H; (* {2} *) (* expand tabs to spaces *)
+ ONOEOT* = 00000008H; (* {3} *) (* discard EOT's (^D) on output *)
+ OCRNL* = 00000010H; (* {4} *) (* map CR to NL *)
+ OLCUC* = 00000020H; (* {5} *) (* translate lower case to upper case *)
+ ONOCR* = 00000040H; (* {6} *) (* No CR output at column 0 *)
+ ONLRET* = 00000080H; (* {7} *) (* NL performs the CR function *)
+ CIGNORE* = 00000001H; (* {0} *) (* ignore control flags *)
+ CRTSCTS* = 00010000H; (* {16} *) (* RTS/CTS full-duplex flow control *)
+ MDMBUF* = 00100000H; (* {20} *) (* DTR/DCD hardware flow control *)
+ ECHOKE* = 00000001H; (* {0} *) (* visual erase for line kill *)
+ ECHOPRT* = 00000020H; (* {5} *) (* visual erase mode for hardcopy *)
+ ECHOCTL* = 00000040H; (* {6} *) (* echo control chars as ^(Char) *)
+ ALTWERASE* = 00000200H; (* {9} *) (* use alternate WERASE algorithm *)
+ FLUSHO* = 00800000H; (* {23} *) (* output being flushed (state) *)
+ XCASE* = 01000000H; (* {24} *) (* canonical upper/lower case *)
+ NOKERNINFO* = 02000000H; (* {25} *) (* no kernel output from VSTATUS *)
+ PENDIN* = 20000000H; (* {29} *) (* XXX retype pending input (state) *)
+ TCSASOFT* = 10H; (* {4} *) (* flag - don't alter h.w. state *)
B7200* = 7200;
B14400* = 14400;
B28800* = 28800;
c_oflag*: tcflag_t; (* output flags *)
c_cflag*: tcflag_t; (* control flags *)
c_lflag*: tcflag_t; (* local flags *)
- cc_t*: ARRAY [untagged] NCCS OF cc_t; (* control chars *)
+ c_cc*: ARRAY [untagged] NCCS OF cc_t; (* control chars *)
c_ispeed*: INTEGER; (* input speed *)
c_ospeed*: INTEGER; (* output speed *)
END;