;; Original version from ACL 6.1:
;; uri.cl,v 2.3.6.4.2.1 2001/08/09 17:42:39 layer
;;
-;; $Id: src.lisp,v 1.9 2003/07/20 18:51:48 kevin Exp $
+;; $Id$
(defpackage #:puri
(:use #:cl)
+ #-allegro (:nicknames #:net.uri)
(:export
#:uri ; the type and a function
#:uri-p
(lisp::shrink-vector str size)
#+lispworks
(system::shrink-vector$vector str size)
- #+(or allegro cmu sbcl lispworks)
- str
- #-(or allegro cmu sbcl lispworks)
- (subseq str 0 size))
+ #+scl
+ (common-lisp::shrink-vector str size)
+ #-(or allegro cmu lispworks sbcl scl)
+ (setq str (subseq str 0 size))
+ str)
;; KMR: Added new condition to handle cross-implementation variances
(vector #\0 #\1 #\2 #\3 #\4 #\5 #\6 #\7 #\8 #\9 #\a #\b #\c #\d #\e #\f))
(defun encode-escaped-encoding (string reserved-chars escape)
+ (unless (typep string 'simple-string)
+ (setq string (coerce string 'simple-string)))
(when (null escape) (return-from encode-escaped-encoding string))
;; Make a string as big as it possibly needs to be (3 times the original
;; size), and truncate it at the end.