(FILECREATED " 9-Jul-87 12:02:02" {QV}<NOTECARDS>1.3K>NEXT>RGPATCH051.;8 10217 changes to: (FNS NC.FixFileDates NC.UpdateConfig NC.FindFile NC.LoadFileFromDirectories NC.CardTypeStubLoader NC.SetSystemDate) (VARS RGPATCH051COMS) previous date: "19-Jun-87 18:53:29" {QV}<NOTECARDS>1.3K>NEXT>RGPATCH051.;1) (* Copyright (c) 1987 by Xerox Corporation. All rights reserved.) (PRETTYCOMPRINT RGPATCH051COMS) (RPAQQ RGPATCH051COMS ((* * rg 6/19/87 mostly new stuff for config control) (* * REMOVE these fns from NOTECARDS coms - they go in NCCONFIG) (FNS NC.FixFileDates NC.FindFile NC.UpdateConfig NC.SetSystemDate) (INITVARS (NC.InstallFlg NIL) (NC.DebugFlg T)) (* * changes to NCTYPESMECH) (FNS NC.CardTypeStubLoader) (* * changes to NCUTILITIES) (FNS NC.LoadFileFromDirectories))) (* * rg 6/19/87 mostly new stuff for config control) (* * REMOVE these fns from NOTECARDS coms - they go in NCCONFIG) (DEFINEQ (NC.FixFileDates [LAMBDA (Files) (* Randy.Gobbel " 9-Jul-87 12:01") (* * rg 10/29/86: Created) (* * rg 6/19/87 now uses config machinery, smashes all necessary info, not just filedates property) (* * If we loaded out of next dir, do nothing. Otherwise, if the directory in the filedates is the next dir, do a findfile on the source for the file and stuff that into the filedates.) (DECLARE (GLOBALVARS NC.DebugFlg NC.HackerFlg NC.ThisDirectory NOTECARDSNEXTDIRECTORIES FILELST)) (if (OR NC.DebugFlg NC.HackerFlg) then (for file in (MKLIST Files) do (LET [(rootName (FILENAMEFIELD file (QUOTE NAME] [PUTPROP rootName (QUOTE FILEDATES) (LIST (CONS (GETPROP rootName (QUOTE FileDate)) (NC.FindFile rootName NIL NIL T] (PUTPROP rootName (QUOTE FILE) (GETPROP rootName (QUOTE InitialFile))) (SET (FILECOMS rootName) (GETPROP rootName (QUOTE FileComs))) (pushnew FILELST rootName]) (NC.FindFile [LAMBDA (FileName TypeName CheckConnectedDirFlg SourceFlg Directories) (* Randy.Gobbel " 9-Jul-87 11:40") (* * kirk 6/12/86 find code file to implement a card type) (* * kirk 9/21/86 added optional FileName parameter) (* * rht&rg&pmi 10/21/86: Removed lots of useless kruft and replaced with other FINDFILE kruft. Added CheckConnectedDirFlg arg.) (* * kirk 12/23/86 replaced use of DCOM with COMPILE.EXT) (* * RG 5/15/87 now return NIL if final FINDFILE fails) (* * rg 6/19/87 try to use filename props if they exist. Don't use props if initial install of this version on a particular file server.) (DECLARE (GLOBALVARS NOTECARDSDIRECTORIES)) (LET [(FilesLoadDirs (OR Directories (if CheckConnectedDirFlg then (CONS (DIRECTORYNAME T T) NOTECARDSDIRECTORIES) else NOTECARDSDIRECTORIES] [OR FileName (SETQ FileName (PACK* (QUOTE NC) (U-CASE TypeName) (QUOTE CARD] (OR [AND (NOT NC.InstallFlg) (FINDFILE (GETPROP FileName (if SourceFlg then (QUOTE SourceFile) else (QUOTE CompiledFile] (if (AND (NULL (FILENAMEFIELD FileName (QUOTE EXTENSION))) (FINDFILE (PACKFILENAME (QUOTE BODY) FileName (QUOTE EXTENSION) (if SourceFlg then "" else COMPILE.EXT)) T FilesLoadDirs)) else (FINDFILE FileName T FilesLoadDirs]) (NC.UpdateConfig [LAMBDA (Directory) (* Randy.Gobbel " 9-Jul-87 11:58") (DECLARE (GLOBALVARS NC.InstallFlg NC.ConfigFiles NC.AutoloadStubFns NC.AutoloadableFns NC.NoUpdateFlg NOTECARDTYPESTUBS)) (if (NOT NC.NoUpdateFlg) then (SETQ Directory (OR Directory (DIRECTORYNAME T))) [for File in NC.ConfigFiles do (if NC.InstallFlg then (LOAD? File (QUOTE ALLPROP))) (for Prop in (GETPROP File (QUOTE ConfigProps)) when (LISTP Prop) do (PUTPROP File (CAR Prop) (APPLY* (CADR Prop) File Directory] (SETQ NC.AutoloadStubFns (for TypeName in NOTECARDTYPESTUBS bind Fn eachtime (SETQ Fn (PACK* (QUOTE NCAddStub.) TypeName (QUOTE Card))) when (GETD Fn) collect Fn)) (NC.SetSystemDate]) (NC.SetSystemDate [LAMBDA NIL (* Randy.Gobbel "19-Jun-87 18:42") (* * Set the NC.SystemDate from the stored file dates) (DECLARE (GLOBALVARS NC.SystemDate NC.Files)) (LET (ThisFileDate) (SETQ NC.SystemDate "23-Aug-70 13:28:52") (for File in NC.ConfigFiles do [SETQ ThisFileDate (CAAR (GETPROP File (QUOTE FILEDATES] (if (AND ThisFileDate (GREATERP (IDATE ThisFileDate) (IDATE NC.SystemDate))) then (SETQ NC.SystemDate ThisFileDate) (PUTPROP (QUOTE NC.SystemDate) (QUOTE NewestFile) File]) ) (RPAQ? NC.InstallFlg NIL) (RPAQ? NC.DebugFlg T) (* * changes to NCTYPESMECH) (DEFINEQ (NC.CardTypeStubLoader [LAMBDA (TypeName FileSuggestion) (* Randy.Gobbel "19-Jun-87 19:12") (* * Load card type TypeName using FileSuggestion as the first place to look. Otherwise look in the directories specified by NoteCardsDirectories.) (* * fgh 2/3/86 First written.) (* * kirk 6/20/86 Added NCP.Add...CardStub fn load and call) (* * kirk 9/9/86 Changed the name of the FN to search for to NCAddStub...Card) (* * kirk 9/21/86 added RESETLST) (* * rg 10/21/86: Changed to use simpler scheme for finding files) (* * rht&rg 11/7/86: Now passes (QUOTE VARS) arg to LOADFNS so that interesting vars like link icon bitmap will be loaded. There ought to be a better way.) (* * rg 5/18/87 checks, via disgusting kludge, to see if file can be opened random access, if not, loads whole file) (* * rht 6/12/87: Changed call to OPENSTREAM to open for INPUT rather than BOTH.) (* * rg 6/18/87 now checks for files on NS servers by looking for a colon in the file name) (* * rg 6/19/87 check for AddTypeFn already defined before attempting to load it) (LET* ((FileName (NC.FindFile FileSuggestion TypeName T)) (oldFILEDATES (GETPROP FileName (QUOTE FILEDATES))) (NSServerFlg (STRPOS ":" FileName)) AddTypeFn) (if FileName then [RESETLST [RESETSAVE NIL (BQUOTE (COND (oldFILEDATES (PUTPROP , (LIST (QUOTE QUOTE) FileName) (QUOTE FILEDATES) oldFILEDATES)) (T (REMPROP , (LIST (QUOTE QUOTE) FileName) (QUOTE FILEDATES] (* * Load and eval the NC.Add...CardStub fn) (SETQ AddTypeFn (PACK* (QUOTE NCAddStub.) TypeName (QUOTE Card))) (OR (FNTYP AddTypeFn) (PROGN (if NSServerFlg then (LOAD? FileName NC.LOADFLG) else (LOADFNS AddTypeFn FileName NIL (QUOTE VARS))) (NC.FixFileDates FileName] (if (NOT (FNTYP AddTypeFn)) then (NC.ReportError "NC.CardTypeStubLoader" (CONCAT "NoteCards: Can't find card type stub init procedure: " AddTypeFn " in " FileName "."))) (* * this should call NC.AddCardTypeStub) (APPLY AddTypeFn]) ) (* * changes to NCUTILITIES) (DEFINEQ (NC.LoadFileFromDirectories [LAMBDA (FileName Directories QuietFlg) (* Randy.Gobbel " 9-Jul-87 11:39") (* * 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.) (* * fgh 6/3/86 Now closes tty window after ts done.) (* * rht 10/31/86: Changed "DIRECTORIES" to "Directories") (* * rht 4/17/87: Now smashes PAGEFULLFN of tty window so that it'll scroll automatically. Also prints a message to the tty window.) (* * rg 7/9/87 now uses NC.FindFile) (RESETLST [RESETSAVE NIL (if (OPENWP (WFROMDS (TTYDISPLAYSTREAM) T)) then (SETQ QuietFlg T) (QUOTE (NILL)) else (BQUOTE (CLOSEW , (WFROMDS (TTYDISPLAYSTREAM] [RESETSAVE NIL (if QuietFlg then (QUOTE (NILL)) else (BQUOTE (WINDOWPROP , (WFROMDS (TTYDISPLAYSTREAM)) (QUOTE PAGEFULLFN) , (WINDOWPROP (WFROMDS ( TTYDISPLAYSTREAM)) (QUOTE PAGEFULLFN) (QUOTE NILL] (LET [(Window (WFROMDS (TTYDISPLAYSTREAM] (if (NOT QuietFlg) then (CLEARW Window) (FLASHWINDOW Window) (PRINTOUT Window "Attempting to autoload " FileName T)) (LOAD? (NC.FindFile FileName NIL NIL NIL Directories) (QUOTE SYSLOAD)) (NC.FixFileDates FileName]) ) (PUTPROPS RGPATCH051 COPYRIGHT ("Xerox Corporation" 1987)) (DECLARE: DONTCOPY (FILEMAP (NIL (984 5644 (NC.FixFileDates 994 . 2181) (NC.FindFile 2183 . 3907) (NC.UpdateConfig 3909 . 4915) (NC.SetSystemDate 4917 . 5642)) (5738 8349 (NC.CardTypeStubLoader 5748 . 8347)) (8385 10136 ( NC.LoadFileFromDirectories 8395 . 10134))))) STOP