;;; -*- Mode:LISP; Readtable:CL; Base:10 -*-

;;;Here are elements of the property list for :LISPM -
;;;(:DIRECTORY-LINE-PARSER FS::LISPM-DIRECTORY-LINE-PARSER
;;; FS::LISPM-PATHNAME-FLAVOR FS::LM-PATHNAME
;;; FS::FILE-SYSTEM-HOST-FLAVOR FS::LISPM-HOST
;;; SI::HOST-FLAVOR FS::LISPM-HOST
;;; SI::SYSTEM-TYPE-FLAVOR SI:HOST-LISPM-MIXIN)

(defun systype(type &aux plist)
  (setq plist (cons type (copy-list (plist type))))
  (when plist
    (let((parser (car(remprop plist :directory-line-parser)))
	 (pathnm (car(remprop plist 'fs:lispm-pathname-flavor)))
	 (filesh (car(remprop plist 'fs:file-system-host-flavor)))
	 (system (car(remprop plist 'si:system-type-flavor)))
	 (hostfl (car(remprop plist 'si:host-flavor))))
      (cond
	((or system hostfl parser pathnm filesh)
	 (format t "~2%Type ~a " type)
	 (format t "~:[is not a system type.~;~%  is a system type:        ~:*~s~]" system)
	 (format t "~@[~%  for defining host:       ~s~]" hostfl)
	 (format t "~@[~%  for parsing pathnames:   ~s~]" pathnm)
	 (format t "~@[~%  for accessing files:     ~s~]" filesh)
	 (format t "~@[~%  for parsing directories: ~s~]" parser)
	 (format t "~@[~%  anything interesting?    ~s~]" (cdr plist))
	 t)
	(t nil)))))

(defun findtypes()
  (apropos "" 'keyword
	   :dont-print t
	   :inherited nil
	   :predicate #'systype))


