(DEFINE-FILE-INFO PACKAGE "IL" READTABLE "INTERLISP" BASE 10)
(FILECREATED "23-Jun-88 13:54:08" {QV}<NOTECARDS>1.3LNEXT>RGPATCH086.;1 4507   

      changes to%:  (VARS RGPATCH086COMS)
                    (FNS NC.LoadFileFromDirectories))


(* "
Copyright (c) 1988 by Xerox Corporation.  All rights reserved.
")

(PRETTYCOMPRINT RGPATCH086COMS)

(RPAQQ RGPATCH086COMS (
                       (* ;; "rg 6/22/88 put search through LOADEDFILELST back in - FILEDATES property check wasn't sufficient for, e.g., stubs.")

                       
                       (* ;; "changes to NOTECARDS")

                       (FNS NC.LoadFileFromDirectories)
                       (PROP (FILETYPE MAKEFILE-ENVIRONMENT)
                             RGPATCH086)))



(* ;; 
"rg 6/22/88 put search through LOADEDFILELST back in - FILEDATES property check wasn't sufficient for, e.g., stubs."
)




(* ;; "changes to NOTECARDS")

(DEFINEQ

(NC.LoadFileFromDirectories
  [LAMBDA (FileName Directories QuietFlg TypeName AlwaysFlg)
                                                      (* ; "Edited 23-Jun-88 13:53 by Randy.Gobbel")

    (* ;; "Try to load FileName from Directories.  The latter can be a list in which case the elements should be directory paths.  It can be an atom in which case it should be a DIRECTORIES var.  Or it can be NIL in which case it defaults to the litatom NOTECARDSDIRECTORIES.")

    (* ;; "rg 9/4/87 now pushes file name onto NC.LoadedFiles for use by NC.PostGreet")

    (* ;; "rg 1/15/88 now checks rootified version of LOADEDFILELST, won't load any file that it finds there.  Net effect is that this fn will NEVER load a file that has been loaded in ANY version previously.  No longer calls NC.FixFileDates.")

    (* ;; "rg 1/22/88: doesn't SYSLOAD if NC.SourceAccessFlg set, returns full file name instead of NC.LoadedFiles.  Trimmed change log.")

    (* ;; "rg 5/2/88: Uses FILEDATES prop instead of checking SIMPLELOADEDFILELST, added AlwaysFlg")

    (* ;; "rg 6/22/88 put search through LOADEDFILELST back in - FILEDATES property check wasn't sufficient for, e.g., stubs.")

    (DECLARE (GLOBALVARS NC.LoadedFiles))
    (RESETLST
        [RESETSAVE NIL (if (OPENWP (WFROMDS (TTYDISPLAYSTREAM)
                                          T))
                           then (SETQ QuietFlg T)
                                '(NILL)
                         else `(CLOSEW ,(WFROMDS (TTYDISPLAYSTREAM]
        [RESETSAVE NIL (if QuietFlg
                           then '(NILL)
                         else `(WINDOWPROP ,(WFROMDS (TTYDISPLAYSTREAM))
                                      'PAGEFULLFN
                                      ,(WINDOWPROP (WFROMDS (TTYDISPLAYSTREAM))
                                              'PAGEFULLFN
                                              'NILL]
        [LET ((Window (WFROMDS (TTYDISPLAYSTREAM)))
              (SimpleName (SIMPLE-FILENAME FileName))
              FullName)
             (if [AND [OR AlwaysFlg (NOT (GETPROP SimpleName 'FILEDATES))
                          (for LoadedFile in LOADEDFILELST never (EQ SimpleName (SIMPLE-FILENAME
                                                                                 LoadedFile]
                      (SETQ FullName (NC.FindFile FileName TypeName TypeName NIL
                                            (OR (GETPROP FileName 'Directories)
                                                Directories]
                 then (if (NOT QuietFlg)
                          then (CLEARW Window)
                               (FLASHWINDOW Window)
                               (if TypeName
                                   then (PRINTOUT Window "Card type " TypeName " not loaded." T))
                               (PRINTOUT Window "Attempting to autoload " FileName T))
                      (PROG1 [APPLY* #'FILESLOAD (if NC.SourceAccessFlg
                                                     then `(,FullName)
                                                   else `((SYSLOAD)
                                                          ,FullName]
                          (pushnew NC.LoadedFiles (FILENAMEFIELD FileName 'NAME)))])])
)

(PUTPROPS RGPATCH086 FILETYPE :TCOMPL)

(PUTPROPS RGPATCH086 MAKEFILE-ENVIRONMENT (:PACKAGE "IL" :READTABLE "INTERLISP" :BASE 10))
(PUTPROPS RGPATCH086 COPYRIGHT ("Xerox Corporation" 1988))
(DECLARE%: DONTCOPY
  (FILEMAP (NIL (941 4277 (NC.LoadFileFromDirectories 951 . 4275)))))
STOP