| ... | ... | @@ -1788,99 +1788,103 @@ pub const V = struct { |
| 1788 | 1788 | |
| 1789 | 1789 | pub const NCCS = 20; // 2 spares (7, 19) |
| 1790 | 1790 | |
| 1791 | | pub const IGNBRK = 0x00000001; // ignore BREAK condition |
| 1792 | | pub const BRKINT = 0x00000002; // map BREAK to SIGINTR |
| 1793 | | pub const IGNPAR = 0x00000004; // ignore (discard) parity errors |
| 1794 | | pub const PARMRK = 0x00000008; // mark parity and framing errors |
| 1795 | | pub const INPCK = 0x00000010; // enable checking of parity errors |
| 1796 | | pub const ISTRIP = 0x00000020; // strip 8th bit off chars |
| 1797 | | pub const INLCR = 0x00000040; // map NL into CR |
| 1798 | | pub const IGNCR = 0x00000080; // ignore CR |
| 1799 | | pub const ICRNL = 0x00000100; // map CR to NL (ala CRMOD) |
| 1800 | | pub const IXON = 0x00000200; // enable output flow control |
| 1801 | | pub const IXOFF = 0x00000400; // enable input flow control |
| 1802 | | pub const IXANY = 0x00000800; // any char will restart after stop |
| 1803 | | pub const IMAXBEL = 0x00002000; // ring bell on input queue full |
| 1804 | | pub const IUTF8 = 0x00004000; // maintain state for UTF-8 VERASE |
| 1805 | | |
| 1806 | | pub const OPOST = 0x00000001; //enable following output processing |
| 1807 | | pub const ONLCR = 0x00000002; // map NL to CR-NL (ala CRMOD) |
| 1808 | | pub const OXTABS = 0x00000004; // expand tabs to spaces |
| 1809 | | pub const ONOEOT = 0x00000008; // discard EOT's (^D) on output) |
| 1810 | | |
| 1811 | | pub const OCRNL = 0x00000010; // map CR to NL on output |
| 1812 | | pub const ONOCR = 0x00000020; // no CR output at column 0 |
| 1813 | | pub const ONLRET = 0x00000040; // NL performs CR function |
| 1814 | | pub const OFILL = 0x00000080; // use fill characters for delay |
| 1815 | | pub const NLDLY = 0x00000300; // \n delay |
| 1816 | | pub const TABDLY = 0x00000c04; // horizontal tab delay |
| 1817 | | pub const CRDLY = 0x00003000; // \r delay |
| 1818 | | pub const FFDLY = 0x00004000; // form feed delay |
| 1819 | | pub const BSDLY = 0x00008000; // \b delay |
| 1820 | | pub const VTDLY = 0x00010000; // vertical tab delay |
| 1821 | | pub const OFDEL = 0x00020000; // fill is DEL, else NUL |
| 1822 | | |
| 1823 | | pub const NL0 = 0x00000000; |
| 1824 | | pub const NL1 = 0x00000100; |
| 1825 | | pub const NL2 = 0x00000200; |
| 1826 | | pub const NL3 = 0x00000300; |
| 1827 | | pub const TAB0 = 0x00000000; |
| 1828 | | pub const TAB1 = 0x00000400; |
| 1829 | | pub const TAB2 = 0x00000800; |
| 1830 | | pub const TAB3 = 0x00000004; |
| 1831 | | pub const CR0 = 0x00000000; |
| 1832 | | pub const CR1 = 0x00001000; |
| 1833 | | pub const CR2 = 0x00002000; |
| 1834 | | pub const CR3 = 0x00003000; |
| 1835 | | pub const FF0 = 0x00000000; |
| 1836 | | pub const FF1 = 0x00004000; |
| 1837 | | pub const BS0 = 0x00000000; |
| 1838 | | pub const BS1 = 0x00008000; |
| 1839 | | pub const VT0 = 0x00000000; |
| 1840 | | pub const VT1 = 0x00010000; |
| 1841 | | |
| 1842 | | pub const CIGNORE = 0x00000001; // ignore control flags |
| 1843 | | pub const CSIZE = 0x00000300; // character size mask |
| 1844 | | pub const CS5 = 0x00000000; // 5 bits (pseudo) |
| 1845 | | pub const CS6 = 0x00000100; // 6 bits |
| 1846 | | pub const CS7 = 0x00000200; // 7 bits |
| 1847 | | pub const CS8 = 0x00000300; // 8 bits |
| 1848 | | pub const CSTOPB = 0x0000040; // send 2 stop bits |
| 1849 | | pub const CREAD = 0x00000800; // enable receiver |
| 1850 | | pub const PARENB = 0x00001000; // parity enable |
| 1851 | | pub const PARODD = 0x00002000; // odd parity, else even |
| 1852 | | pub const HUPCL = 0x00004000; // hang up on last close |
| 1853 | | pub const CLOCAL = 0x00008000; // ignore modem status lines |
| 1854 | | pub const CCTS_OFLOW = 0x00010000; // CTS flow control of output |
| 1855 | | pub const CRTSCTS = (CCTS_OFLOW | CRTS_IFLOW); |
| 1856 | | pub const CRTS_IFLOW = 0x00020000; // RTS flow control of input |
| 1857 | | pub const CDTR_IFLOW = 0x00040000; // DTR flow control of input |
| 1858 | | pub const CDSR_OFLOW = 0x00080000; // DSR flow control of output |
| 1859 | | pub const CCAR_OFLOW = 0x00100000; // DCD flow control of output |
| 1860 | | pub const MDMBUF = 0x00100000; // old name for CCAR_OFLOW |
| 1861 | | |
| 1862 | | pub const ECHOKE = 0x00000001; // visual erase for line kill |
| 1863 | | pub const ECHOE = 0x00000002; // visually erase chars |
| 1864 | | pub const ECHOK = 0x00000004; // echo NL after line kill |
| 1865 | | pub const ECHO = 0x00000008; // enable echoing |
| 1866 | | pub const ECHONL = 0x00000010; // echo NL even if ECHO is off |
| 1867 | | pub const ECHOPRT = 0x00000020; // visual erase mode for hardcopy |
| 1868 | | pub const ECHOCTL = 0x00000040; // echo control chars as ^(Char) |
| 1869 | | pub const ISIG = 0x00000080; // enable signals INTR, QUIT, [D]SUSP |
| 1870 | | pub const ICANON = 0x00000100; // canonicalize input lines |
| 1871 | | pub const ALTWERASE = 0x00000200; // use alternate WERASE algorithm |
| 1872 | | pub const IEXTEN = 0x00000400; // enable DISCARD and LNEXT |
| 1873 | | pub const EXTPROC = 0x00000800; // external processing |
| 1874 | | pub const TOSTOP = 0x00400000; // stop background jobs from output |
| 1875 | | pub const FLUSHO = 0x00800000; // output being flushed (state) |
| 1876 | | pub const NOKERNINFO = 0x02000000; // no kernel output from VSTATUS |
| 1877 | | pub const PENDIN = 0x20000000; // XXX retype pending input (state) |
| 1878 | | pub const NOFLSH = 0x80000000; // don't flush after interrupt |
| 1879 | | |
| 1880 | | pub const TCSANOW = 0; // make change immediate |
| 1881 | | pub const TCSADRAIN = 1; // drain output, then change |
| 1882 | | pub const TCSAFLUSH = 2; // drain output, flush input |
| 1883 | | pub const TCSASOFT = 0x10; // flag - don't alter h.w. state |
| 1791 | pub const cc_t = u8; |
| 1792 | pub const speed_t = u64; |
| 1793 | pub const tcflag_t = u64; |
| 1794 | |
| 1795 | pub const IGNBRK: tcflag_t = 0x00000001; // ignore BREAK condition |
| 1796 | pub const BRKINT: tcflag_t = 0x00000002; // map BREAK to SIGINTR |
| 1797 | pub const IGNPAR: tcflag_t = 0x00000004; // ignore (discard) parity errors |
| 1798 | pub const PARMRK: tcflag_t = 0x00000008; // mark parity and framing errors |
| 1799 | pub const INPCK: tcflag_t = 0x00000010; // enable checking of parity errors |
| 1800 | pub const ISTRIP: tcflag_t = 0x00000020; // strip 8th bit off chars |
| 1801 | pub const INLCR: tcflag_t = 0x00000040; // map NL into CR |
| 1802 | pub const IGNCR: tcflag_t = 0x00000080; // ignore CR |
| 1803 | pub const ICRNL: tcflag_t = 0x00000100; // map CR to NL (ala CRMOD) |
| 1804 | pub const IXON: tcflag_t = 0x00000200; // enable output flow control |
| 1805 | pub const IXOFF: tcflag_t = 0x00000400; // enable input flow control |
| 1806 | pub const IXANY: tcflag_t = 0x00000800; // any char will restart after stop |
| 1807 | pub const IMAXBEL: tcflag_t = 0x00002000; // ring bell on input queue full |
| 1808 | pub const IUTF8: tcflag_t = 0x00004000; // maintain state for UTF-8 VERASE |
| 1809 | |
| 1810 | pub const OPOST: tcflag_t = 0x00000001; //enable following output processing |
| 1811 | pub const ONLCR: tcflag_t = 0x00000002; // map NL to CR-NL (ala CRMOD) |
| 1812 | pub const OXTABS: tcflag_t = 0x00000004; // expand tabs to spaces |
| 1813 | pub const ONOEOT: tcflag_t = 0x00000008; // discard EOT's (^D) on output) |
| 1814 | |
| 1815 | pub const OCRNL: tcflag_t = 0x00000010; // map CR to NL on output |
| 1816 | pub const ONOCR: tcflag_t = 0x00000020; // no CR output at column 0 |
| 1817 | pub const ONLRET: tcflag_t = 0x00000040; // NL performs CR function |
| 1818 | pub const OFILL: tcflag_t = 0x00000080; // use fill characters for delay |
| 1819 | pub const NLDLY: tcflag_t = 0x00000300; // \n delay |
| 1820 | pub const TABDLY: tcflag_t = 0x00000c04; // horizontal tab delay |
| 1821 | pub const CRDLY: tcflag_t = 0x00003000; // \r delay |
| 1822 | pub const FFDLY: tcflag_t = 0x00004000; // form feed delay |
| 1823 | pub const BSDLY: tcflag_t = 0x00008000; // \b delay |
| 1824 | pub const VTDLY: tcflag_t = 0x00010000; // vertical tab delay |
| 1825 | pub const OFDEL: tcflag_t = 0x00020000; // fill is DEL, else NUL |
| 1826 | |
| 1827 | pub const NL0: tcflag_t = 0x00000000; |
| 1828 | pub const NL1: tcflag_t = 0x00000100; |
| 1829 | pub const NL2: tcflag_t = 0x00000200; |
| 1830 | pub const NL3: tcflag_t = 0x00000300; |
| 1831 | pub const TAB0: tcflag_t = 0x00000000; |
| 1832 | pub const TAB1: tcflag_t = 0x00000400; |
| 1833 | pub const TAB2: tcflag_t = 0x00000800; |
| 1834 | pub const TAB3: tcflag_t = 0x00000004; |
| 1835 | pub const CR0: tcflag_t = 0x00000000; |
| 1836 | pub const CR1: tcflag_t = 0x00001000; |
| 1837 | pub const CR2: tcflag_t = 0x00002000; |
| 1838 | pub const CR3: tcflag_t = 0x00003000; |
| 1839 | pub const FF0: tcflag_t = 0x00000000; |
| 1840 | pub const FF1: tcflag_t = 0x00004000; |
| 1841 | pub const BS0: tcflag_t = 0x00000000; |
| 1842 | pub const BS1: tcflag_t = 0x00008000; |
| 1843 | pub const VT0: tcflag_t = 0x00000000; |
| 1844 | pub const VT1: tcflag_t = 0x00010000; |
| 1845 | |
| 1846 | pub const CIGNORE: tcflag_t = 0x00000001; // ignore control flags |
| 1847 | pub const CSIZE: tcflag_t = 0x00000300; // character size mask |
| 1848 | pub const CS5: tcflag_t = 0x00000000; // 5 bits (pseudo) |
| 1849 | pub const CS6: tcflag_t = 0x00000100; // 6 bits |
| 1850 | pub const CS7: tcflag_t = 0x00000200; // 7 bits |
| 1851 | pub const CS8: tcflag_t = 0x00000300; // 8 bits |
| 1852 | pub const CSTOPB: tcflag_t = 0x0000040; // send 2 stop bits |
| 1853 | pub const CREAD: tcflag_t = 0x00000800; // enable receiver |
| 1854 | pub const PARENB: tcflag_t = 0x00001000; // parity enable |
| 1855 | pub const PARODD: tcflag_t = 0x00002000; // odd parity, else even |
| 1856 | pub const HUPCL: tcflag_t = 0x00004000; // hang up on last close |
| 1857 | pub const CLOCAL: tcflag_t = 0x00008000; // ignore modem status lines |
| 1858 | pub const CCTS_OFLOW: tcflag_t = 0x00010000; // CTS flow control of output |
| 1859 | pub const CRTSCTS: tcflag_t = (CCTS_OFLOW | CRTS_IFLOW); |
| 1860 | pub const CRTS_IFLOW: tcflag_t = 0x00020000; // RTS flow control of input |
| 1861 | pub const CDTR_IFLOW: tcflag_t = 0x00040000; // DTR flow control of input |
| 1862 | pub const CDSR_OFLOW: tcflag_t = 0x00080000; // DSR flow control of output |
| 1863 | pub const CCAR_OFLOW: tcflag_t = 0x00100000; // DCD flow control of output |
| 1864 | pub const MDMBUF: tcflag_t = 0x00100000; // old name for CCAR_OFLOW |
| 1865 | |
| 1866 | pub const ECHOKE: tcflag_t = 0x00000001; // visual erase for line kill |
| 1867 | pub const ECHOE: tcflag_t = 0x00000002; // visually erase chars |
| 1868 | pub const ECHOK: tcflag_t = 0x00000004; // echo NL after line kill |
| 1869 | pub const ECHO: tcflag_t = 0x00000008; // enable echoing |
| 1870 | pub const ECHONL: tcflag_t = 0x00000010; // echo NL even if ECHO is off |
| 1871 | pub const ECHOPRT: tcflag_t = 0x00000020; // visual erase mode for hardcopy |
| 1872 | pub const ECHOCTL: tcflag_t = 0x00000040; // echo control chars as ^(Char) |
| 1873 | pub const ISIG: tcflag_t = 0x00000080; // enable signals INTR, QUIT, [D]SUSP |
| 1874 | pub const ICANON: tcflag_t = 0x00000100; // canonicalize input lines |
| 1875 | pub const ALTWERASE: tcflag_t = 0x00000200; // use alternate WERASE algorithm |
| 1876 | pub const IEXTEN: tcflag_t = 0x00000400; // enable DISCARD and LNEXT |
| 1877 | pub const EXTPROC: tcflag_t = 0x00000800; // external processing |
| 1878 | pub const TOSTOP: tcflag_t = 0x00400000; // stop background jobs from output |
| 1879 | pub const FLUSHO: tcflag_t = 0x00800000; // output being flushed (state) |
| 1880 | pub const NOKERNINFO: tcflag_t = 0x02000000; // no kernel output from VSTATUS |
| 1881 | pub const PENDIN: tcflag_t = 0x20000000; // XXX retype pending input (state) |
| 1882 | pub const NOFLSH: tcflag_t = 0x80000000; // don't flush after interrupt |
| 1883 | |
| 1884 | pub const TCSANOW: tcflag_t = 0; // make change immediate |
| 1885 | pub const TCSADRAIN: tcflag_t = 1; // drain output, then change |
| 1886 | pub const TCSAFLUSH: tcflag_t = 2; // drain output, flush input |
| 1887 | pub const TCSASOFT: tcflag_t = 0x10; // flag - don't alter h.w. state |
| 1884 | 1888 | pub const TCSA = enum(c_uint) { |
| 1885 | 1889 | NOW, |
| 1886 | 1890 | DRAIN, |
| ... | ... | @@ -1888,43 +1892,39 @@ pub const TCSA = enum(c_uint) { |
| 1888 | 1892 | _, |
| 1889 | 1893 | }; |
| 1890 | 1894 | |
| 1891 | | pub const B0 = 0; |
| 1892 | | pub const B50 = 50; |
| 1893 | | pub const B75 = 75; |
| 1894 | | pub const B110 = 110; |
| 1895 | | pub const B134 = 134; |
| 1896 | | pub const B150 = 150; |
| 1897 | | pub const B200 = 200; |
| 1898 | | pub const B300 = 300; |
| 1899 | | pub const B600 = 600; |
| 1900 | | pub const B1200 = 1200; |
| 1901 | | pub const B1800 = 1800; |
| 1902 | | pub const B2400 = 2400; |
| 1903 | | pub const B4800 = 4800; |
| 1904 | | pub const B9600 = 9600; |
| 1905 | | pub const B19200 = 19200; |
| 1906 | | pub const B38400 = 38400; |
| 1907 | | pub const B7200 = 7200; |
| 1908 | | pub const B14400 = 14400; |
| 1909 | | pub const B28800 = 28800; |
| 1910 | | pub const B57600 = 57600; |
| 1911 | | pub const B76800 = 76800; |
| 1912 | | pub const B115200 = 115200; |
| 1913 | | pub const B230400 = 230400; |
| 1914 | | pub const EXTA = 19200; |
| 1915 | | pub const EXTB = 38400; |
| 1916 | | |
| 1917 | | pub const TCIFLUSH = 1; |
| 1918 | | pub const TCOFLUSH = 2; |
| 1919 | | pub const TCIOFLUSH = 3; |
| 1920 | | pub const TCOOFF = 1; |
| 1921 | | pub const TCOON = 2; |
| 1922 | | pub const TCIOFF = 3; |
| 1923 | | pub const TCION = 4; |
| 1924 | | |
| 1925 | | pub const cc_t = u8; |
| 1926 | | pub const speed_t = u64; |
| 1927 | | pub const tcflag_t = u64; |
| 1895 | pub const B0: tcflag_t = 0; |
| 1896 | pub const B50: tcflag_t = 50; |
| 1897 | pub const B75: tcflag_t = 75; |
| 1898 | pub const B110: tcflag_t = 110; |
| 1899 | pub const B134: tcflag_t = 134; |
| 1900 | pub const B150: tcflag_t = 150; |
| 1901 | pub const B200: tcflag_t = 200; |
| 1902 | pub const B300: tcflag_t = 300; |
| 1903 | pub const B600: tcflag_t = 600; |
| 1904 | pub const B1200: tcflag_t = 1200; |
| 1905 | pub const B1800: tcflag_t = 1800; |
| 1906 | pub const B2400: tcflag_t = 2400; |
| 1907 | pub const B4800: tcflag_t = 4800; |
| 1908 | pub const B9600: tcflag_t = 9600; |
| 1909 | pub const B19200: tcflag_t = 19200; |
| 1910 | pub const B38400: tcflag_t = 38400; |
| 1911 | pub const B7200: tcflag_t = 7200; |
| 1912 | pub const B14400: tcflag_t = 14400; |
| 1913 | pub const B28800: tcflag_t = 28800; |
| 1914 | pub const B57600: tcflag_t = 57600; |
| 1915 | pub const B76800: tcflag_t = 76800; |
| 1916 | pub const B115200: tcflag_t = 115200; |
| 1917 | pub const B230400: tcflag_t = 230400; |
| 1918 | pub const EXTA: tcflag_t = 19200; |
| 1919 | pub const EXTB: tcflag_t = 38400; |
| 1920 | |
| 1921 | pub const TCIFLUSH: tcflag_t = 1; |
| 1922 | pub const TCOFLUSH: tcflag_t = 2; |
| 1923 | pub const TCIOFLUSH: tcflag_t = 3; |
| 1924 | pub const TCOOFF: tcflag_t = 1; |
| 1925 | pub const TCOON: tcflag_t = 2; |
| 1926 | pub const TCIOFF: tcflag_t = 3; |
| 1927 | pub const TCION: tcflag_t = 4; |
| 1928 | 1928 | |
| 1929 | 1929 | pub const termios = extern struct { |
| 1930 | 1930 | iflag: tcflag_t, // input flags |