From aecd04f2460df0932da12e7d7234d860b74a3d7d Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 13 Apr 2020 23:43:18 -0700 Subject: sockets: missing shut-rd, shut-wr, shut-rdwr. * socket.c (sock_load_init): Register documented but completely missing intrinsic variables shut-rd, shut-wr, shut-rdwr. * lisplib.c (sock_set_entries): Register autoload for shut-rd, shut-wr, shut-rdwr. * txr.1: In sock-shutdown description, fix shut-rw typo that should be shut-wr. --- lisplib.c | 1 + socket.c | 3 +++ txr.1 | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisplib.c b/lisplib.c index d1a2dd06..d97ad63d 100644 --- a/lisplib.c +++ b/lisplib.c @@ -344,6 +344,7 @@ static val sock_set_entries(val dlt, val fun) lit("ai-numericserv"), lit("str-inaddr"), lit("str-in6addr"), lit("str-inaddr-net"), lit("str-in6addr-net"), + lit("shut-rd"), lit("shut-wr"), lit("shut-rdwr"), lit("open-socket"), lit("open-socket-pair"), lit("sock-bind"), lit("sock-connect"), lit("sock-listen"), lit("sock-accept"), lit("sock-shutdown"), lit("open-socket"), diff --git a/socket.c b/socket.c index 7b695573..546e5d7e 100644 --- a/socket.c +++ b/socket.c @@ -1114,6 +1114,9 @@ void sock_load_init(void) reg_varl(intern(lit("ai-addrconfig"), user_package), num_fast(AI_ADDRCONFIG)); reg_varl(intern(lit("ai-numericserv"), user_package), num_fast(AI_NUMERICSERV)); #endif + reg_varl(intern(lit("shut-rd"), user_package), num_fast(SHUT_RD)); + reg_varl(intern(lit("shut-wr"), user_package), num_fast(SHUT_WR)); + reg_varl(intern(lit("shut-rdwr"), user_package), num_fast(SHUT_RDWR)); reg_fun(intern(lit("sock-bind"), user_package), func_n2(sock_bind)); reg_fun(intern(lit("sock-connect"), user_package), func_n3o(sock_connect, 2)); diff --git a/txr.1 b/txr.1 index ddc258a1..8cfd6aa7 100644 --- a/txr.1 +++ b/txr.1 @@ -62096,7 +62096,7 @@ The .code direction parameter is one of the values given by the variables .codn shut-rd , -.code shut-rw +.code shut-wr or .codn shut-rdwr . These values shut down communication in the read direction, write direction, -- cgit v1.2.3