[armedbear-cvs] r12450 - trunk/abcl/src/org/armedbear/lisp

Mark Evenson mevenson at common-lisp.net
Fri Feb 12 10:53:31 UTC 2010


Author: mevenson
Date: Fri Feb 12 05:53:28 2010
New Revision: 12450

Log:
Collect unprocessed command-line arguments in EXT:*COMMAND-LINE-ARGUMENT-LIST*.

Contributed by Dennis Lambe Jr. 


Modified:
   trunk/abcl/src/org/armedbear/lisp/Interpreter.java
   trunk/abcl/src/org/armedbear/lisp/Lisp.java

Modified: trunk/abcl/src/org/armedbear/lisp/Interpreter.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Interpreter.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Interpreter.java	Fri Feb 12 05:53:28 2010
@@ -211,10 +211,13 @@
     }
 
     // Check for --noinit; verify that arguments are supplied for --load and
-    // --eval options.
+    // --eval options.  Copy all unrecognized arguments into
+    // ext:*command-line-argument-list*
     private static void preprocessCommandLineArguments(String[] args)
 
     {
+        LispObject arglist = NIL;
+
         if (args != null) {
             for (int i = 0; i < args.length; ++i) {
                 String arg = args[i];
@@ -239,9 +242,13 @@
                         System.err.println("No argument supplied to --load");
                         System.exit(1);
                     }
+                } else {
+                    arglist = new Cons(args[i], arglist);
                 }
             }
         }
+
+        _COMMAND_LINE_ARGUMENT_LIST_.setSymbolValue(arglist);
     }
 
     // Do the --load and --eval actions.

Modified: trunk/abcl/src/org/armedbear/lisp/Lisp.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Lisp.java	(original)
+++ trunk/abcl/src/org/armedbear/lisp/Lisp.java	Fri Feb 12 05:53:28 2010
@@ -2566,6 +2566,10 @@
   public static final Symbol _SAVED_BACKTRACE_ =
     exportSpecial("*SAVED-BACKTRACE*", PACKAGE_EXT, NIL);
 
+  // ### *command-line-argument-list*
+  public static final Symbol _COMMAND_LINE_ARGUMENT_LIST_ =
+    exportSpecial("*COMMAND-LINE-ARGUMENT-LIST*", PACKAGE_EXT, NIL);
+
   // ### *batch-mode*
   public static final Symbol _BATCH_MODE_ =
     exportSpecial("*BATCH-MODE*", PACKAGE_EXT, NIL);




More information about the armedbear-cvs mailing list