(DEFINE-FILE-INFO READTABLE "XCL" PACKAGE "LISP")
(IL:FILECREATED "15-Jun-90 11:50:26" IL:|{DSK}<usr>local>lde>lispcore>internal>library>CMLHELP.;2| 12901  

      IL:|changes| IL:|to:|  (IL:VARS IL:CMLHELPCOMS)

      IL:|previous| IL:|date:| "20-Oct-86 11:42:05" 
IL:|{DSK}<usr>local>lde>lispcore>internal>library>CMLHELP.;1|)


; Copyright (c) 1985, 1986, 1990 by Venue & Xerox Corporation.  All rights reserved.

(IL:PRETTYCOMPRINT IL:CMLHELPCOMS)

(IL:RPAQQ IL:CMLHELPCOMS ((IL:INITVARS (IL:CMLPATH '(IL:|{ERIS}<CommonLoops>PCL>| 
                                                               IL:{ERIS}<COMMONLISP>CODE> 
                                                               IL:{ERIS}<COMMONLISP>CLC>))
                                     (IL:CMLWINDOW))
                              (IL:FNS IL:ADDHASHFILE IL:CMLSHOW IL:MAKECMLINDEX IL:CMLWINDOW 
                                     IL:CMLHASHFILE)
                              (IL:INITVARS (IL:CMLDEFS)
                                     (IL:CMLMANHASH))))

(IL:RPAQ? IL:CMLPATH '(IL:|{ERIS}<CommonLoops>PCL>| IL:{ERIS}<COMMONLISP>CODE> 
                                 IL:{ERIS}<COMMONLISP>CLC>))

(IL:RPAQ? IL:CMLWINDOW )
(IL:DEFINEQ

(il:addhashfile
  (il:lambda (il:name il:val il:harray)
    (il:puthashfile il:name (cons il:val (il:gethashfile il:name il:harray))
           il:harray)))

(il:cmlshow
  (il:lambda (il:name il:to il:manp)                         (il:* il:|lmm| " 9-May-86 17:13")
    (let
     ((il:out (or il:to (il:|if| il:manp il:|then| (il:setq il:to t)
                               il:|else|
                               (il:openstream 'il:{scratch} 'il:both 'il:new))))
      il:window
      (il:found 0)
      il:str)
     (il:|for|
      il:hf il:|inside| (il:cmlhashfile il:manp)
      il:|do|
      (let
       ((il:lst (il:gethashfile (il:u-case il:name)
                       (car il:hf))))
       (il:|for|
        il:|occurence| il:|inside| (remove-duplicates il:lst :test 'il:equal)
        il:|do|
        (il:resetlst (il:resetsave nil (list 'il:closef? (il:setq il:str
                                                          (il:|for| il:file il:|inside| (cdr il:hf)
                                                                 il:|bind| il:fn il:|when|
                                                                 (il:setq il:fn
                                                                  (il:infilep (il:packfilename
                                                                               'il:body
                                                                               (car il:|occurence|)
                                                                               'il:body il:file)))
                                                                 il:|do|
                                                                 (return (il:openstream il:fn
                                                                                'il:input
                                                                                'il:old))))))
               (il:|if| il:str il:|then|                     (il:* il:|we| il:|found| il:|the| 
                                                             il:|file| il:|on| il:|this| il:|dir|)
                      (let ((il:end (or (il:filepos (il:|if| il:manp il:|then| 
                                                             (il:* il:|end| il:|of| il:|definition|)
                                                           "
@ENDDEF" il:|else|                                           (il:* il:|dunno| il:|where| il:|it| 
                                                             il:|ends,| il:|just| il:|get| il:|the| 
                                                             il:|next| il:|one|)
                                                           "
(def")
                                               il:str
                                               (il:plus 4 (cadr il:|occurence|))
                                               nil nil nil (il:uppercasearray))
                                        (il:geteofptr il:str))))
                           (il:selectq il:out
                                 (il:tedit (il:opentextstream il:str (il:|if| il:window il:|then|
                                                                            (il:createw nil 
                                                                                   "CML definitions")
                                                                            il:|else|
                                                                            (il:setq il:window (
                                                                                         il:cmlwindow
                                                                                                )))
                                                  (cadr il:|occurence|)
                                                  il:end
                                                  (and (not il:manp)
                                                       '(il:font (il:terminal 10)
                                                               il:paralooks
                                                               (il:tabs (48))))))
                                 ((il:allfile t) 
                                       (il:setq il:window (il:|if| il:window il:|then|
                                                                 (il:createw nil "CML definitions")
                                                                 il:|else|
                                                                 (il:cmlwindow)))
                                       (il:windowprop il:window 'il:title (il:fullname il:str))
                                       (il:tedit.setsel (il:setq il:str
                                                         (il:opentextstream
                                                          il:str nil nil nil
                                                          (and (not il:manp)
                                                               '(il:font (il:terminal 10)
                                                                       il:paralooks
                                                                       (il:tabs (48))))))
                                              (cadr il:|occurence|)
                                              (il:difference il:end (cadr il:|occurence|)))
                                       (il:opentextstream il:str il:window nil nil
                                              (and (not il:manp)
                                                   '(il:font (il:terminal 10)
                                                           il:paralooks
                                                           (il:tabs (48))))))
                                 (progn (il:printout il:out "(from " (il:fullname il:str)
                                               ")" t)
                                        (il:copybytes il:str il:out (cadr il:|occurence|)
                                               il:end)
                                        (il:terpri il:out)))
                           (il:|add| il:found 1)))))))
     (il:|if| (not il:to)
            il:|then|
            (il:opentextstream il:out (let ((il:w (il:cmlwindow)))
                                           (il:windowprop il:w 'il:title "Common Lisp definition")
                                           il:w)
                   nil nil '(il:font (il:terminal 10)
                                   il:paralooks
                                   (il:tabs (48))))
            (let ((il:pw (il:getpromptwindow (il:cmlwindow))))
                 (il:clearw il:pw)
                 (il:selectq il:found
                       (0 (il:printout il:pw "No occurences of" il:\, il:name "."))
                       (1 (il:printout il:pw il:found il:\, "occurence of" il:\, il:name "."))
                       (il:printout il:pw il:found il:\, "occurences of" il:\, il:name "."))))
     il:found)))

(il:makecmlindex
  (il:lambda (il:pattern il:hf il:manp)                      (il:* il:|lmm| "28-Apr-86 11:44")
    (il:setq il:hf (il:openhashfile (or il:hf "CML.HASH")
                          'il:new 40 3080))
    (il:|bind| il:str il:nf (il:readtable il:_ (il:|if| il:manp il:|then|
                                                      (let ((il:rt (il:copyreadtable il:cmlrdtbl)))
                                                           (il:setsyntax (il:charcode ",")
                                                                  'il:sepr il:rt)
                                                           (il:setsyntax (il:charcode il:})
                                                                  'il:sepr il:rt)
                                                           (il:setsyntax (il:charcode il:{)
                                                                  'il:sepr il:rt)
                                                           il:rt)
                                                      il:|else| il:cmlrdtbl))
           il:|for| il:file il:|in| (il:fildir (il:packfilename 'il:body il:pattern 'il:extension
                                                      'il:*
                                                      'il:version "" 'il:name 'il:*))
           il:|do|
           (il:resetlst (il:resetsave nil (list 'il:closef? (il:setq il:str (il:openstream
                                                                             il:file
                                                                             'il:input
                                                                             'il:old))))
                  (il:setq il:nf (il:namefield il:file t))
                  (il:printout t il:file t)
                  (il:|while| (il:filepos (il:|if| il:manp il:|then| "
@Def" il:|else| "
(def")
                                     il:str nil nil nil nil (il:uppercasearray))
                         il:|do|
                         (il:readc il:str)
                         (let ((il:pos (il:getfileptr il:str))
                               (il:deffer (progn (il:bin il:str)
                                                 (il:read il:str il:readtable)))
                               (il:defd (il:read il:str il:readtable)))
                              (il:printout t ".")
                              (let ((il:defa (il:|if| (il:listp il:defd)
                                                    il:|then|
                                                    (il:|if| il:manp il:|then| (cadr il:defd)
                                                           il:|else|
                                                           (car il:defd))
                                                    il:|else| il:defd)))
                                   (il:|if| (symbolp il:defa)
                                          il:|then|
                                          (il:addhashfile il:defa (list il:nf il:pos)
                                                 il:hf)))))))))

(il:cmlwindow
  (il:lambda nil
    (or il:cmlwindow (il:setq il:cmlwindow (il:createw '(0 0 500 300) "CML definitions")))))

(il:cmlhashfile
  (il:lambda (il:manp)                                       (il:* il:|lmm| "28-Apr-86 11:59")
    (il:|if| il:manp il:|then| (or il:cmlmanhash (il:setq il:cmlmanhash
                                                  (list (cons (il:openhashfile '
                                                                 il:{eris}<commonlisp>manual>cml.hash
                                                                     'il:input)
                                                              'il:{eris}<commonlisp>manual>))))
           il:|else|
           (or il:cmldefs (il:setq il:cmldefs (il:|for| il:|path| il:|inside| il:cmlpath il:|bind| 
                                                     il:file il:|when| (il:setq il:file
                                                                        (il:findfile "CML.HASH" t
                                                                               (il:mklist il:|path|))
                                                                        )
                                                     il:|collect|
                                                     (cons (il:openhashfile il:file 'il:input)
                                                           il:|path|)))))))
)

(IL:RPAQ? IL:CMLDEFS )

(IL:RPAQ? IL:CMLMANHASH )
(IL:PUTPROPS IL:CMLHELP IL:COPYRIGHT ("Venue & Xerox Corporation" 1985 1986 1990))
(IL:DECLARE\: IL:DONTCOPY
  (IL:FILEMAP (NIL (1218 12730 (IL:ADDHASHFILE 1231 . 1391) (IL:CMLSHOW 1393 . 8243) (IL:MAKECMLINDEX 
8245 . 11324) (IL:CMLWINDOW 11326 . 11453) (IL:CMLHASHFILE 11455 . 12728)))))
IL:STOP
