;;; -*- Mode:LISP; Package:USER; Base:10; READTABLE:CL -*-

;;;Define FALCON logical host for Falcon software:
;;;
;;;$$$Modified (by almost unamimous request) to parameterize the release
;;;hierarchy.  Loading this file will ask you what hierarchy on the
;;;physical host you want; the default can be taken by pressing <return>
;;;or waiting for the query to time out.  <keith 31oct88>

(defvar *falcon-host* "JB")
(defvar *falcon-source-release-default* "K")

(defvar *falcon-source-release*  *falcon-source-release-default*)

(defun switch-k-release (&optional source-release (timeout 2.))
  (setq  *falcon-source-release*
	 (or source-release
	     (with-timeout ((* 60. 60. timeout))
	       (prompt-and-read
		 :string-or-nil
		 "~&Falcon source hierarchy (default, in ~D minutes, is ~S) > "
		 timeout *falcon-source-release-default*))
	     *falcon-source-release-default*))
  (format t "~&Setting K release hierarchy to ~:@(~A:~A;~)" *falcon-host* *falcon-source-release*)
  (fs:set-logical-pathname-host "FALCON"
    :physical-host *falcon-host*
    :nicknames '("K-SYS")
    :translations
    (loop for translist in 
	  `(("K;"           "<~A>")
	    ("k.*;"         "<~A.*>")
	    ("k.*.*;"       "<~A.*.*>")
	    ("kbug;"        "<~A.kbug>")
	    ("kbug2;"       "<~A.kbug2>")
	    ("kdoc;"        "<~A.kdoc>")
	    ("kdoc.*;"      "<~A.kdoc.*>")
	    ("kdoc.*.*;"    "<~A.kdoc.*.*>")
	    ("fleabit;"     "<~A.fleabit>")
	    ("fleabit.*;"   "<~A.fleabit.*>")
	    ("fleabit.*.*;" "<~A.fleabit.*.*>")
	    ("compiler"     "<~A.compiler>")
	    ("bus-coupler"  "<~A.bus-coupler>")
	    ("cold"         "<~A.cold>")
	    ("warm"         "<~A.warm>")
	    ("hot"          "<~A.hot>")
	    ("NCOLD"	    "<~A.NCOLD>"))
	  as trans  = (first translist)
	  as real = (second translist)
	  collect (list trans (format nil real *falcon-source-release*)))))

(switch-k-release)

;;;FALCON documentation directories:

(fs:set-logical-pathname-host "FALCON-DOCS"
  :physical-host "JB"
  :translations '(("KWARE;*.botex" "JB:KDOC.falcon;*.botex")
		  ("KWARE;*.dvi" "BRAHMS:SAZ;RELEASED-MANUALS;*.dvi")
		  ("*" "JB:KDOC.FALCON;*.botex")))
