From: James Amundson
Subject: command-line arguments in openmcl?
Date: 
Message-ID: <pan.2003.11.09.04.41.14.803524@users.sourceforge.net>
Hi,

Does anyone out there know how to access command-line arguments in
openmcl? I have a function that extract command line arguments from cmucl,
sbcl, clisp, gcl and acl, but I can't find any documentation for such
things in openmcl.

(defun get-argv ()
  #+clisp *args*
  #+cmu (nthcdr 5 lisp::lisp-command-line-list)
  #+sbcl (cdr sb-ext:*posix-argv*)
  #+gcl (nthcdr 3 si::*command-args*)
  #+acl (system:command-line-arguments t)
)

In each case, I've invoked a saved lisp image with appropriate leading
command line arguments. The get-argv function extracts the remaining
arguments. In openmcl, I'm invoking my image as follows:

openmcl -I maxima.image foo bar baz

I would like get-argv to return ("foo" "bar" "baz").

Thanks for any help.

--Jim Amundson
From: Pascal Bourguignon
Subject: Re: command-line arguments in openmcl?
Date: 
Message-ID: <87k769mly5.fsf@thalassa.informatimago.com>
James Amundson <········@users.sourceforge.net> writes:

> Hi,
> 
> Does anyone out there know how to access command-line arguments in
> openmcl? I have a function that extract command line arguments from cmucl,
> sbcl, clisp, gcl and acl, but I can't find any documentation for such
> things in openmcl.
> 
> (defun get-argv ()
>   #+clisp *args*

It's wrong. It should be:

    #+clisp ext:*args*

>   #+cmu (nthcdr 5 lisp::lisp-command-line-list)
>   #+sbcl (cdr sb-ext:*posix-argv*)
>   #+gcl (nthcdr 3 si::*command-args*)
>   #+acl (system:command-line-arguments t)
> )


-- 
__Pascal_Bourguignon__
http://www.informatimago.com/