diff options
author | Vincent Ambo <tazjin@google.com> | 2020-01-29T10·11+0000 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-01-29T10·12+0000 |
commit | 10e2e56b67b41eb6315fdc4cc1bc161f43440dad (patch) | |
tree | f2a37562e71b850bb7c0f013559da25bce3c4fed /fun | |
parent | 6f728f33a674ce668ded32af9a272ff21b182164 (diff) |
refactor(fun/wcl): Use portable unix-opts library r/475
unix-opts, imported into buildLisp.nix in the previous commit, provides an implementation independent way of parsing command line arguments.
Diffstat (limited to 'fun')
-rw-r--r-- | fun/wcl/default.nix | 1 | ||||
-rw-r--r-- | fun/wcl/wc.lisp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/fun/wcl/default.nix b/fun/wcl/default.nix index 17367f3d8072..ca1cbb80589a 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 81576d41aa4c..83c7e8c4f1cc 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)) |