From 10e2e56b67b41eb6315fdc4cc1bc161f43440dad Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Wed, 29 Jan 2020 10:11:02 +0000 Subject: refactor(fun/wcl): Use portable unix-opts library unix-opts, imported into buildLisp.nix in the previous commit, provides an implementation independent way of parsing command line arguments. --- fun/wcl/default.nix | 1 + fun/wcl/wc.lisp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'fun/wcl') diff --git a/fun/wcl/default.nix b/fun/wcl/default.nix index 17367f3d80..ca1cbb8058 100644 --- a/fun/wcl/default.nix +++ b/fun/wcl/default.nix @@ -8,6 +8,7 @@ pkgs.nix.buildLisp.program { ]; deps = with pkgs.third_party.lisp; [ + unix-opts iterate ]; } diff --git a/fun/wcl/wc.lisp b/fun/wcl/wc.lisp index 81576d41aa..83c7e8c4f1 100644 --- a/fun/wcl/wc.lisp +++ b/fun/wcl/wc.lisp @@ -5,7 +5,7 @@ (declaim (optimize (speed 3) (safety 0))) (defun main () - (let ((filename (cadr sb-ext:*posix-argv*)) + (let ((filename (cadr (opts:argv))) (space (char-code #\Space)) (newline (char-code #\Newline))) (with-open-file (file-stream filename :element-type '(unsigned-byte 8)) -- cgit 1.4.1