From c656cf912e32f394a525d970bce7b08e47f06333 Mon Sep 17 00:00:00 2001 From: "Paul A. Patience" Date: Sun, 4 Jul 2021 23:38:07 -0400 Subject: genman, lib, tests: use defvarl where possible. * genman.txr (dupes, tagnum): Replace defvar with defvarl. * stdlib/doc-lookup.tl (os-symbol): Same. * tests/011/macros-3.tl (x): Same. * tests/011/mandel.txr (x-centre, y-centre, width, i-max, j-max, n) (r-max, pixel-size, x-offset, y-offset): Same. (file, colour-max): Delete (unused) variables. * tests/012/circ.tl (x): Replace defvar with defvarl. * tests/012/stack.tl (stack-limited): Same. * tests/012/struct.tl (s): Same. * tests/013/maze.tl (vi, pa, sc): Delete variables. Use function arguments instead. (usage): Fix typo. * tests/014/dgram-stream.tl (family): Rename to... (*family*): ...this. * tests/014/socket-basic.tl (socktype): Rename to... (*socktype*): ...this. (%iters%): Replace defvar with defvarl. --- tests/014/dgram-stream.tl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/014/dgram-stream.tl') diff --git a/tests/014/dgram-stream.tl b/tests/014/dgram-stream.tl index 5902a84d..6890e300 100644 --- a/tests/014/dgram-stream.tl +++ b/tests/014/dgram-stream.tl @@ -1,7 +1,7 @@ (load "../common.tl") (load "../sock-common.tl") -(defvar family) +(defvar *family*) (defun server (svc-sock) (whilet ((acc-sock (sock-accept svc-sock)) @@ -10,7 +10,7 @@ (close-stream acc-sock))) (defun client (addr) - (with-stream (cli-sock (open-socket family sock-dgram)) + (with-stream (cli-sock (open-socket *family* sock-dgram)) (sock-connect cli-sock addr) (dotimes (i 1000) (print i cli-sock) @@ -22,7 +22,7 @@ (flush-stream cli-sock))) (defun dgram-test () - (let* ((svc-sock (open-socket family sock-dgram)) + (let* ((svc-sock (open-socket *family* sock-dgram)) (svc-addr (bindfree svc-sock 1025 65535)) (server-pid (fork))) (cond @@ -37,6 +37,6 @@ (fboundp 'fork)) (let ((maybe-ipv6 (if (memq (os-symbol) '(:linux :macos :cygwin :cygnal)) (list af-inet6)))) - (each ((family ^(,af-inet ,*maybe-ipv6))) + (each ((*family* ^(,af-inet ,*maybe-ipv6))) (unless (dgram-test) (error "test failed"))))) -- cgit v1.2.3