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.
This commit is contained in:
Vincent Ambo 2020-01-29 10:11:02 +00:00
parent 6f728f33a6
commit 10e2e56b67
2 changed files with 2 additions and 1 deletions

View file

@ -8,6 +8,7 @@ pkgs.nix.buildLisp.program {
];
deps = with pkgs.third_party.lisp; [
unix-opts
iterate
];
}

View file

@ -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))