(FILECREATED "18-JAN-83 20:25:28" {PHYLUM}<LISPCORE>DEMO>LOADDEMO.;14 13886  

      changes to:  (VARS DEMOFILES AFTERDEMOFORMS)

      previous date: "20-NOV-82 10:59:01" {PHYLUM}<LISPCORE>DEMO>LOADDEMO.;13)


(PRETTYCOMPRINT LOADDEMOCOMS)

(RPAQQ LOADDEMOCOMS ((FNS CHECKFILE DOSYSOUT FILETOUPDATE LOADDEMO UPDATEDEMOFILES UPDATEFONTFILES 
			  UPDATELISPFILES UPDATEMICROFILES UPDATERUNFILES)
		     (FNS FLASHLOGO)
		     (RECORDS FILEREC)
		     (VARS AFTERDEMOFORMS ALTSOURCEDIRS BEFOREDEMOFORMS DEMOFILES FONTDIR FONTFILES 
			   LOADDEMOFILES MICRODIR MICROFILES NCCFILES RUNDIR RUNFILES SOURCEDIR)))
(DEFINEQ

(CHECKFILE
  [LAMBDA (FILEREC SOURCE?)                                  (* edited: "30-JUL-82 19:01")

          (* If the creation date of the file on SOURCEDIR isn't the same as the one on the source directory, then return 
	  the file name of the one on the source directory to copy from. If the file isn't found, return T.
	  Otherwise, the file doesn't need updating so return NIL.)


    (PROG ([NAME (PACKFILENAME (QUOTE NAME)
			       (fetch (FILEREC NAME) of FILEREC)
			       (QUOTE EXTENSION)
			       (COND
				 (SOURCE? NIL)
				 (T COMPILE.EXT]
	   NAME2 NAME3)
          (COND
	    ((EQ SOURCEDIR (fetch (FILEREC DIR) of FILEREC))
	      (RETURN NIL)))
          (COND
	    ((NULL (SETQ NAME3 (FILETOUPDATE FILEREC NAME SOURCE?)))
	      (RETURN T)))
          (COND
	    ([OR [NOT (INFILEP (SETQ NAME2 (PACKFILENAME (QUOTE DIRECTORY)
							 SOURCEDIR
							 (QUOTE BODY)
							 NAME]
		 (ILESSP (GETFILEINFO NAME2 (QUOTE ICREATIONDATE))
			 (GETFILEINFO NAME3 (QUOTE ICREATIONDATE]
	      (RETURN NAME3])

(DOSYSOUT
  [LAMBDA (FILE)                                             (* edited: " 7-AUG-82 17:02")
    (CLEARW \TopLevelTtyWindow)
    [RESETVARS (SYSOUTGAG)
	       (SYSOUT (OR FILE (QUOTE {DSK}DEMO.SYSOUT]
    (CNDIR (QUOTE {DSK}))
    (OPENFILE (QUOTE {DSK}LATTICER)
	      (QUOTE INPUT))
    (PRIN1 "Welcome to the Interlisp-D Demo" T)
    (TERPRI T)
    T])

(FILETOUPDATE
  [LAMBDA (FILEREC NAME SOURCE?)                             (* edited: "30-JUL-82 19:01")

          (* Finds the file to update. It should be just NAME. If that file doesn't exist and SOURCE? is T, then go try to 
	  find it on ALTSOURCEDIRS.)


    (COND
      [(INFILEP (PACKFILENAME (QUOTE BODY)
			      NAME
			      (QUOTE DIRECTORY)
			      (fetch (FILEREC DIR) of FILEREC]
      (SOURCE? (bind REALNAME for DIR in ALTSOURCEDIRS thereis (SETQ REALNAME
								 (INFILEP (PACKFILENAME (QUOTE 
											DIRECTORY)
											DIR
											(QUOTE BODY)
											NAME)))
		  finally (RETURN REALNAME])

(LOADDEMO
  [LAMBDA (.SYSLOADFLG. .PRINTFORMSFLG. .FILES. .BEFORE.LOAD.EVALS. .AFTER.LOAD.EVALS.)
                                                             (* edited: "20-NOV-82 10:58")
    (for .E. in (OR .BEFORE.LOAD.EVALS. BEFOREDEMOFORMS)
       do (COND
	    (.PRINTFORMSFLG. (PRINT .E.)))
	  (ERSETQ (EVAL .E.)))
    (/CNDIR SOURCEDIR)
    [bind X Y for FILE in (OR .FILES. DEMOFILES)
       do (printout NIL "Loading: " (fetch (FILEREC NAME) of FILE)
		    (COND
		      ((EQ (fetch (FILEREC EXTRA) of FILE)
			   (QUOTE SOURCE))
			" (source) ")
		      (T ""))
		    T)
	  (COND
	    ((OR (fetch (FILEREC DIR) of FILE)
		 (EQ (fetch (FILEREC EXTRA) of FILE)
		     (QUOTE SOURCE)))
	      (APPLY* (QUOTE FILESLOAD)
		      [NCONC [COND
			       (.SYSLOADFLG. (CONS (QUOTE SYSLOAD]
			     [COND
			       ((EQ (fetch (FILEREC EXTRA) of FILE)
				    (QUOTE SOURCE))
				 (CONS (QUOTE SOURCE]
			     (COND
			       ((fetch (FILEREC DIR) of FILE)
				 (LIST (QUOTE FROM)
				       (fetch (FILEREC DIR) of FILE]
		      (fetch (FILEREC NAME) of FILE)))
	    (T (APPLY* (QUOTE FILESLOAD)
		       (fetch (FILEREC NAME) of FILE]
    (for .E. in (OR .AFTER.LOAD.EVALS. AFTERDEMOFORMS)
       do (COND
	    (.PRINTFORMSFLG. (PRINT .E.)))
	  (ERSETQ (EVAL .E.])

(UPDATEDEMOFILES
  [LAMBDA NIL                                                (* lmm " 4-AUG-82 17:53")
    (UPDATELISPFILES)
    (UPDATEFONTFILES)
    (UPDATEMICROFILES)
    (UPDATERUNFILES])

(UPDATEFONTFILES
  [LAMBDA (FILES ASK)                                        (* lmm " 4-AUG-82 17:57")
    (OR FILES (SETQ FILES FONTFILES))
    (PROG ((SOURCEDIR FONTDIR))
          (RESETFORM (CNDIR FONTDIR)
		     (UPDATELISPFILES FILES NIL ASK])

(UPDATELISPFILES
  [LAMBDA (FILES NOTSOURCES ASK)                             (* lmm " 4-AUG-82 14:27")
    (OR FILES (SETQ FILES DEMOFILES))
    (bind CURRENTFILE for FILE in FILES
       do                                                    (* If there are no EXTRA goodies, such as SOURCE, then 
							     assume both source and COMPILE.EXT files should be 
							     checked.)
	  [COND
	    ((AND (NEQ (fetch (FILEREC EXTRA) of FILE)
		       (QUOTE SOURCE))
		  (SETQ CURRENTFILE (CHECKFILE FILE)))
	      (COND
		((NULL CURRENTFILE)                          (* Doesn't need updating.)
		  )
		((NEQ CURRENTFILE T)                         (* assuming CURRENTFILE is a filename.)
		  (printout NIL "Updating " (fetch (FILEREC NAME) of FILE)
			    "." COMPILE.EXT " from " (fetch (FILEREC DIR) of FILE))
		  [COND
		    ((OR (NULL ASK)
			 (EQ (ASKUSER NIL NIL "? " NIL T)
			     (QUOTE Y)))
		      (COPYFILE CURRENTFILE (PACKFILENAME (QUOTE DIRECTORY)
							  SOURCEDIR
							  (QUOTE NAME)
							  (fetch (FILEREC NAME) of FILE)
							  (QUOTE EXTENSION)
							  COMPILE.EXT]
		  (printout NIL "." T))
		(T (printout NIL "Can NOT find " (fetch (FILEREC NAME) of FILE)
			     "." COMPILE.EXT " to update." T]
	  (COND
	    ((AND (NOT NOTSOURCES)
		  (SETQ CURRENTFILE (CHECKFILE FILE T)))
	      (COND
		((NULL CURRENTFILE)                          (* doesn't need updating)
		  )
		((NEQ CURRENTFILE T)                         (* assume CURRENTFILE is a file name.
							     It needs updating.)
		  (printout NIL "Updating " (fetch (FILEREC NAME) of FILE)
			    " from "
			    (PACKFILENAME (QUOTE NAME)
					  NIL
					  (QUOTE EXTENSION)
					  NIL
					  (QUOTE VERSION)
					  NIL
					  (QUOTE BODY)
					  CURRENTFILE))
		  [COND
		    ((OR (NULL ASK)
			 (EQ (ASKUSER NIL NIL "? " NIL T)
			     (QUOTE Y)))
		      (COPYFILE CURRENTFILE (PACKFILENAME (QUOTE DIRECTORY)
							  SOURCEDIR
							  (QUOTE NAME)
							  (fetch (FILEREC NAME) of FILE]
		  (printout NIL "." T))
		(T (printout NIL "Can NOT find " (fetch (FILEREC NAME) of FILE)
			     " to update." T])

(UPDATEMICROFILES
  [LAMBDA (FILES ASK)                                        (* lmm " 4-AUG-82 17:56")
    (OR FILES (SETQ FILES MICROFILES))
    (PROG ((SOURCEDIR MICRODIR))
          (RESETFORM (CNDIR MICRODIR)
		     (UPDATELISPFILES FILES NIL ASK])

(UPDATERUNFILES
  [LAMBDA (FILES ASK)                                        (* lmm " 4-AUG-82 17:56")
    (OR FILES (SETQ FILES RUNFILES))
    (PROG ((SOURCEDIR RUNDIR))
          (RESETFORM (CNDIR RUNDIR)
		     (UPDATELISPFILES FILES NIL ASK])
)
(DEFINEQ

(FLASHLOGO
  [LAMBDA NIL                                                (* edited: "31-JUL-82 00:45")
    (RESETFORM (SCREENCOLORMAP (COLORMAPCREATE))
	       (COLORBACKGROUND (QUOTE BLACK))
	       (COLORLOGO (create POSITION
				  XCOORD ← 260
				  YCOORD ← 260))
	       (until (READP T T)
		  do (ROTATECOLORMAP (SCREENCOLORMAP)
				     1 7)
		     (DISMISS 100])
)
[DECLARE: EVAL@COMPILE 

(RECORD FILEREC (DIR NAME EXTRA))
]

(RPAQQ AFTERDEMOFORMS ((RPAQ TRD36 (FONTCREATE (QUOTE TIMESROMAND)
					       36))
		       (RPAQ TRD24 (FONTCREATE (QUOTE TIMESROMAND)
					       24))
		       (RPAQ HEL18 (FONTCREATE (QUOTE HELVETICA)
					       18))
		       (RPAQ PARSE (PARSE MY UNCLE'S STORY ABOUT THE WAR WILL BORE YOU TO TEARS))
		       (ADDSPELL (QUOTE PARSE)
				 SPELLINGS3)
		       (SETQ MSPRINTFLG NIL)
		       (SETQ CLISPIFTRANFLG T)
		       (SETQ DWIMWAIT 100)
		       (SETQ CLOSEBREAKWINDOWFLG (QUOTE ALL))
		       (RPAQ JOBM (READPRESS (QUOTE JO.PRESS)))
		       (RPAQ NETWORKBM (READPRESS (QUOTE NETWORKIMAGE.PRESS)))
		       (RPAQ MAPBM (READPRESS (QUOTE DIPLOMACYMAP.PRESS)))
		       (RPAQ MAPWINDOW (CREATEW (QUOTE (200 20 612 612))
						"Diplomacy Map" 3 T))
		       (BITBLT MAPBM 0 215 MAPWINDOW 0 0 608 608)
		       (CLOSEW MAPWINDOW)
		       (COPYFILE (QUOTE {PHYLUM}<LISPUSERS>AIS>4BITCOLORHAT.AIS)
				 (QUOTE {CORE}4BITCOLORHAT.AIS))
		       (COPYFILE (QUOTE {PHYLUM}<LISPUSERS>AIS>4BITHAT.AIS)
				 (QUOTE {CORE}4BITHAT.AIS))
		       (MASTERSCOPE (QUOTE (ANALYZE ANY ON LATTICER)))
		       (EDITP LATTICER (RC {PHYLUM}<LISPUSERS> {DSK}))
		       (SETQQ FILELST (LATTICER LOADDEMO))
		       (INTERRUPTCHAR 16 (QUOTE (PROCESSWORLD T))
				      T)
		       (INTERRUPTCHAR 19 (QUOTE (PROCESSWORLD (QUOTE OFF)))
				      T)
		       (* (PAGE/EDITOR)
			  removed to make it look cleaner and to make it load more automatically)
		       (NEWFONT (QUOTE STANDARD))
		       (NEWFONT (QUOTE BIG))
		       (CNDIR (QUOTE {DSK}))))

(RPAQQ ALTSOURCEDIRS ({PHYLUM}<LISPCORE>SOURCES>))

(RPAQQ BEFOREDEMOFORMS NIL)

(RPAQQ DEMOFILES (({PHYLUM}<LISPUSERS> LLCOLOR)
		  ({PHYLUM}<LISPUSERS> COLOR)
		  ({PHYLUM}<LISPUSERS> HLCOLOR)
		  ({PHYLUM}<LISPUSERS> COLORDEMO)
		  ({PHYLUM}<LISPUSERS> COLORPOLYGONS)
		  ({PHYLUM}<LISPUSERS> READAIS)
		  ({PHYLUM}<LISPCORE>COLOR> IMAGEDEMO)
		  ({PHYLUM}<LISPUSERS> BANNER)
		  ({PHYLUM}<LISPCORE>DEMO> SLIDES SOURCE)
		  ({PHYLUM}<LISPUSERS> BIG)
		  ({PHYLUM}<LISPUSERS> PROC)
		  ({PHYLUM}<LISPUSERS> UTILPROC)
		  ({PHYLUM}<LISPUSERS> CROCK)
		  ({PHYLUM}<LISPUSERS> BITMAPFNS)
		  ({PHYLUM}<LISPCORE>DEMO> RAIN)
		  ({PHYLUM}<LISPUSERS> PEANO)
		  ({PHYLUM}<LISPUSERS> HANOI)
		  ({PHYLUM}<LISPUSERS> POLYGONS)
		  ({PHYLUM}<LISPUSERS> WINK)
		  ({PHYLUM}<LISPUSERS> KINETIC)
		  ({PHYLUM}<LISPCORE>DEMO> JOANNE)
		  ({PHYLUM}<LISPUSERS> BLTDEMO)
		  ({PHYLUM}<LISPCORE>DEMO> DEMOS)
		  ({PHYLUM}<LISPUSERS> TTYIN)
		  ({PHYLUM}<LISPUSERS> DEDIT)
		  ({PHYLUM}<LISPUSERS> TEDIT)
		  ({PHYLUM}<SYBALSKY> ANNO)
		  ({PHYLUM}<LISPUSERS> GRAPHER)
		  ({PHYLUM}<LISPUSERS> BROWSER)
		  ({PHYLUM}<LISPUSERS> LATTICER)
		  ({PHYLUM}<LISPUSERS> TREEDISPLAY)
		  ({PHYLUM}<LISPUSERS> EVALSERVER)
		  ({PHYLUM}<LISPCORE>DEMO> CHANGEBACKGROUND)
		  ({PHYLUM}<LISPCORE>DEMO> SPLINEWINDOW)
		  ({PHYLUM}<LISPCORE>DEMO> PAGE)
		  ({PHYLUM}<LISPUSERS> CHAT)
		  ({PHYLUM}<SHEIL> SOLITAIRE)))

(RPAQQ FONTDIR {PHYLUM}<AAAI>FONTS>)

(RPAQQ FONTFILES (({PHYLUM}<FONTS> FONTS.WIDTHS SOURCE)
		  ({PHYLUM}<AltoFonts> GACHA10.strike SOURCE)
		  ({PHYLUM}<AltoFonts> GACHA12.STRIKE SOURCE)
		  ({PHYLUM}<AltoFonts> GACHA8.strike SOURCE)
		  ({INDIGO}<AltoFonts>Original> Helvetica10.strike SOURCE)
		  ({PHYLUM}<AltoFonts> HELVETICA10.strike SOURCE)
		  ({INDIGO}<AltoFonts>Original> Helvetica10b.strike SOURCE)
		  ({INDIGO}<AltoFonts>Original> Helvetica12.strike SOURCE)
		  ({PHYLUM}<AltoFonts> Helvetica12.strike SOURCE)
		  ({INDIGO}<AltoFonts>Original> Helvetica12b.strike SOURCE)
		  ({INDIGO}<AltoFonts>Original> Helvetica12i.strike SOURCE)
		  ({INDIGO}<AltoFonts>Original> Helvetica18.strike SOURCE)
		  ({PHYLUM}<AltoFonts> HELVETICA18.STRIKE SOURCE)
		  ({INDIGO}<AltoFonts>Original> Helvetica8.strike SOURCE)
		  ({PHYLUM}<AltoFonts> HELVETICA8.strike SOURCE)
		  ({INDIGO}<AltoFonts>Original> Helvetica8b.strike SOURCE)
		  ({PHYLUM}<AltoFonts> TIMESROMAND144.STRIKE SOURCE)
		  ({INDIGO}<AltoFonts> TimesRomanD24.strike SOURCE)
		  ({INDIGO}<AltoFonts> TimesRomanD30.strike SOURCE)
		  ({PHYLUM}<AltoFonts> TIMESROMAND36.STRIKE SOURCE)
		  ({PHYLUM}<AltoFonts> TIMESROMAND72.STRIKE SOURCE)
		  ({PHYLUM}<AltoFonts> TIMESROMAND96.STRIKE SOURCE)
		  ({PHYLUM}<AltoFonts> TONto14.Strike SOURCE)))

(RPAQQ LOADDEMOFILES (({PHYLUM}<AAAI>XEROX> LOADDEMO)
		      ({PHYLUM}<AAAI>XEROX> DEMOVARS SOURCE)))

(RPAQQ MICRODIR {PHYLUM}<AAAI>MICROCODE>)

(RPAQQ MICROFILES (({PHYLUM}<LISPCORE>WIND> ALTOD0MC.EB SOURCE)
		   ({PHYLUM}<LISPCORE>WIND> DOLPHINLISPMC.EB SOURCE)
		   ({PHYLUM}<LISPCORE>WIND> DORADOINITIALLISP.EB SOURCE)
		   ({PHYLUM}<LISPCORE>WIND> DORADOLISP.EB SOURCE)
		   ({PHYLUM}<LISPCORE>WIND> XMBDOLPHINLISPMC.EB SOURCE)
		   ({PHYLUM}<LISPCORE>WIND> XYDOLPHINLISPMC.EB SOURCE)
		   ({PHYLUM}<LISPCORE>WIND> DORADOLISP.MB SOURCE)))

(RPAQQ NCCFILES (COM.CM. DEMO.SYSOUT. DOLPHINLISPMC.RUN. FONTMEM.B. FONTS.WIDTHS. GACHA18.STRIKE. 
			 HELVETICA10.AL. HELVETICA11.STRIKE. HELVETICA13.STRIKE. HELVETICA14.STRIKE. 
			 HELVETICA16.STRIKE. HELVETICA5.STRIKE. HELVETICA9.STRIKE. 
			 HELVETICAD24.STRIKE. HIPPO10.STRIKE. HIPPO12.STRIKE. INIT.LISP. INIT.SHEIL. 
			 LISP.RUN. LISP.SYMS. LOGO12.STRIKE. LOGO18.STRIKE. LOGO24.STRIKE. 
			 MATH10.STRIKE. MATH12.STRIKE. NCC.SYSOUT. OLDFONTDIR.B. PATCH. REM.CM. 
			 SYS.BOOT. SYSFONT.AL. TIMESROMAN10.STRIKE. TIMESROMAN11.STRIKE. 
			 TIMESROMAN12.STRIKE. TIMESROMAN13.STRIKE. TIMESROMAN14.STRIKE. 
			 TIMESROMAN16.STRIKE. TIMESROMAN18.STRIKE. TIMESROMAN8.STRIKE. 
			 TIMESROMAN9.STRIKE. USER.CM.))

(RPAQQ RUNDIR {PHYLUM}<AAAI>ALTO>)

(RPAQQ RUNFILES (({PHYLUM}<ALTO> CHAT.RUN SOURCE)
		 ({PHYLUM}<ALTO> COPYDISK.RUN SOURCE)
		 ({PHYLUM}<ALTO> CREATEFILE.RUN SOURCE)
		 ({PHYLUM}<ALTO> EXECUTIVE.RUN SOURCE)
		 ({PHYLUM}<ALTO> FTP.RUN SOURCE)
		 ({PHYLUM}<ALTO> INSTALLSWAT.RUN SOURCE)
		 ({INDIGO}<DORADO> LOADMB.RUN SOURCE)
		 ({PHYLUM}<ALTO> SCAVENGER.RUN SOURCE)
		 ({PHYLUM}<ALTO> TYPE.RUN SOURCE)))

(RPAQQ SOURCEDIR {PHYLUM}<LISPCORE>DEMO>)
(DECLARE: DONTCOPY
  (FILEMAP (NIL (618 7398 (CHECKFILE 628 . 1694) (DOSYSOUT 1696 . 2068) (FILETOUPDATE 2070 . 2740) (
LOADDEMO 2742 . 4135) (UPDATEDEMOFILES 4137 . 4353) (UPDATEFONTFILES 4355 . 4617) (UPDATELISPFILES 
4619 . 6868) (UPDATEMICROFILES 6870 . 7136) (UPDATERUNFILES 7138 . 7396)) (7399 7800 (FLASHLOGO 7409
 . 7798)))))
STOP