Changeset 15401
- Timestamp:
- 10/10/20 21:43:38 (3 years ago)
- Location:
- trunk/abcl/src/org/armedbear/lisp
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abcl/src/org/armedbear/lisp/Pathname.java
r15400 r15401 261 261 } 262 262 263 static final Symbol SCHEME = internKeyword("SCHEME");264 static final Symbol AUTHORITY = internKeyword("AUTHORITY");265 static final Symbol QUERY = internKeyword("QUERY");266 static final Symbol FRAGMENT = internKeyword("FRAGMENT");267 268 static final private String jarSeparator = "!/";269 270 263 private static final Pathname init(String s) { 271 264 Pathname result = new Pathname(); … … 316 309 317 310 // A JAR file 318 if (s.startsWith("jar:") && s.endsWith(jarSeparator)) { 311 if (s.startsWith(PathnameJar.JAR_URI_PREFIX) 312 && s.endsWith(PathnameJar.JAR_URI_SUFFIX)) { 319 313 return (PathnameJar)PathnameJar.create(s); 320 314 } 321 315 322 316 // An entry in a JAR file 323 final int separatorIndex = s.lastIndexOf( jarSeparator);324 if (separatorIndex > 0 && s.startsWith( "jar:")) {317 final int separatorIndex = s.lastIndexOf(PathnameJar.JAR_URI_SUFFIX); 318 if (separatorIndex > 0 && s.startsWith(PathnameJar.JAR_URI_PREFIX)) { 325 319 return (PathnameJar)PathnameJar.create(s); 326 320 } … … 504 498 || isURL()); 505 499 if (isURL()) { 506 LispObject scheme = Symbol.GETF.execute(getHost(), SCHEME, NIL);507 LispObject authority = Symbol.GETF.execute(getHost(), AUTHORITY, NIL);500 LispObject scheme = Symbol.GETF.execute(getHost(), PathnameURL.SCHEME, NIL); 501 LispObject authority = Symbol.GETF.execute(getHost(), PathnameURL.AUTHORITY, NIL); 508 502 Debug.assertTrue(scheme != NIL); 509 503 sb.append(scheme.getStringValue()); … … 2165 2159 if (this instanceof PathnameURL) { 2166 2160 PathnameURL p = (PathnameURL) this; 2167 LispObject scheme = Symbol.GETF.execute(p.getHost(), SCHEME, NIL);2161 LispObject scheme = Symbol.GETF.execute(p.getHost(), PathnameURL.SCHEME, NIL); 2168 2162 if (scheme.equals(NIL) 2169 2163 || p.getHost().getStringValue().equals("file")) { -
trunk/abcl/src/org/armedbear/lisp/PathnameJar.java
r15398 r15401 78 78 79 79 static public LispObject createFromFile(String s) { 80 return PathnameJar.create( "jar:file:" + s + JAR_URI_SUFFIX);80 return PathnameJar.create(JAR_URI_PREFIX + "file:" + s + JAR_URI_SUFFIX); 81 81 } 82 82 83 83 static public LispObject createEntryFromFile(String jar, String entry) { 84 return PathnameJar.create( "jar:file:" + jar + JAR_URI_SUFFIX + entry);84 return PathnameJar.create(JAR_URI_PREFIX + "file:" + jar + JAR_URI_SUFFIX + entry); 85 85 } 86 86 … … 99 99 int i = s.lastIndexOf(JAR_URI_PREFIX); 100 100 if (i == -1) { 101 parse_error("Failed to find any occurence of ' jar:' prefixes:" + s);101 parse_error("Failed to find any occurence of '" + JAR_URI_PREFIX + "' prefixes:" + s); 102 102 return null; // not reached 103 103 } -
trunk/abcl/src/org/armedbear/lisp/PathnameURL.java
r15400 r15401 75 75 parse_error("Cannot form a PATHNAME-URL from " + s); 76 76 } 77 if (s.startsWith( "jar:")) {77 if (s.startsWith(PathnameJar.JAR_URI_PREFIX)) { 78 78 return PathnameJar.create(s); 79 79 }
Note: See TracChangeset
for help on using the changeset viewer.