(FILECREATED "19-Feb-86 12:37:45" {QV}<NOTECARDS>1.2K>NOTECARDS.;7 14235  

      changes to:  (VARS NOTECARDSCOMS)

      previous date: "16-Dec-85 11:44:16" {QV}<NOTECARDS>1.2K>NOTECARDS.;6)


(* Copyright (c) 1985, 1986 by Xerox Corporation. All rights reserved.)

(PRETTYCOMPRINT NOTECARDSCOMS)

(RPAQQ NOTECARDSCOMS ((E (SETQ NC.SystemDate (DATE))
			   (PUTPROP (QUOTE NC.SystemDate)
				    (QUOTE NewestFile)
				    (ROOTFILENAME (FULLNAME (OUTPUT)))))
	(* * This Release)
	(GLOBALVARS NC.ReleaseIdentifier)
	(VARS (NC.ReleaseIdentifier "1.2k")
	      (CAR/CDRERR NIL))
	(* * Set up the NoteCards directories globalvars)
	(GLOBALVARS NOTECARDSMAPDIRECTORIES NOTECARDSDIRECTORIES)
	(FNS NC.SetUpNOTECARDSDIRECTORIES NC.SetUpNOTECARDSMAPDIRECTORIES)
	(INITVARS (NOTECARDSDIRECTORIES (NCONC (NC.SetUpNOTECARDSDIRECTORIES NIL "1.2k")
					       (NC.SetUpNOTECARDSDIRECTORIES NIL "Release1.2i")))
		  (NOTECARDSMAPDIRECTORIES (NC.SetUpNOTECARDSMAPDIRECTORIES)))
	(* * Load the supporting files for Notecards)
	(FILES (SYSLOAD FROM VALUEOF LISPUSERSDIRECTORIES)
	       SKETCH GRAPHER TEDIT STYLESHEET (FROM VALUEOF NOTECARDSMAPDIRECTORIES SYSLOAD)
	       NEWMAP)
	(FILES (SYSLOAD FROM VALUEOF NOTECARDSDIRECTORIES)
	       GRAPHHARDCOPIER)
	(* * Load the NoteCards files)
	(GLOBALVARS NC.Files)
	(VARS (NC.Files (QUOTE (NOTECARDS NCPARAMETERS NCINTERFACE NCDATABASE NCREPAIR NCCARDS 
					  NCTYPESMECH NCLINKS NCUTILITIES NCANNO NCGESTURES NCLOGO 
					  NCPROGINT NCTEXTSUBSTANCE NCGRAPHSUBSTANCE 
					  NCSKETCHSUBSTANCE NCTEXTCARD NCSKETCHCARD NCGRAPHCARD 
					  NCFILEBOXCARD NCBROWSERCARD NCSEARCHCARD NCDOCUMENTCARD 
					  NCLINKINDEXCARD))))
	(FILES (SYSLOAD FROM VALUEOF NOTECARDSDIRECTORIES)
	       NCPARAMETERS NCINTERFACE NCDATABASE NCREPAIR NCCARDS NCTYPESMECH NCLINKS NCUTILITIES 
	       NCANNO NCPROGINT NCGESTURES NCLOGO NCTEXTSUBSTANCE NCGRAPHSUBSTANCE NCSKETCHSUBSTANCE 
	       NCTEXTCARD NCSKETCHCARD NCGRAPHCARD NCFILEBOXCARD NCBROWSERCARD NCSEARCHCARD 
	       NCDOCUMENTCARD NCLINKINDEXCARD)
	(FILES (SYSLOAD FROM VALUEOF NOTECARDSDIRECTORIES)
	       POSTRELEASEPATCHES KOTOPOSTRELEASEPATCHES)
	(* * Load the library packages requested by the user's NOTECARDSLIBRARYFILES parameters)
	(GLOBALVARS NOTECARDSLIBRARYFILES)
	(INITVARS (NOTECARDSLIBRARYFILES (QUOTE (NCIDEASKETCH NCKEYS NCHACKS))))
	(P (FOR File in NOTECARDSLIBRARYFILES DO (COND ((OR (FINDFILE (PACK* File (QUOTE .dcom))
								      T NOTECARDSDIRECTORIES)
							    (FINDFILE File T NOTECARDSDIRECTORIES))
							(APPLY* (QUOTE FILESLOAD)
								(QUOTE (SYSLOAD FROM VALUEOF 
									     NOTECARDSDIRECTORIES))
								File))
						       (T (PRINT 
							   "NoteCards: Can't find library file: "
								 File ".")))))
	(* * Initialization functions)
	(GLOBALVARS NC.DeletedLinkImageObject NC.DeletedLinkImageFns NC.InvisibleLinkImageObject 
		    NC.InvisibleLinkImageFns NC.LinkIconImageFns NC.NoDeleteImageFns NC.SystemDate 
		    UseMapWithPoliticalBoundaries TEDIT.INPUT.FORMATS WindowMenuCommands 
		    NC.WindowRightButtonMenu NCINITIALGLOBALPARAMS)
	(FNS NC.Setup)
	(* * Set up Lafite Bug Report Forms)
	(FNS NC.MakeLafiteForm)
	(ADDVARS (LAFITESPECIALFORMS ("NoteCards Report" (FUNCTION NC.MakeLafiteForm)
							 
					       "Report bug or request new feature for NoteCards.")))
	(P (SETQ LAFITEFORMSMENU NIL))
	(* * INITIALIZE NoteCards)
	(P (NC.Setup))
	(ADDVARS (BackgroundMenuCommands (NoteCards (NC.MakeMainMenu)
						    "Brings up the NoteCards main menu.")))
	(INITVARS NCINITIALGLOBALPARAMS)
	(P (SETQ BackgroundMenu)
	   (NCP.NoteCardsParameters NCINITIALGLOBALPARAMS))
	(FNS NC.SetSystemDate)
	(P (NC.SetSystemDate))))
(* * This Release)

(DECLARE: DOEVAL@COMPILE DONTCOPY

(GLOBALVARS NC.ReleaseIdentifier)
)

(RPAQ NC.ReleaseIdentifier "1.2k")

(RPAQQ CAR/CDRERR NIL)
(* * Set up the NoteCards directories globalvars)

(DECLARE: DOEVAL@COMPILE DONTCOPY

(GLOBALVARS NOTECARDSMAPDIRECTORIES NOTECARDSDIRECTORIES)
)
(DEFINEQ

(NC.SetUpNOTECARDSDIRECTORIES
  (LAMBDA (BaseDirectory ReleaseIdentifier)                  (* kirk: "12-Nov-85 21:06")

          (* * Set up the NoteCards directories globalvars)


    (LET (ThisDirectory NoteCardsBaseDirectory StrPtr)

          (* * Get the directory for the file now being loaded)


         (COND
	   ((SETQ NoteCardsBaseDirectory BaseDirectory))
	   (T (SETQ ThisDirectory (PACK* (QUOTE {)
					     (FILENAMEFIELD (FULLNAME (INPUT))
							      (QUOTE HOST))
					     (QUOTE })
					     (QUOTE <)
					     (FILENAMEFIELD (FULLNAME (INPUT))
							      (QUOTE DIRECTORY))
					     (QUOTE >)))

          (* * Find the directory path up to the first subdirectory called NoteCards)


	      (COND
		((SETQ StrPtr (STRPOS "NOTECARDS>" (U-CASE ThisDirectory)
					  NIL NIL NIL T))
		  (SETQ NoteCardsBaseDirectory (SUBATOM ThisDirectory 1 (SUB1 StrPtr)))))))

          (* * Create the directory search list based on the NoteCardsBaseDirectory)


         (COND
	   (NoteCardsBaseDirectory (LIST (PACK* NoteCardsBaseDirectory (OR ReleaseIdentifier 
									     NC.ReleaseIdentifier)
						    ">")
					   (PACK* NoteCardsBaseDirectory (OR ReleaseIdentifier 
									     NC.ReleaseIdentifier)
						    ">" "LIBRARY>")
					   NoteCardsBaseDirectory
					   (PACK* NoteCardsBaseDirectory "LIBRARY>")))
	   (T (LIST ThisDirectory))))))

(NC.SetUpNOTECARDSMAPDIRECTORIES
  (LAMBDA (BaseDirectory)                                    (* fgh: " 8-Oct-85 13:46")

          (* * Set up the NoteCards directories maps globalvars)


    (LET (ThisDirectory StrPtr NoteCardsBaseDirectory)

          (* * Get the directory for the file now being loaded)


         (COND
	   ((SETQ NoteCardsBaseDirectory BaseDirectory))
	   (T (SETQ ThisDirectory (PACK* (QUOTE {)
					     (FILENAMEFIELD (FULLNAME (INPUT))
							      (QUOTE HOST))
					     (QUOTE })
					     (QUOTE <)
					     (FILENAMEFIELD (FULLNAME (INPUT))
							      (QUOTE DIRECTORY))
					     (QUOTE >)))

          (* * Find the directory path up to the first subdirectory called NoteCards)


	      (COND
		((SETQ StrPtr (STRPOS "NOTECARDS>" (U-CASE ThisDirectory)
					  NIL NIL NIL T))
		  (SETQ NoteCardsBaseDirectory (SUBATOM ThisDirectory 1 (SUB1 StrPtr)))))))

          (* * Create the directory search list based on the NoteCardsBaseDirectory)


         (COND
	   (NoteCardsBaseDirectory (LIST (PACK* NoteCardsBaseDirectory "MAPS>NEW>")
					   (PACK* NoteCardsBaseDirectory "MAPS>")
					   NoteCardsBaseDirectory))
	   (T (LIST ThisDirectory))))))
)

(RPAQ? NOTECARDSDIRECTORIES (NCONC (NC.SetUpNOTECARDSDIRECTORIES NIL "1.2k")
				     (NC.SetUpNOTECARDSDIRECTORIES NIL "Release1.2i")))

(RPAQ? NOTECARDSMAPDIRECTORIES (NC.SetUpNOTECARDSMAPDIRECTORIES))
(* * Load the supporting files for Notecards)

(FILESLOAD (SYSLOAD FROM VALUEOF LISPUSERSDIRECTORIES)
	   SKETCH GRAPHER TEDIT STYLESHEET (FROM VALUEOF NOTECARDSMAPDIRECTORIES SYSLOAD)
	   NEWMAP)
(FILESLOAD (SYSLOAD FROM VALUEOF NOTECARDSDIRECTORIES)
	   GRAPHHARDCOPIER)
(* * Load the NoteCards files)

(DECLARE: DOEVAL@COMPILE DONTCOPY

(GLOBALVARS NC.Files)
)

(RPAQQ NC.Files (NOTECARDS NCPARAMETERS NCINTERFACE NCDATABASE NCREPAIR NCCARDS NCTYPESMECH NCLINKS 
			     NCUTILITIES NCANNO NCGESTURES NCLOGO NCPROGINT NCTEXTSUBSTANCE 
			     NCGRAPHSUBSTANCE NCSKETCHSUBSTANCE NCTEXTCARD NCSKETCHCARD NCGRAPHCARD 
			     NCFILEBOXCARD NCBROWSERCARD NCSEARCHCARD NCDOCUMENTCARD NCLINKINDEXCARD))
(FILESLOAD (SYSLOAD FROM VALUEOF NOTECARDSDIRECTORIES)
	   NCPARAMETERS NCINTERFACE NCDATABASE NCREPAIR NCCARDS NCTYPESMECH NCLINKS NCUTILITIES 
	   NCANNO NCPROGINT NCGESTURES NCLOGO NCTEXTSUBSTANCE NCGRAPHSUBSTANCE NCSKETCHSUBSTANCE 
	   NCTEXTCARD NCSKETCHCARD NCGRAPHCARD NCFILEBOXCARD NCBROWSERCARD NCSEARCHCARD 
	   NCDOCUMENTCARD NCLINKINDEXCARD)
(FILESLOAD (SYSLOAD FROM VALUEOF NOTECARDSDIRECTORIES)
	   POSTRELEASEPATCHES KOTOPOSTRELEASEPATCHES)
(* * Load the library packages requested by the user's NOTECARDSLIBRARYFILES parameters)

(DECLARE: DOEVAL@COMPILE DONTCOPY

(GLOBALVARS NOTECARDSLIBRARYFILES)
)

(RPAQ? NOTECARDSLIBRARYFILES (QUOTE (NCIDEASKETCH NCKEYS NCHACKS)))
(FOR File in NOTECARDSLIBRARYFILES DO (COND ((OR (FINDFILE (PACK* File (QUOTE .dcom))
							   T NOTECARDSDIRECTORIES)
						 (FINDFILE File T NOTECARDSDIRECTORIES))
					     (APPLY* (QUOTE FILESLOAD)
						     (QUOTE (SYSLOAD FROM VALUEOF 
								     NOTECARDSDIRECTORIES))
						     File))
					    (T (PRINT "NoteCards: Can't find library file: " File ".")
					       )))
(* * Initialization functions)

(DECLARE: DOEVAL@COMPILE DONTCOPY

(GLOBALVARS NC.DeletedLinkImageObject NC.DeletedLinkImageFns NC.InvisibleLinkImageObject 
	    NC.InvisibleLinkImageFns NC.LinkIconImageFns NC.NoDeleteImageFns NC.SystemDate 
	    UseMapWithPoliticalBoundaries TEDIT.INPUT.FORMATS WindowMenuCommands 
	    NC.WindowRightButtonMenu NCINITIALGLOBALPARAMS)
)
(DEFINEQ

(NC.Setup
  (LAMBDA (DatabaseFileName)                                 (* fgh: "16-Dec-85 11:43")

          (* * rht 11/17/84: Added definition of NC.InvisibleLinkImageObj.)


    (SETQ NC.WindowRightButtonMenu (create MENU
					       ITEMS ←(for Item in WindowMenuCommands
							 when (NOT (FMEMB (CAR Item)
										(QUOTE
										  (Snap Paint Clear)))
								       )
							 collect Item)
					       MENUCOLUMNS ← 1
					       CENTERFLG ← T
					       MENUFONT ←(QUOTE (HELVETICA 10))))
    (UNADVISE DOWINDOWCOM)
    (ADVISE (QUOTE DOWINDOWCOM)
	      (QUOTE AROUND)
	      (QUOTE (AND (OR (NEQ WINDOW NC.MainMenuWindow)
				    (NOT NC.FixedMenuFlg))
			      (COND
				((AND NC.ShortWindowMenuFlg (NC.IDP (NC.IDFromWindow WINDOW)))
				  (RESETLST (RESETSAVE WindowMenu NC.WindowRightButtonMenu)*))
				(T *)))))
    (SETQ UseMapWithPoliticalBoundaries T)
    (SETQ TEDIT.INPUT.FORMATS NIL)
    (DSPFONT (FONTCREATE (QUOTE HELVETICA)
			     12)
	       PROMPTWINDOW)
    (LINELENGTH 500 PROMPTWINDOW)
    (NC.MakeMainMenu)
    (SETQ NC.LinkIconImageFns (IMAGEFNSCREATE (FUNCTION NC.LinkIconDisplayFn)
						  (FUNCTION NC.LinkIconImageBoxFn)
						  (FUNCTION NC.LinkIconPutFn)
						  (FUNCTION NC.LinkIconGetFn)
						  (FUNCTION NC.LinkIconCopyFn)
						  (FUNCTION NC.LinkIconButtonEventInFn)
						  (FUNCTION NILL)
						  (FUNCTION NC.LinkIconWhenMovedFn)
						  (FUNCTION NC.LinkIconWhenInsertedFn)
						  (FUNCTION NC.LinkIconWhenDeletedFn)
						  (FUNCTION NC.LinkIconWhenCopiedFn)
						  (FUNCTION NILL)
						  (FUNCTION NILL)))
    (SETQ NC.NoDeleteImageFns (PROG ((ImageObj (NC.MakeLinkIcon NIL)))
				        (replace (IMAGEOBJ IMAGEOBJFNS) of ImageObj
					   with (create IMAGEFNS using (fetch (IMAGEOBJ
											IMAGEOBJFNS)
										of ImageObj)))
				        (IMAGEOBJPROP ImageObj (QUOTE WHENDELETEDFN)
							(FUNCTION NILL))
				        (RETURN (fetch (IMAGEOBJ IMAGEOBJFNS) of ImageObj))))
    (COND
      ((GETD (QUOTE INITIALIZEINTERCALC))
	(INITIALIZEINTERCALC)))
    (SETQ NC.DeletedLinkImageFns (IMAGEFNSCREATE (FUNCTION NC.DeletedLinkDisplayFn)
						     (FUNCTION NC.DeletedLinkImageBoxFn)
						     (FUNCTION NC.DeletedLinkPutFn)
						     (FUNCTION NC.DeletedLinkGetFn)
						     (FUNCTION NILL)
						     (FUNCTION NILL)
						     (FUNCTION NILL)
						     (FUNCTION NILL)
						     (FUNCTION NILL)
						     (FUNCTION NILL)
						     (FUNCTION NILL)
						     (FUNCTION NILL)
						     (FUNCTION NILL)))
    (SETQ NC.DeletedLinkImageObject (IMAGEOBJCREATE "DeletedLink" NC.DeletedLinkImageFns))
    (SETQ NC.InvisibleLinkImageFns (IMAGEFNSCREATE (FUNCTION NILL)
						       (FUNCTION NC.InvisibleLinkImageBoxFn)
						       (FUNCTION NC.InvisibleLinkPutFn)
						       (FUNCTION NC.InvisibleLinkGetFn)
						       (FUNCTION NILL)
						       (FUNCTION NILL)
						       (FUNCTION NILL)
						       (FUNCTION NILL)
						       (FUNCTION NILL)
						       (FUNCTION NILL)
						       (FUNCTION NILL)
						       (FUNCTION NILL)
						       (FUNCTION NILL)))
    (SETQ NC.InvisibleLinkImageObject (IMAGEOBJCREATE "InvisibleLink" NC.InvisibleLinkImageFns))))
)
(* * Set up Lafite Bug Report Forms)

(DEFINEQ

(NC.MakeLafiteForm
  (LAMBDA NIL                                                (* kirk: " 4-Dec-85 12:13")
    (MAKEXXXSUPPORTFORM NC.ReleaseIdentifier "NoteCardsSupport.pa" NC.SystemDate)))
)

(ADDTOVAR LAFITESPECIALFORMS ("NoteCards Report" (FUNCTION NC.MakeLafiteForm)
						   "Report bug or request new feature for NoteCards.")
)
(SETQ LAFITEFORMSMENU NIL)
(* * INITIALIZE NoteCards)

(NC.Setup)

(ADDTOVAR BackgroundMenuCommands (NoteCards (NC.MakeMainMenu)
					      "Brings up the NoteCards main menu."))

(RPAQ? NCINITIALGLOBALPARAMS NIL)
(SETQ BackgroundMenu)
(NCP.NoteCardsParameters NCINITIALGLOBALPARAMS)
(DEFINEQ

(NC.SetSystemDate
  (LAMBDA NIL                                                (* fgh: "23-Aug-85 13:29")

          (* * Set the NC.SystemDate from the stored file dates)


    (LET (ThisFileDate)
      (SETQ NC.SystemDate "23-Aug-70 13:28:52")
      (for File in (CONS (QUOTE NOTECARDS)
			 NC.Files)
	 do (SETQ ThisFileDate (CAAR (GETPROP File (QUOTE FILEDATES))))
	    (COND
	      ((GREATERP (IDATE ThisFileDate)
			 (IDATE NC.SystemDate))
		(SETQ NC.SystemDate ThisFileDate)
		(PUTPROP (QUOTE NC.SystemDate)
			 (QUOTE NewestFile)
			 File)))))))
)
(NC.SetSystemDate)
(PUTPROPS NOTECARDS COPYRIGHT ("Xerox Corporation" 1985 1986))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (3976 6830 (NC.SetUpNOTECARDSDIRECTORIES 3986 . 5506) (NC.SetUpNOTECARDSMAPDIRECTORIES 
5508 . 6828)) (9213 12780 (NC.Setup 9223 . 12778)) (12824 13039 (NC.MakeLafiteForm 12834 . 13037)) (
13483 14131 (NC.SetSystemDate 13493 . 14129)))))
STOP