(FILECREATED "29-May-85 14:17:38" {PHYLUM}<LANNING>LISP>USERS>LOADPATCHES.;3 2611
changes to: (FNS LoadPatches)
previous date: "19-Apr-85 16:28:23" {PHYLUM}<LANNING>LISP>USERS>LOADPATCHES.;1)
(* Copyright (c) 1985 by Xerox Corporation. All rights reserved.)
(PRETTYCOMPRINT LOADPATCHESCOMS)
(RPAQQ LOADPATCHESCOMS ((* File created by LANNING)
(FNS LoadPatches)))
(* File created by LANNING)
(DEFINEQ
(LoadPatches
[LAMBDA (directory ldflg afterDate) (* smL "29-May-85 14:17")
(* * Load all DCOM files from the directory)
(DECLARE (GLOBALVARS COMPILE.EXT))
(LET [(afterIDate (if afterDate
then (OR (IDATE afterDate)
0)
else 0))
(files (NCONC (for file in (FILDIR (CONCAT directory "*." COMPILE.EXT))
collect (FILENAMEFIELD file (QUOTE NAME)))
(for file in (FILDIR (CONCAT directory "*.")) collect (FILENAMEFIELD
file
(QUOTE NAME]
(* Remove duplications)
(SETQ files (INTERSECTION files files)) (* Use the DCOM file if there is one)
[SETQ files (for file in files collect (OR (INFILEP (CONCAT directory file "." COMPILE.EXT))
(INFILEP (CONCAT directory file]
(* We could have picked up files that existed in a
subdirectory -- but they got turned into NIL in the
INFILEP)
(SETQ files (DREMOVE NIL files)) (* Now sort the files by date)
[SETQ files (for file in files collect (CONS file (GETFILEINFO file (QUOTE ICREATIONDATE]
[SETQ files (SORT files (FUNCTION (LAMBDA (X Y)
(LESSP (CDR X)
(CDR Y] (* Finally, load the files made after the given date)
(for file in files when (GREATERP (CDR file)
afterIDate)
do (SELECTQ ldflg
(HIDDEN (* Load the file, but don't put it on FILELST)
(LOAD? (CAR file)
T)
(SETQ FILELST (DREMOVE (FILENAMEFIELD (CAR file)
(QUOTE NAME))
FILELST)))
(LOAD? (CAR file)
ldflg)))
files])
)
(PUTPROPS LOADPATCHES COPYRIGHT ("Xerox Corporation" 1985))
(DECLARE: DONTCOPY
(FILEMAP (NIL (434 2529 (LoadPatches 444 . 2527)))))
STOP