authorgravatar for kappaloris@gmail.comLoris Cro <kappaloris@gmail.com> 2020-12-23 17:27:00+01:00
committergravatar for kappaloris@gmail.comLoris Cro <kappaloris@gmail.com> 2020-12-23 17:28:59+01:00
log9bb0da6100a07999058a0d0d17c2a4c22397cc9d
tree421dac76c5be822a76f0f6bf4e5fe28c64569306
parent8c00c7473c72a18e22666ee6bfb0f4ffdad63695

added comments, removed useless comptime keywords


1 files changed, 81 insertions(+), 81 deletions(-)

lib/std/os/bits/darwin.zig+81-81
......@@ -1576,37 +1576,37 @@ pub const VTIME = 17;
15761576pub const VSTATUS = 18;
15771577pub const NCCS = 20; // 2 spares (7, 19)
15781578
1579pub const IGNBRK = 0x00000001;
1580pub const BRKINT = 0x00000002;
1581pub const IGNPAR = 0x00000004;
1582pub const PARMRK = 0x00000008;
1583pub const INPCK = 0x00000010;
1584pub const ISTRIP = 0x00000020;
1585pub const INLCR = 0x00000040;
1586pub const IGNCR = 0x00000080;
1587pub const ICRNL = 0x00000100;
1588pub const IXON = 0x00000200;
1589pub const IXOFF = 0x00000400;
1590pub const IXANY = 0x00000800;
1591pub const IMAXBEL = 0x00002000;
1592pub const IUTF8 = 0x00004000;
1593
1594pub const OPOST = 0x00000001;
1595pub const ONLCR = 0x00000002;
1596pub const OXTABS = 0x00000004;
1597pub const ONOEOT = 0x00000008;
1598
1599pub const OCRNL = 0x00000010;
1600pub const ONOCR = 0x00000020;
1601pub const ONLRET = 0x00000040;
1602pub const OFILL = 0x00000080;
1603pub const NLDLY = 0x00000300;
1604pub const TABDLY = 0x00000c04;
1605pub const CRDLY = 0x00003000;
1606pub const FFDLY = 0x00004000;
1607pub const BSDLY = 0x00008000;
1608pub const VTDLY = 0x00010000;
1609pub const OFDEL = 0x00020000;
1579pub const IGNBRK = 0x00000001; // ignore BREAK condition
1580pub const BRKINT = 0x00000002; // map BREAK to SIGINTR
1581pub const IGNPAR = 0x00000004; // ignore (discard) parity errors
1582pub const PARMRK = 0x00000008; // mark parity and framing errors
1583pub const INPCK = 0x00000010; // enable checking of parity errors
1584pub const ISTRIP = 0x00000020; // strip 8th bit off chars
1585pub const INLCR = 0x00000040; // map NL into CR
1586pub const IGNCR = 0x00000080; // ignore CR
1587pub const ICRNL = 0x00000100; // map CR to NL (ala CRMOD)
1588pub const IXON = 0x00000200; // enable output flow control
1589pub const IXOFF = 0x00000400; // enable input flow control
1590pub const IXANY = 0x00000800; // any char will restart after stop
1591pub const IMAXBEL = 0x00002000; // ring bell on input queue full
1592pub const IUTF8 = 0x00004000; // maintain state for UTF-8 VERASE
1593
1594pub const OPOST = 0x00000001; //enable following output processing
1595pub const ONLCR = 0x00000002; // map NL to CR-NL (ala CRMOD)
1596pub const OXTABS = 0x00000004; // expand tabs to spaces
1597pub const ONOEOT = 0x00000008; // discard EOT's (^D) on output)
1598
1599pub const OCRNL = 0x00000010; // map CR to NL on output
1600pub const ONOCR = 0x00000020; // no CR output at column 0
1601pub const ONLRET = 0x00000040; // NL performs CR function
1602pub const OFILL = 0x00000080; // use fill characters for delay
1603pub const NLDLY = 0x00000300; // \n delay
1604pub const TABDLY = 0x00000c04; // horizontal tab delay
1605pub const CRDLY = 0x00003000; // \r delay
1606pub const FFDLY = 0x00004000; // form feed delay
1607pub const BSDLY = 0x00008000; // \b delay
1608pub const VTDLY = 0x00010000; // vertical tab delay
1609pub const OFDEL = 0x00020000; // fill is DEL, else NUL
16101610
16111611pub const NL0 = 0x00000000;
16121612pub const NL1 = 0x00000100;
......@@ -1627,48 +1627,48 @@ pub const BS1 = 0x00008000;
16271627pub const VT0 = 0x00000000;
16281628pub const VT1 = 0x00010000;
16291629
1630pub const CIGNORE = 0x00000001;
1631pub const CSIZE = 0x00000300;
1632pub const CS5 = 0x00000000;
1633pub const CS6 = 0x00000100;
1634pub const CS7 = 0x00000200;
1635pub const CS8 = 0x00000300;
1636pub const CSTOPB = 0x00000400;
1637pub const CREAD = 0x00000800;
1638pub const PARENB = 0x00001000;
1639pub const PARODD = 0x00002000;
1640pub const HUPCL = 0x00004000;
1641pub const CLOCAL = 0x00008000;
1642pub const CCTS_OFLOW = 0x00010000;
1630pub const CIGNORE = 0x00000001; // ignore control flags
1631pub const CSIZE = 0x00000300; // character size mask
1632pub const CS5 = 0x00000000; // 5 bits (pseudo)
1633pub const CS6 = 0x00000100; // 6 bits
1634pub const CS7 = 0x00000200; // 7 bits
1635pub const CS8 = 0x00000300; // 8 bits
1636pub const CSTOPB = 0x0000040; // send 2 stop bits
1637pub const CREAD = 0x00000800; // enable receiver
1638pub const PARENB = 0x00001000; // parity enable
1639pub const PARODD = 0x00002000; // odd parity, else even
1640pub const HUPCL = 0x00004000; // hang up on last close
1641pub const CLOCAL = 0x00008000; // ignore modem status lines
1642pub const CCTS_OFLOW = 0x00010000; // CTS flow control of output
16431643pub const CRTSCTS = (CCTS_OFLOW | CRTS_IFLOW);
1644pub const CRTS_IFLOW = 0x00020000;
1645pub const CDTR_IFLOW = 0x00040000;
1646pub const CDSR_OFLOW = 0x00080000;
1647pub const CCAR_OFLOW = 0x00100000;
1648pub const MDMBUF = 0x00100000;
1649
1650pub const ECHOKE = 0x00000001;
1651pub const ECHOE = 0x00000002;
1652pub const ECHOK = 0x00000004;
1653pub const ECHO = 0x00000008;
1654pub const ECHONL = 0x00000010;
1655pub const ECHOPRT = 0x00000020;
1656pub const ECHOCTL = 0x00000040;
1657pub const ISIG = 0x00000080;
1658pub const ICANON = 0x00000100;
1659pub const ALTWERASE = 0x00000200;
1660pub const IEXTEN = 0x00000400;
1661pub const EXTPROC = 0x00000800;
1662pub const TOSTOP = 0x00400000;
1663pub const FLUSHO = 0x00800000;
1664pub const NOKERNINFO = 0x02000000;
1665pub const PENDIN = 0x20000000;
1666pub const NOFLSH = 0x80000000;
1667
1668pub const TCSANOW = 0;
1669pub const TCSADRAIN = 1;
1670pub const TCSAFLUSH = 2;
1671pub const TCSASOFT = 0x10;
1644pub const CRTS_IFLOW = 0x00020000; // RTS flow control of input
1645pub const CDTR_IFLOW = 0x00040000; // DTR flow control of input
1646pub const CDSR_OFLOW = 0x00080000; // DSR flow control of output
1647pub const CCAR_OFLOW = 0x00100000; // DCD flow control of output
1648pub const MDMBUF = 0x00100000; // old name for CCAR_OFLOW
1649
1650pub const ECHOKE = 0x00000001; // visual erase for line kill
1651pub const ECHOE = 0x00000002; // visually erase chars
1652pub const ECHOK = 0x00000004; // echo NL after line kill
1653pub const ECHO = 0x00000008; // enable echoing
1654pub const ECHONL = 0x00000010; // echo NL even if ECHO is off
1655pub const ECHOPRT = 0x00000020; // visual erase mode for hardcopy
1656pub const ECHOCTL = 0x00000040; // echo control chars as ^(Char)
1657pub const ISIG = 0x00000080; // enable signals INTR, QUIT, [D]SUSP
1658pub const ICANON = 0x00000100; // canonicalize input lines
1659pub const ALTWERASE = 0x00000200; // use alternate WERASE algorithm
1660pub const IEXTEN = 0x00000400; // enable DISCARD and LNEXT
1661pub const EXTPROC = 0x00000800; // external processing
1662pub const TOSTOP = 0x00400000; // stop background jobs from output
1663pub const FLUSHO = 0x00800000; // output being flushed (state)
1664pub const NOKERNINFO = 0x02000000; // no kernel output from VSTATUS
1665pub const PENDIN = 0x20000000; // XXX retype pending input (state)
1666pub const NOFLSH = 0x80000000; // don't flush after interrupt
1667
1668pub const TCSANOW = 0; // make change immediate
1669pub const TCSADRAIN = 1; // drain output, then change
1670pub const TCSAFLUSH = 2; // drain output, flush input
1671pub const TCSASOFT = 0x10; // flag - don't alter h.w. state
16721672pub const TCSA = extern enum(c_uint) {
16731673 NOW,
16741674 DRAIN,
......@@ -1715,13 +1715,13 @@ pub const speed_t = u64;
17151715pub const tcflag_t = u64;
17161716
17171717pub const termios = extern struct {
1718 iflag: tcflag_t,
1719 oflag: tcflag_t,
1720 cflag: tcflag_t,
1721 lflag: tcflag_t,
1722 cc: [NCCS]cc_t,
1723 ispeed: speed_t align(8),
1724 ospeed: speed_t,
1718 iflag: tcflag_t, // input flags
1719 oflag: tcflag_t, // output flags
1720 cflag: tcflag_t, // control flags
1721 lflag: tcflag_t, // local flags
1722 cc: [NCCS]cc_t, // control chars
1723 ispeed: speed_t align(8), // input speed
1724 ospeed: speed_t, // output speed
17251725};
17261726
17271727pub const winsize = extern struct {
......@@ -1731,9 +1731,9 @@ pub const winsize = extern struct {
17311731 ws_ypixel: u16,
17321732};
17331733
1734pub const TIOCGWINSZ = comptime ior(0x40000000, 't', 104, @sizeOf(winsize));
1734pub const TIOCGWINSZ = ior(0x40000000, 't', 104, @sizeOf(winsize));
17351735pub const IOCPARM_MASK = 0x1fff;
17361736
1737fn ior(comptime inout: u32, comptime group: usize, comptime num: usize, comptime len: usize) usize {
1737fn ior(inout: u32, group: usize, num: usize, len: usize) usize {
17381738 return (inout | ((len & IOCPARM_MASK) << 16) | ((group) << 8) | (num));
17391739}