Changeset 9987


Ignore:
Timestamp:
09/19/05 15:37:22 (16 years ago)
Author:
piso
Message:

LOGICAL-PATHNAME-TRANSLATIONS: "If host is incorrectly supplied, an error of type TYPE-ERROR is signaled."

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/pathnames.lisp

    r9985 r9987  
    22;;;
    33;;; Copyright (C) 2003-2005 Peter Graves
    4 ;;; $Id: pathnames.lisp,v 1.20 2005-09-19 14:04:07 piso Exp $
     4;;; $Id: pathnames.lisp,v 1.21 2005-09-19 15:37:22 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    1919
    2020(in-package #:system)
     21
     22(export '(logical-host-p))
    2123
    2224(defun pathname-host (pathname &key (case :local))
     
    246248  (string-upcase host))
    247249
    248 (defun logical-pathname-translations (host)
    249   (gethash-2op-1ret (canonicalize-logical-host host)
    250                     *logical-pathname-translations*))
    251 
    252250(defun logical-host-p (canonical-host)
    253251  (multiple-value-bind (translations present)
     
    255253    (declare (ignore translations))
    256254    present))
     255
     256(defun logical-pathname-translations (host)
     257  (multiple-value-bind (translations present)
     258      (gethash (canonicalize-logical-host host) *logical-pathname-translations*)
     259    (unless present
     260      (error 'type-error
     261             :datum host
     262             :expected-type '(and string (satisfies logical-host-p))))
     263    translations))
    257264
    258265(defun canonicalize-logical-pathname-translations (translations host)
Note: See TracChangeset for help on using the changeset viewer.