Changeset 15457
- Timestamp:
- 10/29/20 16:54:55 (3 years ago)
- Location:
- trunk/abcl/src/org/armedbear/lisp
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/JarPathname.java
r15454 r15457 384 384 rootJar.copyFrom((Pathname)p.getRootJar()); 385 385 386 // Ensure that we don't return a JarPathname if the current default is one 387 if (rootJar.getDevice().equals(NIL)) { 386 // Ensure that we don't return a JarPathname if the current 387 // default is one when we resolve its TRUENAME. Under Windows, 388 // the device will get filled in with the DOS drive letter if 389 // applicable. 390 if (rootJar.getDevice().equals(NIL) 391 && !Utilities.isPlatformWindows) { 388 392 rootJar.setDevice(Keyword.UNSPECIFIC); 389 393 } -
trunk/abcl/src/org/armedbear/lisp/Load.java
r15455 r15457 289 289 if (bootPath instanceof Pathname) { 290 290 mergedPathname = (Pathname)Symbol.MERGE_PATHNAMES.execute(pathname, bootPath); 291 // So PROBE-FILE won't attempt to merge when291 // So a PROBE-FILE won't attempt to merge when 292 292 // *DEFAULT-PATHNAME-DEFAULTS* is a JAR 293 if (mergedPathname.getDevice().equals(NIL)) { 293 if (mergedPathname.getDevice().equals(NIL) 294 && !Utilities.isPlatformWindows) { 294 295 mergedPathname.setDevice(Keyword.UNSPECIFIC); 295 296 } -
trunk/abcl/src/org/armedbear/lisp/Pathname.java
r15452 r15457 540 540 } 541 541 542 if (getDevice() == NIL) { 543 } else if (getDevice() == Keyword.UNSPECIFIC) { 542 if (getDevice().equals(NIL) 543 || getDevice().equals(Keyword.UNSPECIFIC)) { 544 // nothing emitted for device 544 545 } else if (getDevice() instanceof AbstractString) { 545 546 sb.append(getDevice().getStringValue()); … … 1112 1113 || value.equals(Keyword.UNSPECIFIC) 1113 1114 || value.equals(NIL) 1114 || value instanceof Cons)) 1115 error(new TypeError("DEVICE is not a string, :UNSPECIFIC, NIL, or a list.", value, NIL)); 1115 || value instanceof Cons)) { 1116 return type_error("DEVICE is not a string, :UNSPECIFIC, NIL, or a list.", 1117 value, 1118 list(Symbol.OR, 1119 Symbol.STRING, Keyword.UNSPECIFIC, NIL, Symbol.CONS)); 1120 } 1116 1121 } else if (key == Keyword.DIRECTORY) { 1117 1122 directorySupplied = true; … … 1121 1126 directory = list(Keyword.ABSOLUTE, Keyword.WILD); 1122 1127 } else { 1123 // a valid pathname directory is a string, a list of strings, nil, :wild, :unspecific 1128 // a valid pathname directory is a string, a list of 1129 // strings, nil, :wild, :unspecific 1130 // 1124 1131 // ??? would be nice to (deftype pathname-arg () 1125 // '(or (member :wild :unspecific) string (and cons ,(mapcar ...1126 // Is this possible?1132 // '(or (member :wild :unspecific) string (and cons 1133 // ,(mapcar ... Is this possible? 1127 1134 if ((value instanceof Cons 1128 1135 // XXX check that the elements of a list are themselves valid … … 1131 1138 directory = value; 1132 1139 } else { 1133 error(new TypeError("DIRECTORY argument not a string, list of strings, nil, :WILD, or :UNSPECIFIC.", value, NIL)); 1140 return 1141 type_error("DIRECTORY argument not a string, list of strings, nil, :WILD, or :UNSPECIFIC.", 1142 value, 1143 list(Symbol.OR, 1144 NIL, Symbol.STRING, Symbol.CONS, Keyword.WILD, Keyword.UNSPECIFIC)); 1134 1145 } 1135 1146 } … … 1169 1180 } 1170 1181 } 1171 Pathname p; 1182 Pathname p; // Pathname is always created in following 1183 // resolution for values of HOST 1172 1184 LispObject logicalHost = NIL; 1173 1185 if (host != NIL) { … … 1184 1196 p.setHost(logicalHost); 1185 1197 } 1186 p.setDevice(Keyword.UNSPECIFIC); 1198 if (!Utilities.isPlatformWindows) { 1199 p.setDevice(Keyword.UNSPECIFIC); 1200 } 1187 1201 } else { 1188 1202 p = Pathname.create(); 1189 1203 } 1204 1190 1205 if (device != NIL) { 1191 1206 if (p instanceof LogicalPathname) { 1192 1207 // "The device component of a logical pathname is always :UNSPECIFIC." 1193 1208 if (device != Keyword.UNSPECIFIC) { 1194 error(new LispError("The device component of a logical pathname must be :UNSPECIFIC.")); 1209 return type_error("The device component of a logical pathname must be :UNSPECIFIC.", 1210 p.getDevice(), Keyword.UNSPECIFIC); 1195 1211 } 1196 1212 } else { … … 1294 1310 return p; 1295 1311 } 1312 1296 1313 1297 1314
Note: See TracChangeset
for help on using the changeset viewer.