mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-07 19:58:30 +00:00
Make improvements
- Expand redbean UNIX module - Expand redbean documentation - Ensure Lua copyright is embedded in binary - Increase the PATH_MAX limit especially on NT - Use column major sorting for linenoise completions - Fix some suboptimalities in redbean's new UNIX API - Figured out right flags for Multics newline in raw mode
This commit is contained in:
parent
cf3174dc74
commit
2046c0d2ae
305 changed files with 6602 additions and 4221 deletions
|
@ -685,7 +685,6 @@ syscon so SO_RCVBUF 8 0x1002 0x1002 0x1002 0x1002 0x1002 # bsd co
|
|||
syscon so SO_RCVTIMEO 20 0x1006 0x1006 0x1006 0x100c 0x1006 # recv timeout; takes struct timeval (overrides SA_RESTART restoring EINTR behavior on recv/send/connect/accept/etc.; bsd consensus)
|
||||
syscon so SO_SNDTIMEO 21 0x1005 0x1005 0x1005 0x100b 0x1005 # send timeout; takes struct timeval; bsd consensus
|
||||
syscon so SO_RCVLOWAT 18 0x1004 0x1004 0x1004 0x1004 0x1004 # bsd consensus
|
||||
syscon so SO_EXCLUSIVEADDRUSE 0 0 0 0 0 0xfffffffb # hoo boy
|
||||
syscon so SO_SNDLOWAT 19 0x1003 0x1003 0x1003 0x1003 0x1003 # bsd consensus
|
||||
syscon so SO_TYPE 3 0x1008 0x1008 0x1008 0x1008 0x1008 # bsd consensus
|
||||
syscon so SO_TIMESTAMP 29 0x0400 0x0400 0x0800 0x2000 0
|
||||
|
@ -693,6 +692,7 @@ syscon so SO_SETFIB 0 0 0x1014 0 0 0
|
|||
syscon so SO_DOMAIN 39 0 0x1019 0x1024 0 0
|
||||
syscon so SO_MAX_PACING_RATE 47 0 0x1018 0 0 0
|
||||
syscon so SO_PEERCRED 17 0 0 0x1022 0 0
|
||||
syscon so SO_EXCLUSIVEADDRUSE 0 0 0 0 0 0xfffffffb # hoo boy
|
||||
syscon so LOCAL_PEERCRED 0 1 1 0 0 0
|
||||
syscon so SO_PROTOCOL 38 0 0x1016 0x1025 0 0
|
||||
syscon so SO_ATTACH_BPF 50 0 0 0 0 0
|
||||
|
@ -730,9 +730,10 @@ syscon so SO_TIMESTAMPNS 35 0 0 0 0 0
|
|||
syscon so SO_WIFI_STATUS 41 0 0 0 0 0
|
||||
|
||||
syscon sol SOL_IP 0 0 0 0 0 0 # consensus
|
||||
syscon sol SOL_SOCKET 1 0xffff 0xffff 0xffff 0xffff 0xffff # bsd+nt consensus (todo: what's up with ipproto_icmp overlap)
|
||||
syscon sol SOL_SOCKET 1 0xffff 0xffff 0xffff 0xffff 0xffff # yes it's actually 0xffff; bsd+nt consensus (todo: what's up with ipproto_icmp overlap)
|
||||
syscon sol SOL_TCP 6 6 6 6 6 6 # consensus
|
||||
syscon sol SOL_UDP 17 17 17 17 17 17 # consensus
|
||||
syscon sol SOL_RAW 255 0 0 0 0 0
|
||||
syscon sol SOL_IPV6 41 41 41 41 41 41
|
||||
syscon sol SOL_ICMPV6 58 58 58 58 58 0
|
||||
syscon sol SOL_AAL 265 0 0 0 0 0
|
||||
|
@ -752,7 +753,6 @@ syscon sol SOL_NFC 280 0 0 0 0 0
|
|||
syscon sol SOL_PACKET 263 0 0 0 0 0
|
||||
syscon sol SOL_PNPIPE 275 0 0 0 0 0
|
||||
syscon sol SOL_PPPOL2TP 273 0 0 0 0 0
|
||||
syscon sol SOL_RAW 255 0 0 0 0 0
|
||||
syscon sol SOL_RDS 276 0 0 0 0 0
|
||||
syscon sol SOL_RXRPC 272 0 0 0 0 0
|
||||
syscon sol SOL_TIPC 271 0 0 0 0 0
|
||||
|
@ -808,13 +808,14 @@ syscon tcp TCP_REPAIR_QUEUE 20 0 0 0 0 0 # what is it
|
|||
syscon tcp TCP_THIN_LINEAR_TIMEOUTS 16 0 0 0 0 0 # what is it
|
||||
|
||||
# group name GNU/Systemd XNU's Not UNIX! FreeBSD OpenBSD NetBSD The New Technology Commentary
|
||||
syscon ip IP_TOS 1 3 3 3 3 8 # bsd consensus
|
||||
syscon ip IP_TTL 2 4 4 4 4 7 # bsd consensus
|
||||
syscon ip IP_HDRINCL 3 2 2 2 2 2 # bsd consensus
|
||||
syscon ip IP_DEFAULT_MULTICAST_LOOP 1 1 1 1 1 1 # consensus
|
||||
syscon ip IP_DEFAULT_MULTICAST_TTL 1 1 1 1 1 1 # consensus
|
||||
syscon ip IP_PMTUDISC_DONT 0 0 0 0 0 0 # consensus
|
||||
syscon ip IP_HDRINCL 3 2 2 2 2 2 # bsd consensus
|
||||
syscon ip IP_MAX_MEMBERSHIPS 20 0x0fff 0x0fff 0x0fff 0x0fff 20 # bsd consensus
|
||||
syscon ip IP_OPTIONS 4 1 1 1 1 1 # bsd consensus
|
||||
syscon ip IP_TOS 1 3 3 3 3 8 # bsd consensus
|
||||
syscon ip IP_RECVTTL 12 24 65 31 23 21
|
||||
syscon ip IP_ADD_MEMBERSHIP 35 12 12 12 12 5 # bsd consensus
|
||||
syscon ip IP_DROP_MEMBERSHIP 36 13 13 13 13 6 # bsd consensus
|
||||
|
@ -825,7 +826,6 @@ syscon ip IP_RECVOPTS 6 5 5 5 5 0 # bsd consensus
|
|||
syscon ip IP_RECVRETOPTS 7 6 6 6 6 0 # bsd consensus
|
||||
syscon ip IP_RECVDSTADDR 0 7 7 7 7 0 # bsd consensus
|
||||
syscon ip IP_RETOPTS 7 8 8 8 8 0 # bsd consensus
|
||||
syscon ip IP_TTL 2 4 4 4 4 7 # bsd consensus
|
||||
syscon ip IP_ADD_SOURCE_MEMBERSHIP 39 70 70 0 0 15
|
||||
syscon ip IP_BLOCK_SOURCE 38 72 72 0 0 17
|
||||
syscon ip IP_DROP_SOURCE_MEMBERSHIP 40 71 71 0 0 0x10
|
||||
|
@ -1367,6 +1367,25 @@ syscon termios ENDRUNDISC 0 0 0 0x9 0x9 0 # boop
|
|||
syscon termios TIOCPTMASTER 0 0 0x2000741c 0 0 0 # boop
|
||||
syscon termios NETGRAPHDISC 0 0 0x6 0 0 0 # boop
|
||||
syscon termios H4DISC 0 0 0x7 0 0 0 # boop
|
||||
|
||||
# Teletypewriter Control Modes
|
||||
#
|
||||
# group name GNU/Systemd XNU's Not UNIX! FreeBSD OpenBSD NetBSD The New Technology Commentary
|
||||
syscon termios CS5 0b0000000000000000 0b000000000000000000 0b000000000000000000 0b0000000000000000 0b0000000000000000 0b0000000000000000 # termios.c_cflag; consensus
|
||||
syscon termios CS6 0b0000000000010000 0b000000000100000000 0b000000000100000000 0b0000000100000000 0b0000000100000000 0b0000000000010000 # termios.c_cflag; 6-bit characters
|
||||
syscon termios CS7 0b0000000000100000 0b000000001000000000 0b000000001000000000 0b0000001000000000 0b0000001000000000 0b0000000000100000 # termios.c_cflag; 7-bit characters
|
||||
syscon termios CS8 0b0000000000110000 0b000000001100000000 0b000000001100000000 0b0000001100000000 0b0000001100000000 0b0000000000110000 # termios.c_cflag; 8-bit characters
|
||||
syscon termios CSIZE 0b0000000000110000 0b000000001100000000 0b000000001100000000 0b0000001100000000 0b0000001100000000 0b0000000000110000 # termios.c_cflag; mask for CS𝑥 flags
|
||||
syscon termios CSTOPB 0b0000000001000000 0b000000010000000000 0b000000010000000000 0b0000010000000000 0b0000010000000000 0b0000000001000000 # termios.c_cflag; bsd consensus
|
||||
syscon termios CREAD 0b0000000010000000 0b000000100000000000 0b000000100000000000 0b0000100000000000 0b0000100000000000 0b0000000010000000 # termios.c_cflag; bsd consensus
|
||||
syscon termios PARENB 0b0000000100000000 0b000001000000000000 0b000001000000000000 0b0001000000000000 0b0001000000000000 0b0000000100000000 # termios.c_cflag
|
||||
syscon termios PARODD 0b0000001000000000 0b000010000000000000 0b000010000000000000 0b0010000000000000 0b0010000000000000 0b0000001000000000 # termios.c_cflag
|
||||
syscon termios HUPCL 0b0000010000000000 0b000100000000000000 0b000100000000000000 0b0100000000000000 0b0100000000000000 0b0000010000000000 # termios.c_cflag; bsd consensus
|
||||
syscon termios CLOCAL 0b0000100000000000 0b1000000000000000 0b1000000000000000 0b1000000000000000 0b1000000000000000 0b0000100000000000 # termios.c_cflag; consensus
|
||||
|
||||
# Teletypewriter Local Modes
|
||||
#
|
||||
# group name GNU/Systemd XNU's Not UNIX! FreeBSD OpenBSD NetBSD The New Technology Commentary
|
||||
syscon termios ISIG 0b0000000000000001 0b0000000010000000 0b0000000010000000 0b0000000010000000 0b0000000010000000 0b0000000000000001 # termios.c_lflag|=ISIG makes Ctrl-C, Ctrl-\, etc. generate signals
|
||||
syscon termios ICANON 0b0000000000000010 0b0000000100000000 0b0000000100000000 0b0000000100000000 0b0000000100000000 0b0000000000000010 # termios.c_lflag&=~ICANON disables 1960's version of gnu readline (see also VMIN)
|
||||
syscon termios XCASE 0b0000000000000100 0 0 16777216 0 0b0000000000000100 # termios.c_lflag
|
||||
|
@ -1383,6 +1402,10 @@ syscon termios FLUSHO 0b0001000000000000 8388608 8388608 8388608 83886
|
|||
syscon termios PENDIN 0b0100000000000000 536870912 536870912 536870912 536870912 0b0100000000000000 # termios.c_lflag
|
||||
syscon termios IEXTEN 0b1000000000000000 0b0000010000000000 0b0000010000000000 0b0000010000000000 0b0000010000000000 0b1000000000000000 # termios.c_lflag&=~IEXTEN disables platform input processing magic
|
||||
syscon termios EXTPROC 65536 0b0000100000000000 0b0000100000000000 0b0000100000000000 0b0000100000000000 65536 # termios.c_lflag
|
||||
|
||||
# Teletypewriter Input Modes
|
||||
#
|
||||
# group name GNU/Systemd XNU's Not UNIX! FreeBSD OpenBSD NetBSD The New Technology Commentary
|
||||
syscon termios IGNBRK 0b0000000000000001 0b0000000000000001 0b0000000000000001 0b0000000000000001 0b0000000000000001 0b0000000000000001 # termios.c_iflag it's complicated, uart only? UNIXCONSENSUS
|
||||
syscon termios BRKINT 0b0000000000000010 0b0000000000000010 0b0000000000000010 0b0000000000000010 0b0000000000000010 0b0000000000000010 # termios.c_iflag it's complicated, uart only? UNIXCONSENSUS
|
||||
syscon termios IGNPAR 0b0000000000000100 0b0000000000000100 0b0000000000000100 0b0000000000000100 0b0000000000000100 0b0000000000000100 # termios.c_iflag|=IGNPAR ignores parity and framing errors; see PARMRK UNIXCONSENSUS
|
||||
|
@ -1398,9 +1421,13 @@ syscon termios IXANY 0b0000100000000000 0b0000100000000000 0b000010000000000
|
|||
syscon termios IXOFF 0b0001000000000000 0b0000010000000000 0b0000010000000000 0b0000010000000000 0b0000010000000000 0b0001000000000000 # termios.c_iflag|=IXOFF disables annoying display freeze keys
|
||||
syscon termios IMAXBEL 0b0010000000000000 0b0010000000000000 0b0010000000000000 0b0010000000000000 0b0010000000000000 0b0010000000000000 # termios.c_iflag|=IMAXBEL rings when queue full UNIXCONSENSUS
|
||||
syscon termios IUTF8 0b0100000000000000 0b0100000000000000 0 0 0 0b0100000000000000 # termios.c_iflag|=IUTF8 helps w/ rubout on UTF-8 input
|
||||
|
||||
# Teletypewriter Output Modes
|
||||
#
|
||||
# group name GNU/Systemd XNU's Not UNIX! FreeBSD OpenBSD NetBSD The New Technology Commentary
|
||||
syscon termios OPOST 0b0000000000000001 0b000000000000000001 0b000000000000000001 0b0000000000000001 0b0000000000000001 0b0000000000000001 # termios.c_oflag&=~OPOST disables output processing magic, e.g. MULTICS newlines
|
||||
syscon termios OLCUC 0b0000000000000010 0 0 0b0000000000100000 0 0b0000000000000010 # termios.c_oflag|=OLCUC maps a-z → A-Z output
|
||||
syscon termios ONLCR 0b0000000000000100 0b000000000000000010 0b000000000000000010 0b0000000000000010 0b0000000000000010 0b0000000000000100 # termios.c_oflag|=ONLCR claims to map \n → \r\n output
|
||||
syscon termios ONLCR 0b0000000000000100 0b000000000000000010 0b000000000000000010 0b0000000000000010 0b0000000000000010 0b0000000000000100 # termios.c_oflag|=ONLCR map \n → \r\n output (MULTICS newline) and requires OPOST
|
||||
syscon termios OCRNL 0b0000000000001000 0b000000000000010000 0b000000000000010000 0b0000000000010000 0b0000000000010000 0b0000000000001000 # termios.c_oflag|=OCRNL maps \r → \n output
|
||||
syscon termios ONOCR 0b0000000000010000 0b000000000000100000 0b000000000000100000 0b0000000001000000 0b0000000001000000 0b0000000000010000 # termios.c_oflag|=ONOCR maps \r → ∅ output iff column 0
|
||||
syscon termios ONLRET 0b0000000000100000 0b000000000001000000 0b000000000001000000 0b0000000010000000 0b0000000010000000 0b0000000000100000 # termios.c_oflag|=ONLRET maps \r → ∅ output
|
||||
|
@ -1431,11 +1458,10 @@ syscon termios VT1 0b0100000000000000 0b010000000000000000 0b0100000000000
|
|||
syscon termios FFDLY 0b1000000000000000 0b000100000000000000 0b000100000000000000 0 0 0b1000000000000000 # termios.c_oflag
|
||||
syscon termios FF0 0b0000000000000000 0b000000000000000000 0b000000000000000000 0 0 0b0000000000000000 # termios.c_oflag
|
||||
syscon termios FF1 0b1000000000000000 0b000100000000000000 0b000100000000000000 0 0 0b1000000000000000 # termios.c_oflag
|
||||
syscon termios CS5 0 0 0 0 0 0 # consensus
|
||||
syscon termios CS6 0b0000000000010000 0b0000000100000000 0b0000000100000000 0b0000000100000000 0b0000000100000000 0b0000000000010000 # termios.c_cflag flag for 6-bit characters
|
||||
syscon termios CS7 0b0000000000100000 0b0000001000000000 0b0000001000000000 0b0000001000000000 0b0000001000000000 0b0000000000100000 # termios.c_cflag flag for 7-bit characters
|
||||
syscon termios CS8 0b0000000000110000 0b0000001100000000 0b0000001100000000 0b0000001100000000 0b0000001100000000 0b0000000000110000 # termios.c_cflag flag for 8-bit characters
|
||||
syscon termios CSIZE 0b0000000000110000 0b0000001100000000 0b0000001100000000 0b0000001100000000 0b0000001100000000 0b0000000000110000 # mask for CS𝑥 flags
|
||||
|
||||
# Teletypewriter Special Control Character Assignments
|
||||
#
|
||||
# group name GNU/Systemd XNU's Not UNIX! FreeBSD OpenBSD NetBSD The New Technology Commentary
|
||||
syscon termios NCCS 20 20 20 20 20 20 # ARRAYLEN(termios.c_cc); we schlep c_line into c_cc on linux
|
||||
syscon termios VINTR 0+1 8 8 8 8 0 # termios.c_cc[VINTR]=𝑥
|
||||
syscon termios VQUIT 1+1 9 9 9 9 1 # termios.c_cc[VQUIT]=𝑥
|
||||
|
@ -1454,15 +1480,13 @@ syscon termios VDISCARD 13+1 15 15 15 15 13 # termios.c_cc[VDISCA
|
|||
syscon termios VWERASE 14+1 4 4 4 4 14 # termios.c_cc[VWERASE]=𝑥
|
||||
syscon termios VLNEXT 15+1 14 14 14 14 15 # termios.c_cc[VLNEXT]=𝑥
|
||||
syscon termios VEOL2 16+1 2 2 2 2 16 # termios.c_cc[VEOL2]=𝑥
|
||||
|
||||
syscon termios TIOCSERGETLSR 0x5459 0 0 0 0 0 #
|
||||
syscon termios TIOCSERGETMULTI 0x545a 0 0 0 0 0 #
|
||||
syscon termios TIOCSERSETMULTI 0x545b 0 0 0 0 0 #
|
||||
syscon termios TIOCSER_TEMT 1 0 0 0 0 0 #
|
||||
syscon termios VERIFY 47 0 0 0 0 0
|
||||
syscon termios PARENB 0x0100 0x1000 0x1000 0x1000 0x1000 0 #
|
||||
syscon termios PARODD 0x0200 0x2000 0x2000 0x2000 0x2000 0 #
|
||||
syscon termios CIBAUD 0x100f0000 0 0 0 0 0
|
||||
syscon termios CLOCAL 0x0800 0x8000 0x8000 0x8000 0x8000 0 #
|
||||
syscon termios CMSPAR 0x40000000 0 0 0 0 0
|
||||
syscon termios BUSY 4 0 0 0 0 0
|
||||
syscon termios CANBSIZ 255 0 0 0 0 0
|
||||
|
@ -1488,9 +1512,6 @@ syscon termios TCOON 1 2 2 2 2 1 # see tcflow; bsd consensus
|
|||
syscon termios TCIOFF 2 3 3 3 3 2 # see tcflow; bsd consensus
|
||||
syscon termios TCION 3 4 4 4 4 3 # see tcflow; bsd consensus
|
||||
|
||||
syscon termios CREAD 0x80 0x0800 0x0800 0x0800 0x0800 0 # bsd consensus
|
||||
syscon termios CSTOPB 0x40 0x0400 0x0400 0x0400 0x0400 0 # bsd consensus
|
||||
syscon termios HUPCL 0x0400 0x4000 0x4000 0x4000 0x4000 0 # bsd consensus
|
||||
syscon termios CSTART 17 17 17 17 17 0 # unix consensus
|
||||
syscon termios CSTOP 19 19 19 19 19 0 # unix consensus
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue