Changeset 14541


Ignore:
Timestamp:
06/13/13 10:30:39 (9 years ago)
Author:
Mark Evenson
Message:

Fix LOAD.18 on non-Windows by ensuring that *LOAD-TRUENAME* contains one.

A bit of a hack by doing this in Load.java, as it should already have
been passed through the TRUENAME routines by the time things get here,
but the code needs a more thorough re-working anyways.

Refactor probe_file.java Lisp interfaces to have public access and
obey current conventions.

Location:
trunk/abcl/src/org/armedbear/lisp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/Load.java

    r14478 r14541  
    540540                        // cases but this currently passes the tests.
    541541                        if (!(truePathname.device.car() instanceof AbstractString)) {
    542                             truePathname = (Pathname)truePathname.device.car();
    543                             truePathname.invalidateNamestring();
     542                          assert truePathname.device.car() instanceof Pathname;
     543                          Pathname p = new Pathname((Pathname)truePathname.device.car());
     544                          truePathname
     545                            = (Pathname) probe_file.PROBE_FILE.execute(p);
     546                          truePathname.invalidateNamestring();
    544547                        }
    545548                    }
  • trunk/abcl/src/org/armedbear/lisp/probe_file.java

    r14176 r14541  
    4040public final class probe_file
    4141{
    42     // ### probe-file
    43     // probe-file pathspec => truename
    44     private static final Primitive PROBE_FILE =
    45         new Primitive("probe-file", "pathspec")
    46     {
     42    public static final Primitive PROBE_FILE
     43      = new pf_probe_file();
     44    @DocString(name="probe-file",
     45               args="pathspec",
     46               returns="truename")
     47    private static final class pf_probe_file extends Primitive {
     48        pf_probe_file() {
     49            super("probe-file", "pathspec");
     50        }
    4751        @Override
    4852        public LispObject execute(LispObject arg)
     
    5256    };
    5357
    54     // ### truename
    55     // truename filespec => truename
    56     private static final Primitive TRUENAME =
    57         new Primitive("truename", "filespec")
    58     {
     58    public static final Primitive TRUENAME
     59        = new pf_truename();
     60    @DocString(name="truename",
     61               args="pathspec",
     62               returns="pathname")
     63    private static class pf_truename extends Primitive {
     64        pf_truename() {
     65            super("truename", "filespec");
     66        }
    5967        @Override
    6068        public LispObject execute(LispObject arg)
     
    6472    };
    6573
    66     // ### probe-directory
    67     // probe-directory pathspec => truename
    68     private static final Primitive PROBE_DIRECTORY =
    69         new Primitive("probe-directory", PACKAGE_EXT, true)
    70     {
     74    public static final Primitive PROBE_DIRECTORY
     75        = new pf_probe_directory();
     76    @DocString(name="probe-directory",
     77               args="pathspec",
     78               returns="truename")
     79    private static final class pf_probe_directory extends Primitive {
     80        pf_probe_directory() {
     81            super("probe-directory", PACKAGE_EXT, true);
     82        }
    7183        @Override
    7284        public LispObject execute(LispObject arg)
     
    8193    };
    8294
    83     // ### file-directory-p
    84     // file-directory-p pathspec => generalized-boolean
    85     private static final Primitive FILE_DIRECTORY_P =
    86         new Primitive("file-directory-p", PACKAGE_EXT, true)
    87     {
     95    public static final Primitive FILE_DIRECTORY_P
     96        = new pf_file_directory_p();
     97    @DocString(name="file-directory-p",
     98               args="pathspec",
     99               returns="generalized-boolean")
     100    private static final class pf_file_directory_p extends Primitive {
     101        pf_file_directory_p() {
     102            super("file-directory-p", PACKAGE_EXT, true);
     103        }
     104
    88105        @Override
    89106        public LispObject execute(LispObject arg)  // XXX Should this merge with defaults?
Note: See TracChangeset for help on using the changeset viewer.