+(defun* ensure-absolute-pathname* (x fmt &rest args)
+ (and (plusp (length x))
+ (or (absolute-pathname-p x)
+ (cerror "ignore relative pathname"
+ "Invalid relative pathname ~A~@[ ~?~]" x fmt args))
+ x))
+(defun* split-absolute-pathnames (x fmt &rest args)
+ (loop :for dir :in (split-string
+ x :separator (string (inter-directory-separator)))
+ :do (apply 'ensure-absolute-pathname* dir fmt args)
+ :collect dir))
+(defun getenv-absolute-pathname (x &aux (s (getenv x)))
+ (ensure-absolute-pathname* s "from (getenv ~S)" x))
+(defun getenv-absolute-pathnames (x &aux (s (getenv x)))
+ (split-absolute-pathnames s "from (getenv ~S) = ~S" x s))
+