From: Klaus W. <kw...@w-...> - 2006-01-26 17:43:55
|
On Thu, Jan 26, 2006 at 12:01:28PM -0500, Sam Steingold wrote: > I modified CVS head to do the following: > > SAVEINITMEM now accepts :SCRIPT that defaults to (NOT INIT-FUNCTION) > When the image created with :SCRIPT T (default) is invoked, > the tradition behavior is exhibited: first positional argument is the > script file name, the rest is placed into *ARGS* > When the image created with :SCRIPT NIL is invoked, > all positional arguments go into *ARGS*. Thank you - but I would suggest going a bit further by using a tristate parameter, for example: :argument-handler :script (This is the default behavior when no INIT-FUNCTION is specified.) The CLISP runtime handles flag arguments, and the first positional parameter is treated as a script file name. Argument processing ends when a blank parameter ("") or double minus (--) is encountered, and any remaining arguments are placed into the EXT:*ARGS* variable. :argument-handler :standalone All arguments, including flags starting with '-', are placed into the EXT:*ARGS* variable. This allows standalone executables to fully handle all argument processing. The application is responsible for handling any flag arguments normally handled by the CLISP runtime if that functionality is required. :argument-handler :hybrid (This is the default behavior when an INIT-FUNCTION is specified.) The CLISP runtime handles flag arguments. All positional parameters (starting with the first non-flag argument) are placed into the EXT:*ARGS* variable for processing by the application. Flag arguments intended for the application must be placed after a blank argument ("") or double minus (--). The names are just suggestions of course. This would allow fully emulating the standard behavior of C applications. -Klaus |