(DEFINE-FILE-INFO PACKAGE "IL" READTABLE "INTERLISP" BASE 10)
(FILECREATED "10-May-88 12:55:32" {QV}<NOTECARDS>1.3LNEXT>RGPATCH082.;1 7793   

      changes to%:  (VARS RGPATCH082COMS))


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

(PRETTYCOMPRINT RGPATCH082COMS)

(RPAQQ RGPATCH082COMS (
          
          (* ;; "rg 5/10/88: fixes 3 problems. 1) NC.LoadFileFromDirectories tries to avoid calling FINDFILE.  2) New arg to NC.LoadFileFromDirectories allows loading a file that was already loaded in a previous version, POSTRELEASEPATCHES now loaded using this flag. 3) NEW-WHERE-IS removed from NOTECARDSLISPUSERSFILES, now only used if the user really really wants it.  I recommend that implementors either connect to the source directory or put it on their search path.")

                       
          
          (* ;; "changes to NOTECARDS")

                       
          
          (* ;; "*** REMOVE NEW-WHERE-IS from NOTECARDSLISPUSERSFILES (in NOTECARDSCOMS)")

                       (FNS NC.LoadFileFromDirectories NC.PostGreet)
                       (PROP (FILETYPE MAKEFILE-ENVIRONMENT)
                             RGPATCH082)))



(* ;; 
"rg 5/10/88: fixes 3 problems. 1) NC.LoadFileFromDirectories tries to avoid calling FINDFILE.  2) New arg to NC.LoadFileFromDirectories allows loading a file that was already loaded in a previous version, POSTRELEASEPATCHES now loaded using this flag. 3) NEW-WHERE-IS removed from NOTECARDSLISPUSERSFILES, now only used if the user really really wants it.  I recommend that implementors either connect to the source directory or put it on their search path."
)




(* ;; "changes to NOTECARDS")




(* ;; "*** REMOVE NEW-WHERE-IS from NOTECARDSLISPUSERSFILES (in NOTECARDSCOMS)")

(DEFINEQ

(NC.LoadFileFromDirectories
  [LAMBDA (FileName Directories QuietFlg TypeName AlwaysFlg)
                                                      (* ; "Edited  2-May-88 16:23 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")

    (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)))
                 FullName)
                (if [AND [OR AlwaysFlg (NOT (GETPROP (SIMPLE-FILENAME FileName)
                                                   'FILEDATES]
                         (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])

(NC.PostGreet
  [LAMBDA NIL                                         (* ; "Edited 10-May-88 12:44 by Randy.Gobbel")
          
          (* ;; "called when loading NOTECARDS and after each greet (for NOTECARDS sysout users) Note this means you cannot put anything in here that should not be called twice!")
          
          (* ;; "rg 9/2/87 added (NC.FixFileDates NC.LoadedFiles)")
          
          (* ;; "rg 1/15/88 no longer calls NC.FixFileDates, sets up to use NEW-WHERE-IS database")
          
          (* ;; "rg 1/22/88: use database even if source access not turned on")
          
          (* ;; 
      "rg 5/10/88: undo previous change, also now loads POSTRELEASEPATCHES even if loaded previously")

    (DECLARE (GLOBALVARS NC.SourceAccessFlg NC.CardTypes NC.CoreFiles NC.LoadedFiles NOTECARDTYPES 
                    NOTECARDTYPESTUBS NOTECARDSLIBRARYFILES NOTECARDSLISPUSERSFILES 
                    NCINITIALGLOBALPARAMS))
    [LET (FullFileName TypeName Type File)
         (for TypeName in NOTECARDTYPES unless (AND (SETQ Type (GETHASH TypeName NC.CardTypes))
                                                    (NOT (fetch (NoteCardType StubFlg) of Type)))
            do (NC.CardTypeLoader TypeName NIL T))
          
          (* ;; "in case new patches have been made since the sysout was made or the last greet")

         (NC.LoadFileFromDirectories 'POSTRELEASEPATCHES NIL NIL NIL T)
         (for TypeName in NOTECARDTYPESTUBS unless (OR (NC.CardTypeRecord TypeName)
                                                       (MEMB TypeName NOTECARDTYPES)
                                                       (GETHASH TypeName NC.CardTypes))
            do (NC.CardTypeStubLoader TypeName))
          
          (* ;; "Load the library packages requested by the user's NOTECARDSLIBRARYFILES parameters")

         (for File in NOTECARDSLIBRARYFILES unless (GETPROP File 'FILEDATES)
            do (COND
                  ((SETQ FullFileName (NC.FindFile File))
                   (NC.LoadFileFromDirectories FullFileName))
                  (T (PRINT (CONCAT "NoteCards: Can't find library file: " File "."]
    (for File in NOTECARDSLISPUSERSFILES do (NC.LoadFileFromDirectories File 'LISPUSERSDIRECTORIES))
    (if (GETD 'START-TEDIT-KILLER)
        then (START-TEDIT-KILLER))
    (if (AND NC.SourceAccessFlg (GETD 'XCL::ADD-WHERE-IS-DATABASE))
        then (XCL::ADD-WHERE-IS-DATABASE (NC.FindFile 'NOTECARDS.HASH NIL NIL T)))
    (NCP.NoteCardsParameters NCINITIALGLOBALPARAMS])
)

(PUTPROPS RGPATCH082 FILETYPE :TCOMPL)

(PUTPROPS RGPATCH082 MAKEFILE-ENVIRONMENT (:PACKAGE "IL" :READTABLE "INTERLISP" :BASE 10))
(PUTPROPS RGPATCH082 COPYRIGHT ("Xerox Corporation" 1988))
(DECLARE%: DONTCOPY
  (FILEMAP (NIL (1797 7571 (NC.LoadFileFromDirectories 1807 . 4948) (NC.PostGreet 4950 . 7569)))))
STOP