(FILECREATED "16-Dec-85 11:24:50" {QV}<NOTECARDS>RELEASE1.2I>NOTECARDS.;29 13729  

      changes to:  (VARS NOTECARDSCOMS)

      previous date: " 7-Nov-85 10:45:03" {QV}<NOTECARDS>RELEASE1.2I>NOTECARDS.;28)


(* Copyright (c) 1985 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.2i"))
	(* * Set up the NoteCards directories globalvars)
	(GLOBALVARS NOTECARDSMAPDIRECTORIES NOTECARDSDIRECTORIES)
	(FNS NC.SetUpNOTECARDSDIRECTORIES NC.SetUpNOTECARDSMAPDIRECTORIES)
	(INITVARS (NOTECARDSDIRECTORIES (NC.SetUpNOTECARDSDIRECTORIES))
		  (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)
	       INTERMEZZOTEDITFIXES INTERMEZZOSYSTEMPATCHES GRAPHERPATCH 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)
	(* * 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 
										SYSLOAD))
								File))
						       (T (PRINT (CONCAT 
							   "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.2i")
(* * Set up the NoteCards directories globalvars)

(DECLARE: DOEVAL@COMPILE DONTCOPY

(GLOBALVARS NOTECARDSMAPDIRECTORIES NOTECARDSDIRECTORIES)
)
(DEFINEQ

(NC.SetUpNOTECARDSDIRECTORIES
  (LAMBDA NIL                                                (* rht: "23-Sep-85 12:14")

          (* * Set up the NoteCards directories globalvars)


    (LET (ThisDirectory NoteCardsBaseDirectory StrPtr)

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


      (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 "RELEASE" NC.ReleaseIdentifier 
					     ">")
				      (PACK* NoteCardsBaseDirectory "RELEASE" NC.ReleaseIdentifier 
					     ">"
					     "LIBRARY>")
				      NoteCardsBaseDirectory
				      (PACK* NoteCardsBaseDirectory "LIBRARY>")))
	(T (LIST ThisDirectory))))))

(NC.SetUpNOTECARDSMAPDIRECTORIES
  (LAMBDA NIL                                                (* rht: "23-Sep-85 12:15")

          (* * Set up the NoteCards directories maps globalvars)


    (LET (ThisDirectory StrPtr NoteCardsBaseDirectory)

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


      (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 (NC.SetUpNOTECARDSDIRECTORIES))

(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)
	   INTERMEZZOTEDITFIXES INTERMEZZOSYSTEMPATCHES GRAPHERPATCH 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)
(* * 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 SYSLOAD))
						     File))
					    (T (PRINT (CONCAT "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)                                 (* rht: "20-Aug-85 15:35")

          (* * 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))
    (NC.AdjustCloseF)))
)
(* * Set up Lafite Bug Report Forms)

(DEFINEQ

(NC.MakeLafiteForm
  (LAMBDA NIL                                                (* rht: "30-May-85 15:47")
    (MAKEXXXSUPPORTFORM "NoteCards 1.2i" "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))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (3918 6471 (NC.SetUpNOTECARDSDIRECTORIES 3928 . 5268) (NC.SetUpNOTECARDSMAPDIRECTORIES 
5270 . 6469)) (8830 12284 (NC.Setup 8840 . 12282)) (12328 12538 (NC.MakeLafiteForm 12338 . 12536)) (
12982 13630 (NC.SetSystemDate 12992 . 13628)))))
STOP