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

ehuelsmann at common-lisp.net ehuelsmann at common-lisp.net
Tue Aug 14 21:06:35 UTC 2012


Author: ehuelsmann
Date: Tue Aug 14 14:06:34 2012
New Revision: 14089

Log:
Close #208: Merge pathname defaults.

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	Tue Aug 14 13:02:16 2012	(r14088)
+++ trunk/abcl/src/org/armedbear/lisp/Interpreter.java	Tue Aug 14 14:06:34 2012	(r14089)
@@ -330,7 +330,8 @@
                            arg.equals("--load-system-file")) {
                     if (i + 1 < args.length) {
                         if (arg.equals("--load"))
-                            Load.load(new Pathname(args[i + 1]),
+                            Load.load(Pathname.mergePathnames(new Pathname(args[i + 1]),
+                                    checkPathname(Symbol.DEFAULT_PATHNAME_DEFAULTS.getSymbolValue())),
                                       false, false, true);
 
                         else

Modified: trunk/abcl/src/org/armedbear/lisp/Lisp.java
==============================================================================
--- trunk/abcl/src/org/armedbear/lisp/Lisp.java	Tue Aug 14 13:02:16 2012	(r14088)
+++ trunk/abcl/src/org/armedbear/lisp/Lisp.java	Tue Aug 14 14:06:34 2012	(r14089)
@@ -1649,6 +1649,14 @@
         type_error(obj, Symbol.PACKAGE);
   }
 
+  public static Pathname checkPathname(LispObject obj)
+  {
+          if (obj instanceof Pathname)     
+                  return (Pathname) obj;         
+          return (Pathname) // Not reached.       
+        type_error(obj, Symbol.PATHNAME);
+  }
+
   public static final Function checkFunction(LispObject obj)
 
   {




More information about the armedbear-cvs mailing list