From e1d595d9bff197ed57d4ab7895c8688370aaea27 Mon Sep 17 00:00:00 2001 From: crc <> Date: Tue, 26 Apr 2022 12:00:20 +0000 Subject: [PATCH] sockets: remove unused functions FossilOrigin-Name: a16fb2e19a79204791ef32fd3589ce9aa92f95c8834191bf950144fc0c38cd55 --- interface/sockets.retro | 6 +++--- vm/nga-c/image.c | 6 +++--- vm/nga-c/retro.c | 9 +-------- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/interface/sockets.retro b/interface/sockets.retro index 0c7b0dc..5d32ea2 100644 --- a/interface/sockets.retro +++ b/interface/sockets.retro @@ -75,14 +75,14 @@ a maxmimum number of bytes to read, and a socket id. It returns the number of bytes received and an error code. ~~~ -:socket:recv (ann-nn) #8 socket:operation ; +:socket:recv (ann-nn) #7 socket:operation ; ~~~ `socket:close` is a wrapper over close(2). It takes a socket id and closes the socket. ~~~ -:socket:close (n-) #10 socket:operation ; +:socket:close (n-) #8 socket:operation ; ~~~ `socket:configure` is used before `socket:bind` to set some @@ -90,5 +90,5 @@ internal state. Takes the host name and port, both as strings. Does not return anything. ~~~ -:socket:configure (ss-) #11 socket:operation ; +:socket:configure (ss-) #9 socket:operation ; ~~~ diff --git a/vm/nga-c/image.c b/vm/nga-c/image.c index 8202fd5..57b4b03 100644 --- a/vm/nga-c/image.c +++ b/vm/nga-c/image.c @@ -809,10 +809,10 @@ CELL ngaImage[] = { 1793,17808,18254,18298,202207,410,382,1230,1535,0,10,1,10,2, 116,58,97,99,99,101,112,116,0,1,4,2049,15624,10,15889,15933,166,0,0,115, 111,99,107,101,116,58,99,111,110,110,101,99,116,0,1,5,2049,15624,10,15913, 15955,166,0,0,115,111,99,107,101,116,58,115,101,110,100,0,1,6,2049,15624, - 10,15938,15977,166,0,0,115,111,99,107,101,116,58,114,101,99,118,0,1,8, + 10,15938,15977,166,0,0,115,111,99,107,101,116,58,114,101,99,118,0,1,7, 2049,15624,10,15960,16000,166,0,0,115,111,99,107,101,116,58,99,108,111,115,101, - 0,1,10,2049,15624,10,15982,16027,166,0,0,115,111,99,107,101,116,58,99,111, - 110,102,105,103,117,114,101,0,1,11,2049,15624,10,114,101,116,114,111,46,102, + 0,1,8,2049,15624,10,15982,16027,166,0,0,115,111,99,107,101,116,58,99,111, + 110,102,105,103,117,114,101,0,1,9,2049,15624,10,114,101,116,114,111,46,102, 111,114,116,104,0,16005,16057,166,16226,0,105,111,58,99,111,114,101,0,1,8000, 2049,10610,2049,10591,10,16044,16079,166,16226,0,99,111,114,101,58,105,110,105,116,0, 1,0,2049,16057,10,16064,16100,166,16226,0,99,111,114,101,58,115,116,97,114,116, diff --git a/vm/nga-c/retro.c b/vm/nga-c/retro.c index 7457e4a..27a7ea7 100644 --- a/vm/nga-c/retro.c +++ b/vm/nga-c/retro.c @@ -1239,9 +1239,6 @@ void socket_send(NgaState *vm) { stack_push(vm, errno); } -void socket_sendto(NgaState *vm) { -} - void socket_recv(NgaState *vm) { char buf[8193]; int sock = stack_pop(vm); @@ -1254,9 +1251,6 @@ void socket_recv(NgaState *vm) { stack_push(vm, errno); } -void socket_recvfrom(NgaState *vm) { -} - void socket_close(NgaState *vm) { int sock = stack_pop(vm); close(SocketID[sock]); @@ -1267,8 +1261,7 @@ Handler SocketActions[] = { socket_get_host, socket_create, socket_bind, socket_listen, socket_accept, socket_connect, socket_send, - socket_sendto, socket_recv, socket_recvfrom, - socket_close, socket_getaddrinfo + socket_recv, socket_close, socket_getaddrinfo }; void io_socket(NgaState *vm) {