[Cl-darcs-cvs] r62 - cl-darcs/trunk

Author: mhenoch Date: Tue Oct 31 19:34:20 2006 New Revision: 62 Modified: cl-darcs/trunk/upath.lisp Log: Change package references from PURI to NET.URI. Makes the code work on ACL, and that is a nickname for the PURI package anyway. Modified: cl-darcs/trunk/upath.lisp ============================================================================== --- cl-darcs/trunk/upath.lisp (original) +++ cl-darcs/trunk/upath.lisp Tue Oct 31 19:34:20 2006 @@ -18,7 +18,7 @@ ;; "Universal pathname" - can refer to either a local or a remote ;; file. For local files, just use pathnames. For remote files, use -;; the PURI library. +;; the PURI library. (Or the real thing, if we're using ACL) (defun make-upath (path) "Turn PATH into a \"universal pathname\". @@ -28,12 +28,12 @@ (ctypecase path (pathname path) - (puri:uri + (net.uri:uri path) (string (if (or (string= path "http://" :end1 7) (string= path "https://" :end1 8)) - (puri:parse-uri path) + (net.uri:parse-uri path) (pathname path))))) (defun upath-subdir (base subdirs &optional filename) @@ -44,16 +44,16 @@ (pathname-directory subdirs) subdirs)))) (ctypecase base - (puri:uri - (let* ((current-path (puri:uri-parsed-path base)) + (net.uri:uri + (let* ((current-path (net.uri:uri-parsed-path base)) (new-path (cond ((null current-path) (cons :absolute subdirs-list)) (t (append current-path subdirs-list)))) - (new-uri (puri:copy-uri base))) - (setf (puri:uri-parsed-path new-uri) (if filename + (new-uri (net.uri:copy-uri base))) + (setf (net.uri:uri-parsed-path new-uri) (if filename (append new-path (list filename)) new-path)) new-uri)) @@ -70,7 +70,7 @@ else CHARACTER." (setf upath (make-upath upath)) (ctypecase upath - (puri:uri + (net.uri:uri (dformat "~&Opening ~A..." upath) (let ((client-request (net.aserve.client:make-http-client-request upath :proxy *http-proxy*))) (net.aserve.client:read-client-response-headers client-request) @@ -84,7 +84,7 @@ (dformat "~&Redirected to ~A." new-location) (net.aserve.client:client-request-close client-request) (open-upath - (puri:uri new-location) + (net.uri:uri new-location) :redirect-max-depth (1- redirect-max-depth) :binary binary))) (t (error "Couldn't read ~A: ~A ~A."
participants (1)
-
mhenoch@common-lisp.net