Changeset 10000


Ignore:
Timestamp:
09/22/05 00:26:38 (16 years ago)
Author:
piso
Message:

HOST-NAMESTRING

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/Pathname.java

    r9993 r10000  
    33 *
    44 * Copyright (C) 2003-2005 Peter Graves
    5  * $Id: Pathname.java,v 1.92 2005-09-21 18:51:17 piso Exp $
     5 * $Id: Pathname.java,v 1.93 2005-09-22 00:26:38 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    918918        {
    919919            Pathname pathname = Pathname.coerceToPathname(arg);
    920             if (pathname instanceof LogicalPathname) {
    921                 try {
    922                     pathname = (Pathname) Symbol.TRANSLATE_LOGICAL_PATHNAME.execute(pathname);
    923                 }
    924                 catch (ClassCastException e) {
    925                     return signalTypeError(pathname, Symbol.PATHNAME);
    926                 }
    927             }
     920            if (pathname instanceof LogicalPathname)
     921                pathname = LogicalPathname.translateLogicalPathname((LogicalPathname)pathname);
    928922            LispObject result = NIL;
    929923            String s = pathname.getNamestring();
     
    11481142    {
    11491143        Pathname pathname = Pathname.coerceToPathname(arg);
    1150         if (pathname instanceof LogicalPathname) {
    1151             try {
    1152                 pathname = (Pathname) Symbol.TRANSLATE_LOGICAL_PATHNAME.execute(pathname);
    1153             }
    1154             catch (ClassCastException e) {
    1155                 return signalTypeError(pathname, Symbol.PATHNAME);
    1156             }
    1157         }
     1144        if (pathname instanceof LogicalPathname)
     1145            pathname = LogicalPathname.translateLogicalPathname((LogicalPathname)pathname);
    11581146        if (pathname.isWild())
    11591147            return signal(new FileError("Bad place for a wild pathname.",
     
    12621250        new Primitive("host-namestring", "pathname")
    12631251    {
    1264         public LispObject execute(LispObject arg)
    1265         {
    1266             return NIL;
     1252        public LispObject execute(LispObject arg) throws ConditionThrowable
     1253        {
     1254            Pathname p = coerceToPathname(arg);
     1255            return p.host;
    12671256        }
    12681257    };
Note: See TracChangeset for help on using the changeset viewer.