(FILECREATED "24-Jan-86 17:45:34" {QV}<PEDERSEN>LISP>MANAGER.;2 57764  

      changes to:  (FNS Manager.COMS.BEF MANAGER MANAGER.RESET Manager.ADDADV Manager.ADDTOFILES? 
			Manager.ALTERMARKING Manager.CHANGED? Manager.CHECKFILE Manager.COLLECTCOMS 
			Manager.COMPILE Manager.COMS.BGF Manager.COMS.WSF Manager.COMSCLOSE 
			Manager.COMSOPEN Manager.COMSSHRINK Manager.COMSUPDATE 
			Manager.CORNER.POSITION Manager.FILECHANGES Manager.FILESUBTYPES 
			Manager.GETFILE Manager.INIT Manager.INTITLE? Manager.MAIN.BEF 
			Manager.MAIN.BGF Manager.MAIN.WHF Manager.MAIN.WSF Manager.MAINCLOSE 
			Manager.MAINMENUITEMS Manager.MAINOPEN Manager.MAINUPDATE 
			Manager.MAKEFILE.ADV Manager.MENUCOLUMNS Manager.NEWMENU Manager.PROMPT 
			Manager.RENAME Manager.REPAINTFN Manager.RESETSUBITEMS Manager.SHOWCHANGED 
			Manager.SORTBYCOLUMN Manager.TTYCOMMAND Manager.VALUE/ERROR ManagerCommand)
		   (VARS MANAGER.BM MANAGER.BM.MASK)
		   (ADVICE DOSELECTEDITEM ADDFILE ADDTOFILES? MAKEFILE MARKASCHANGED UNMARKASCHANGED 
			   ADDTOCOMS DELFROMCOMS \ADDTOFILEBLOCK/ADDNEWCOM LOAD)

      previous date: "24-Jan-86 14:51:25" {QV}<PEDERSEN>LISP>MANAGER.;1)


(PRETTYCOMPRINT MANAGERCOMS)

(RPAQQ MANAGERCOMS [(* * The Manager : a graphical interface to the FilePkg. Written By: Jay 
			 Ferguson of Ford Aerospace & Communications Corp and Robert Noble of 
			 Intellicorp)
	(* * Variables and Constants)
	(VARS MANAGER.BM MANAGER.BM.MASK MANAGERADVICE)
	[INITVARS Manager.ACTIVEFLG (Manager.SORTFILELSTFLG T)
		  (Manager.MENUROWS 20)
		  (Manager.MENUFONT (FONTCREATE (QUOTE HELVETICA)
						10
						(QUOTE (MEDIUM REGULAR REGULAR))
						0
						(QUOTE DISPLAY)))
		  [Manager.DATASPACE (BQUOTE (, [COPY (QUOTE (MENUS (MAIN]
						,
						(CONS (QUOTE MENUFONT)
						      Manager.MENUFONT)
						,
						(CONS (QUOTE MENUBOLDFONT)
						      (FONTCOPY Manager.MENUFONT (QUOTE (WEIGHT
											  BOLD]
		  (Manager.DIRECTION (QUOTE DOWN))
		  (Manager.TITLEFONT (QUOTE (GACHA 12]
	(GLOBALVARS Manager.ACTIVEFLG Manager.DATASPACE Manager.MENUFONT BackgroundMenuCommands 
		    BackgroundMenu FILEPKGTYPES PROMPTWINDOW \TopLevelTtyWindow 
		    WindowTitleDisplayStream MANAGERADVICE Manager.DIRECTION Manager.MENUROWS 
		    MANAGER.BM MANAGER.BM.MASK Manager.SORTFILELSTFLG Manager.TITLEFONT SCREENHEIGHT 
		    FILELST MACROPROPS LCFIL LAPFLG STRF SVFLG LSTFIL)
	(* * Advice for interfacing with the FilePkg.)
	(ADVISE DOSELECTEDITEM)
	(ADVISE * (PROGN MANAGERADVICE))
	(* * Functions and Macros)
	(FNS * MANAGERFNS)
	(MACROS GETDATUM PUTDATUM Manager.GETMENU)
	(* * Misc)
	(P (Manager.INIT))
	(DECLARE: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDVARS (NLAMA)
									      (NLAML 
									       Manager.TTYCOMMAND)
									      (LAMA])
(* * The Manager : a graphical interface to the FilePkg. Written By: Jay Ferguson of Ford 
Aerospace & Communications Corp and Robert Noble of Intellicorp)

(* * Variables and Constants)


(RPAQ MANAGER.BM (READBITMAP))
(72 40
"@@@@@@@@@@@@AOOL@@@@"
"@@@@@@@@AO@@ABBD@@@@"
"@@@@@@@@AO@@AFKD@@@@"
"@@@@@@@@CEH@ALAL@@@@"
"@@@@@@@@GKL@AADD@@@@"
"@@@@@@@@BDH@A@@D@@@@"
"@@@@@@@@AA@@AOOL@@@@"
"@@@@@@@@@N@@@@@@@@@@"
"@@@@@@@@CC@@@@@@@@@@"
"@@@@@@@@D@H@@@@@@@@@"
"@@@@@@@@D@H@@@@@@@@@"
"@@@@@@@@D@D@@@@@@@@@"
"@@@@@@@@EBD@@@@@@@@@"
"@@@@@@@@IBB@@@@@@@@@"
"@@@@B@@@JCB@@@@@@@@@"
"@@@@EOOABAA@@@@@@@@@"
"@@@@GHGICKI@@@@@@@@@"
"@AOOIOKJAL@H@AOO@@@@"
"@B@@E@OIANA@@B@@L@@@"
"@D@@IOOHOON@@D@@D@@@"
"OOOOOOOOOOOOOOOOOO@@"
"OOOOOOOOOOOOOOOOOO@@"
"OOOOOOOOOOOOOOOOOO@@"
"A@@@@@@@@@@@@@@@@D@@"
"A@@@@@@@@@@@@@@@@D@@"
"A@@@@@@@@@@@@@@@@D@@"
"A@GALBALFA@GLOMO@D@@"
"A@GALGANFCHLFLAIHD@@"
"A@GKLGANFCHL@LAIHD@@"
"A@GKLMIKFFLLNOIIHD@@"
"A@FNLMIKFFLLFLAO@D@@"
"A@FNLOIINGLLFLAIHD@@"
"A@FNMHMINLFLNLAIHD@@"
"A@FDMHMHNLFGFOMIHD@@"
"A@@@@@@@@@@@@@@@@D@@"
"A@@@@@@@@@@@@@@@@D@@"
"A@@@@@@@@@@@@@@@@D@@"
"A@@@@@@@@@@@@@@@@D@@"
"A@@@@@@@@@@@@@@@@D@@"
"AOOOOOOOOOOOOOOOOL@@")

(RPAQ MANAGER.BM.MASK (READBITMAP))
(72 40
"@@@@@@@@@@@@AOOL@@@@"
"@@@@@@@@AO@@AOOL@@@@"
"@@@@@@@@AO@@AOOL@@@@"
"@@@@@@@@COH@AOOL@@@@"
"@@@@@@@@GOL@AOOL@@@@"
"@@@@@@@@COH@AOOL@@@@"
"@@@@@@@@AO@@AOOL@@@@"
"@@@@@@@@@N@@@@@@@@@@"
"@@@@@@@@CO@@@@@@@@@@"
"@@@@@@@@GOH@@@@@@@@@"
"@@@@@@@@GOH@@@@@@@@@"
"@@@@@@@@GOL@@@@@@@@@"
"@@@@@@@@GOL@@@@@@@@@"
"@@@@@@@@OON@@@@@@@@@"
"@@@@B@@@OON@@@@@@@@@"
"@@@@GOOAOOO@@@@@@@@@"
"@@@@GOOIOOO@@@@@@@@@"
"@AOOIOOKOOOH@AOO@@@@"
"@COOMOOIOOO@@COOL@@@"
"@GOOOOOHOON@@GOOL@@@"
"OOOOOOOOOOOOOOOOOO@@"
"OOOOOOOOOOOOOOOOOO@@"
"OOOOOOOOOOOOOOOOOO@@"
"AOOOOOOOOOOOOOOOOL@@"
"AOOOOOOOOOOOOOOOOL@@"
"AOOOOOOOOOOOOOOOOL@@"
"AOOOOOOOOOOOOOOOOL@@"
"AOOOOOOOOOOOOOOOOL@@"
"AOOOOOOOOOOOOOOOOL@@"
"AOOOOOOOOOOOOOOOOL@@"
"AOOOOOOOOOOOOOOOOL@@"
"AOOOOOOOOOOOOOOOOL@@"
"AOOOOOOOOOOOOOOOOL@@"
"AOOOOOOOOOOOOOOOOL@@"
"AOOOOOOOOOOOOOOOOL@@"
"AOOOOOOOOOOOOOOOOL@@"
"AOOOOOOOOOOOOOOOOL@@"
"AOOOOOOOOOOOOOOOOL@@"
"AOOOOOOOOOOOOOOOOL@@"
"AOOOOOOOOOOOOOOOOL@@")

(RPAQQ MANAGERADVICE (ADDFILE ADDTOFILES? MAKEFILE MARKASCHANGED UNMARKASCHANGED ADDTOCOMS 
				DELFROMCOMS \ADDTOFILEBLOCK/ADDNEWCOM LOAD))

(RPAQ? Manager.ACTIVEFLG NIL)

(RPAQ? Manager.SORTFILELSTFLG T)

(RPAQ? Manager.MENUROWS 20)

(RPAQ? Manager.MENUFONT (FONTCREATE (QUOTE HELVETICA)
				      10
				      (QUOTE (MEDIUM REGULAR REGULAR))
				      0
				      (QUOTE DISPLAY)))

(RPAQ? Manager.DATASPACE [BQUOTE (, [COPY (QUOTE (MENUS (MAIN]
				      ,
				      (CONS (QUOTE MENUFONT)
					    Manager.MENUFONT)
				      ,
				      (CONS (QUOTE MENUBOLDFONT)
					    (FONTCOPY Manager.MENUFONT (QUOTE (WEIGHT BOLD])

(RPAQ? Manager.DIRECTION (QUOTE DOWN))

(RPAQ? Manager.TITLEFONT (QUOTE (GACHA 12)))
(DECLARE: DOEVAL@COMPILE DONTCOPY

(GLOBALVARS Manager.ACTIVEFLG Manager.DATASPACE Manager.MENUFONT BackgroundMenuCommands 
	    BackgroundMenu FILEPKGTYPES PROMPTWINDOW \TopLevelTtyWindow WindowTitleDisplayStream 
	    MANAGERADVICE Manager.DIRECTION Manager.MENUROWS MANAGER.BM MANAGER.BM.MASK 
	    Manager.SORTFILELSTFLG Manager.TITLEFONT SCREENHEIGHT FILELST MACROPROPS LCFIL LAPFLG 
	    STRF SVFLG LSTFIL)
)
(* * Advice for interfacing with the FilePkg.)


(PUTPROPS DOSELECTEDITEM READVICE [NIL (AROUND NIL
						 (COND
						   ([AND (NEQ BUTTON (QUOTE RIGHT))
							 (OR (KEYDOWNP (QUOTE LSHIFT))
							     (KEYDOWNP (QUOTE RSHIFT]
						    (SELECTQ
						      BUTTON
						      [LEFT (BKSYSBUF (COND ((LISTP ITEM)
									     (CAR ITEM))
									    (ITEM]
						      [MIDDLE (BKSYSBUF (COND ((LISTP ITEM)
									       (CAR ITEM))
									      (ITEM)))
							      (BKSYSBUF (CONSTANT
									  (CHARACTER (CHARCODE CR]
						      *))
						   (T *])
(READVISE DOSELECTEDITEM)

(PUTPROPS ADDFILE READVICE [NIL (AFTER NIL (COND (Manager.ACTIVEFLG (MANAGER)
								      (Manager.CHECKFILE FILE])

(PUTPROPS ADDTOFILES? READVICE [NIL (AROUND NIL (COND (Manager.ACTIVEFLG
							  (RESETLST [RESETSAVE
								      (PUTDATUM (QUOTE ADDTOFILES?)
										T)
								      (FUNCTION (PROGN (
Manager.ADDTOFILES?]
								    *))
							(T *])

(PUTPROPS MAKEFILE READVICE [NIL (AROUND NIL (COND (Manager.ACTIVEFLG (PROG1 * (
									     Manager.MAKEFILE.ADV
										 FILE)))
						     (T *])

(PUTPROPS MARKASCHANGED READVICE [NIL (AFTER NIL (AND Manager.ACTIVEFLG (Manager.ALTERMARKING
							  NAME TYPE T])

(PUTPROPS UNMARKASCHANGED READVICE [NIL (AFTER NIL (AND Manager.ACTIVEFLG !VALUE (
							    Manager.ALTERMARKING NAME TYPE])

(PUTPROPS ADDTOCOMS READVICE [NIL (AFTER NIL (AND Manager.ACTIVEFLG (Manager.ADDADV !VALUE COMS 
										      NAME TYPE])

(PUTPROPS DELFROMCOMS READVICE [NIL (AFTER NIL (AND Manager.ACTIVEFLG (Manager.ADDADV !VALUE COMS 
											NAME TYPE])

(PUTPROPS \ADDTOFILEBLOCK/ADDNEWCOM READVICE [NIL (AFTER NIL (AND Manager.ACTIVEFLG
								    (Manager.RESETSUBITEMS FILE TYPE])

(PUTPROPS LOAD READVICE [NIL (AROUND NIL (PROGN (RESETVAR Manager.ACTIVEFLG NIL *)
						  (AND Manager.ACTIVEFLG (MANAGER])
(READVISE ADDFILE ADDTOFILES? MAKEFILE MARKASCHANGED UNMARKASCHANGED ADDTOCOMS DELFROMCOMS 
	  \ADDTOFILEBLOCK/ADDNEWCOM LOAD)
(* * Functions and Macros)


(RPAQQ MANAGERFNS (MANAGER MANAGER.RESET Manager.ADDADV Manager.ADDTOFILES? Manager.ALTERMARKING 
			     Manager.CHANGED? Manager.CHECKFILE Manager.COLLECTCOMS Manager.COMPILE 
			     Manager.COMS.BEF Manager.COMS.BGF Manager.COMS.WSF Manager.COMSCLOSE 
			     Manager.COMSOPEN Manager.COMSSHRINK Manager.COMSUPDATE 
			     Manager.CORNER.POSITION Manager.FILECHANGES Manager.FILESUBTYPES 
			     Manager.GETFILE Manager.INIT Manager.INTITLE? Manager.MAIN.BEF 
			     Manager.MAIN.BGF Manager.MAIN.WHF Manager.MAIN.WSF Manager.MAINCLOSE 
			     Manager.MAINMENUITEMS Manager.MAINOPEN Manager.MAINUPDATE 
			     Manager.MAKEFILE.ADV Manager.MENUCOLUMNS Manager.NEWMENU Manager.PROMPT 
			     Manager.RENAME Manager.REPAINTFN Manager.RESETSUBITEMS 
			     Manager.SHOWCHANGED Manager.SORTBYCOLUMN Manager.TTYCOMMAND 
			     Manager.VALUE/ERROR ManagerCommand))
(DEFINEQ

(MANAGER
  [LAMBDA (POSITION)                                       (* edited: " 3-Jan-86 08:50")
    (PROG (WINDOW OLDMENU)
	    (SETQ OLDMENU (Manager.GETMENU (QUOTE MAIN)))
	    (if (SETQ WINDOW (GETDATUM (QUOTE MAINWINDOW)))
		then (if (NOT (OPENWP WINDOW))
			   then [if (OPENWP (WINDOWPROP WINDOW (QUOTE ICONWINDOW)))
				      then (EXPANDW (WINDOWPROP WINDOW (QUOTE ICONWINDOW]
			 else (TOTOPW WINDOW)))
	    (if (EQLENGTH FILELST 0)
		then 

          (* * Closing the system down)


		       (Manager.MAINCLOSE T)
	      elseif [OR (NULL Manager.ACTIVEFLG)
			     [NOT (IEQP (LENGTH FILELST)
					    (LENGTH (fetch (MENU ITEMS) of OLDMENU]
			     (NOT (for FN1 in FILELST as FN2 in (fetch (MENU ITEMS)
									     of OLDMENU)
				       always (EQ FN1 (CAR FN2]
		then 

          (* * User must have added or deleted a file)


		       (if Manager.ACTIVEFLG
			   then (Manager.MAINCLOSE)
			 else (UPDATEFILES))
		       (Manager.MAINOPEN (OR (POSITIONP POSITION)
						 WINDOW))
	      else (Manager.MAINUPDATE])

(MANAGER.RESET
  [LAMBDA NIL                                                (* j.ferguson "13-Dec-85 09:55")
    (Manager.MAINCLOSE T)
    (APPLY (FUNCTION UNADVISE)
	     MANAGERADVICE)
    (APPLY (FUNCTION READVISE)
	     MANAGERADVICE)
    (for ADVICE in MANAGERADVICE do (UNMARKASCHANGED ADVICE (QUOTE ADVICE)))
    [SETQ Manager.DATASPACE (BQUOTE (, [COPY (QUOTE (MENUS (MAIN]
					   ,
					   (CONS (QUOTE MENUFONT)
						   Manager.MENUFONT)
					   ,
					   (CONS (QUOTE MENUBOLDFONT)
						   (FONTCOPY Manager.MENUFONT (QUOTE
								 (WEIGHT BOLD]
    (for MENU in (QUOTE (MAIN.BACKGROUND FNS VARS RECORDS PROPS MAIN.MIDDLE COMS.MIDDLE 
					       COMS.RIGHT NEW.TYPE))
       do (Manager.NEWMENU MENU))
    (MANAGER])

(Manager.ADDADV
  [LAMBDA (!VALUE FILECOMS NAME COMSTYPE)                    (* j.ferguson "18-Sep-85 11:58")
    (PROG (FILE SUBITEMS ITEMS)
	    (if (OR (NULL !VALUE)
			(LISTP FILECOMS))
		then (RETURN)
	      else (if [SETQ FILE (for F in FILELST thereis (EQ FILECOMS (FILECOMS
										F]
			 then (for WINDOW in (GETDATUM (QUOTE OPEN.WINDOWS))
				   bind STUFF CASES (ADDTOFILES? ←(GETDATUM (QUOTE ADDTOFILES?))
								     )
				   first [AND ADDTOFILES? (SETQ CASES (GETDATUM (QUOTE CASES]
				   when (AND (OPENWP WINDOW)
						 (EQ [CDR (SETQ STUFF
								(GETDATUM (CAR (WINDOWPROP
										   WINDOW
										   (QUOTE MENU]
						       COMSTYPE)
						 (EQ (CAR STUFF)
						       FILE))
				   do (COND
					  (ADDTOFILES? (pushnew CASES STUFF))
					  (T (Manager.COMSOPEN FILE COMSTYPE)))
				   finally (AND ADDTOFILES? (PUTDATUM (QUOTE CASES)
									  CASES)))
				(Manager.RESETSUBITEMS FILE COMSTYPE)
				(Manager.MAINUPDATE (GETDATUM (QUOTE MAINWINDOW])

(Manager.ADDTOFILES?
  [LAMBDA NIL                                                (* ren "11-Feb-85 23:03")
    (PUTDATUM (QUOTE ADDTOFILES?))
    (MANAGER)
    (for CASE in (GETDATUM (QUOTE CASES)) do (Manager.COMSOPEN (CAR CASE)
									 (CDR CASE)))
    (PUTDATUM (QUOTE CASES])

(Manager.ALTERMARKING
  [LAMBDA (ITEM TYPE MARKING?)                               (* j.ferguson " 1-Oct-85 08:21")
    (COND
      ((EQ ITEM (QUOTE FILELST))
	(UNMARKASCHANGED (QUOTE FILELST)
			   (QUOTE VARS))
	(MANAGER))
      ((EQ TYPE (QUOTE FILES))
	(MANAGER))
      (T (if (NULL (STKPOS (QUOTE UPDATEFILES)))
	     then (UPDATEFILES))
	 [for WINDOW in (GETDATUM (QUOTE OPEN.WINDOWS)) bind MENU
	    when (AND (OPENWP WINDOW)
			  [SETQ MENU (CAR (WINDOWPROP WINDOW (QUOTE MENU]
			  [OR (NULL TYPE)
				(EQ TYPE (CDR (GETDATUM MENU]
			  (MEMBER (COND
				      ((LISTP ITEM)
					(SETQ ITEM (CAR ITEM)))
				      (T ITEM))
				    (fetch ITEMS of MENU)))
	    do (Manager.SHOWCHANGED WINDOW MENU ITEM MARKING?)
		 (COND
		   ((EQ (CDR (GETDATUM MENU))
			  (QUOTE FILEVARS))
		     (Manager.CHECKFILE (CAR (GETDATUM MENU]
	 (Manager.MAINUPDATE])

(Manager.CHANGED?
  [LAMBDA (FILES)                                            (* jcf " 8-Mar-85 10:23")
    (bind CHANGES for FILE in (OR FILES FILELST) first (TERPRI)
       when [SETQ CHANGES (CDR (GETPROP FILE (QUOTE FILE]
       do (printout T .FONT LAMBDAFONT FILE .FONT DEFAULTFONT T)
	    (for CHANGE in CHANGES do (printout T (CAR CHANGE)
						      ":" 10 .PARA 10 0 (CDR CHANGE)
						      T))
	    (printout T "------" T])

(Manager.CHECKFILE
  [LAMBDA (FILE)                                           (* j.ferguson "30-Sep-85 11:29")
    [if (NULL (GETDATUM (QUOTE ADDTOFILES?)))
	then (SETQ FILE (ROOTFILENAME FILE))
	       (for WINDOW in (GETDATUM (QUOTE OPEN.WINDOWS)) bind MENU
		  when [AND (OPENWP WINDOW)
				(EQ [CAR (GETDATUM (SETQ MENU (CAR (WINDOWPROP
									     WINDOW
									     (QUOTE MENU]
				      FILE)
				(NOT (EQUAL (Manager.COLLECTCOMS FILE (CDR (GETDATUM MENU)))
						(fetch (MENU ITEMS) of MENU]
		  do (Manager.COMSOPEN FILE (CDR (GETDATUM MENU]
    (Manager.RESETSUBITEMS FILE])

(Manager.COLLECTCOMS
  [LAMBDA (FILE TYPE)                                      (* j.ferguson "26-Sep-85 16:31")
    (PROG (COMSLST)
	    (SETQ COMSLST (FILECOMSLST FILE TYPE))
	    (RETURN (Manager.SORTBYCOLUMN (COND
						((NULL COMSLST)
						  (RETURN))
						((EQ TYPE (QUOTE PROPS))
						  (for PROP in COMSLST
						     when (AND (NOT (FMEMB (CAR PROP)
										   $$VAL))
								   (NOT (FMEMB (CADR PROP)
										   MACROPROPS)))
						     collect (CAR PROP)))
						((EQ TYPE (QUOTE VARS))
						  (for VAR in COMSLST
						     bind (FILEVARS ←(FILECOMSLST FILE
										      (QUOTE 
											 FILEVARS)))
						     when (NOT (FMEMB VAR FILEVARS))
						     collect VAR))
						((INTERSECTION [SETQ COMSLST
								   (for ITEM in COMSLST
								      collect (COND
										  ((ATOM ITEM)
										    ITEM)
										  ((CAR ITEM]
								 COMSLST])

(Manager.COMPILE
  [LAMBDA (FILE.OR.FN FILEFLG)                               (* j.ferguson "31-Oct-85 17:55")
    (SETQ LCFIL NIL)
    (SETQ LAPFLG NIL)
    (SETQ STRF T)
    (SETQ SVFLG T)
    (SETQ LSTFIL NIL)
    (if FILEFLG
	then (for FN in (FILEFNSLST FILE.OR.FN) when (NOT (CCODEP FN))
		  do (COMPILE1 FN (GETDEF FN (QUOTE FNS))
				   T))
      else (COMPILE1 FILE.OR.FN (GETDEF FILE.OR.FN (QUOTE FNS))
			 T])

(Manager.COMS.BEF
  [LAMBDA (WINDOW)                                           (* jop: "24-Jan-86 17:44")
    (if (Manager.INTITLE? WINDOW)
	then (SELECTQ LASTMOUSEBUTTONS
			  (1                                 (* MIDDLE BUTTON)
			     (Manager.COMSSHRINK WINDOW))
			  (2                                 (* RIGHT BUTTON)
			     (Manager.COMSCLOSE WINDOW))
			  (4                                 (* LEFT BUTTON)
			     (MOVEW WINDOW))
			  NIL)
      else (if (IEQP LASTMOUSEBUTTONS 2)
		 then (Manager.COMS.BGF WINDOW)
	       else (MENUBUTTONFN WINDOW])

(Manager.COMS.BGF
  [LAMBDA (WINDOW)                                           (* j.ferguson "13-Dec-85 09:52")
    (SELECTQ (MENU (Manager.GETMENU (QUOTE COMS.RIGHT)))
	       (CLOSE (Manager.COMSCLOSE WINDOW))
	       (MOVE (MOVEW WINDOW))
	       (SHRINK (Manager.COMSSHRINK WINDOW))
	       (BURY (BURYW WINDOW))
	       (REDISPLAY (Manager.COMSUPDATE WINDOW))
	       NIL])

(Manager.COMS.WSF
  [LAMBDA (ITEM MENU KEY)                                    (* j.ferguson "13-Dec-85 20:22")
    (PROG (NEWMENU ANSWER FILE COMSTYPE COMSLST FILECOMS COMMAND)
	    (DECLARE (SPECVARS ITEM COMSTYPE))
	    (if (NULL ITEM)
		then (RETURN))
	    (SETQ COMSLST (GETDATUM MENU))
	    (SETQ FILE (CAR COMSLST))
	    (SETQ COMSTYPE (CDR COMSLST))
	    (SELECTQ KEY
		       [LEFT (COND
			       ((SETQ NEWMENU (Manager.GETMENU COMSTYPE))
				 (MENU NEWMENU))
			       ((SELECTQ (MENU (Manager.GETMENU (QUOTE NEW.TYPE)))
					   (EDIT (Manager.VALUE/ERROR (BQUOTE
									    (EDITDEF ,
										       (KWOTE
											 ITEM)
										       ,
										       (KWOTE
											 COMSTYPE)))
									  "Can't Edit!!!"))
					   [PP (Manager.TTYCOMMAND (BQUOTE (GETDEF
										   ,
										   (KWOTE ITEM)
										   ,
										   (KWOTE COMSTYPE]
					   NIL]
		       ((MIDDLE RIGHT)
			 (SPAWN.MOUSE)
			 [SETQ COMMAND (MENU (Manager.GETMENU (QUOTE COMS.MIDDLE]
			 (SELECTQ COMMAND
				    (RENAME (Manager.RENAME ITEM COMSTYPE FILE (WFROMMENU
								  MENU)))
				    (RENAME-ALL (Manager.RENAME ITEM COMSTYPE NIL (WFROMMENU
								    MENU)))
				    (DELETE (if (MOUSECONFIRM (CONCAT "DELETE the " COMSTYPE 
									    " "
									    ITEM " from " FILE "?"))
						then (DELFROMFILES ITEM COMSTYPE FILE)))
				    [MOVE (COND
					    ((SETQ ANSWER (Manager.GETFILE COMMAND))
					      (ADDTOFILE ITEM COMSTYPE ANSWER)
					      (DELFROMFILES ITEM COMSTYPE FILE)
					      (MARKASCHANGED ITEM COMSTYPE (QUOTE CHANGED]
				    [COPY (COND
					      ((SETQ ANSWER (Manager.GETFILE COMMAND))
						(ADDTOFILE ITEM COMSTYPE ANSWER)
						(MARKASCHANGED ITEM COMSTYPE (QUOTE CHANGED]
				    ((CHANGED DELETED DEFINED CLISP)
				      (if (EQ COMSTYPE (QUOTE PROPS))
					  then (for PROP in (PROPNAMES ITEM)
						    do (MARKASCHANGED (LIST ITEM PROP)
									  (QUOTE PROPS)
									  (QUOTE CHANGED)))
					else (MARKASCHANGED ITEM COMSTYPE COMMAND)))
				    (UNMARK (if (EQ COMSTYPE (QUOTE PROPS))
						then (for PROP in (PROPNAMES ITEM)
							  do (UNMARKASCHANGED (LIST ITEM PROP)
										  (QUOTE PROPS)))
					      else (UNMARKASCHANGED ITEM COMSTYPE)))
				    NIL))
		       NIL])

(Manager.COMSCLOSE
  [LAMBDA (WINDOW)                                           (* j.ferguson "18-Sep-85 12:49")
    (PROG [(MENU (CAR (WINDOWPROP WINDOW (QUOTE MENU]
	    (WINDOWPROP WINDOW (QUOTE CLOSEFN)
			  NIL)
	    [if (NULL (OPENWP WINDOW))
		then (EXPANDW (WINDOWPROP WINDOW (QUOTE ICONWINDOW]
	    (DELETEMENU MENU T WINDOW)
	    (DREMOVE (FASSOC MENU Manager.DATASPACE)
		       Manager.DATASPACE)
	    (DREMOVE (FASSOC (WINDOWPROP WINDOW (QUOTE COMSTYPE))
				 Manager.DATASPACE)
		       Manager.DATASPACE)
	    (PUTDATUM (QUOTE OPEN.WINDOWS)
		      (DREMOVE WINDOW (GETDATUM (QUOTE OPEN.WINDOWS])

(Manager.COMSOPEN
  [LAMBDA (FILE TYPE FLASHFLG)                             (* j.ferguson "13-Dec-85 15:55")
    (PROG ((COMSLST (Manager.COLLECTCOMS FILE TYPE))
	     (COMSTYPE (FILECOMS FILE TYPE))
	     COMS.MENU COMS.WINDOW POSITION)
	    (COND
	      (COMSLST (if [AND (GETDATUM COMSTYPE)
				    (EQUAL COMSLST (fetch (MENU ITEMS) of (GETDATUM COMSTYPE]
			   then (Manager.COMSUPDATE (OR (WFROMMENU (GETDATUM COMSTYPE))
							      (for W in (GETDATUM (QUOTE 
										     OPEN.WINDOWS))
								 thereis
								  (EQ (WINDOWPROP W (QUOTE
											COMSTYPE))
									COMSTYPE)))
							FLASHFLG)
				  (RETURN))
		       [SETQ COMS.MENU (create MENU
						   ITEMS ← COMSLST
						   MENUCOLUMNS ←(Manager.MENUCOLUMNS COMSLST)
						   MENUTITLEFONT ← Manager.TITLEFONT
						   TITLE ←(CONCAT (NAMEFIELD FILE)
								    "'s "
								    (L-CASE TYPE T))
						   WHENSELECTEDFN ←(FUNCTION Manager.COMS.WSF)
						   WHENHELDFN ←(FUNCTION [LAMBDA (ITEM MENU KEY)
						       (SELECTQ KEY
								  (LEFT (PROMPTPRINT
									  "Menu of "
									  (CDR (GETDATUM MENU))
									  " operations for " ITEM))
								  (MIDDLE (PROMPTPRINT 
							     "Menu of file package commands for "
											 ITEM))
								  NIL])
						   MENUFONT ←(GETDATUM (QUOTE MENUFONT]
		       (COND
			 ((SETQ COMS.WINDOW (WFROMMENU (GETDATUM COMSTYPE)))
			   (SETQ POSITION (Manager.CORNER.POSITION COMS.WINDOW COMS.MENU))
			   (Manager.COMSCLOSE COMS.WINDOW)))
		       [SETQ COMS.WINDOW (ADDMENU COMS.MENU NIL (OR POSITION
									  (with MENU COMS.MENU
										  (GETBOXPOSITION
										    IMAGEWIDTH 
										    IMAGEHEIGHT]
		       (for ITEM in (Manager.FILECHANGES FILE TYPE)
			  do (Manager.SHOWCHANGED COMS.WINDOW COMS.MENU ITEM T))
		       (PUTDATUM COMSTYPE COMS.MENU)
		       (PUTDATUM COMS.MENU (CONS FILE TYPE))
		       [PUTDATUM (QUOTE OPEN.WINDOWS)
				 (CONS COMS.WINDOW (GETDATUM (QUOTE OPEN.WINDOWS]
		       (WINDOWPROP COMS.WINDOW (QUOTE RIGHTBUTTONFN)
				     (FUNCTION Manager.COMS.BEF))
		       (WINDOWPROP COMS.WINDOW (QUOTE BUTTONEVENTFN)
				     (FUNCTION Manager.COMS.BEF))
		       (WINDOWPROP COMS.WINDOW (QUOTE COMSTYPE)
				     COMSTYPE)
		       (WINDOWPROP COMS.WINDOW (QUOTE REPAINTFN)
				     (FUNCTION Manager.REPAINTFN))
		       (WINDOWPROP COMS.WINDOW (QUOTE CLOSEFN)
				     (QUOTE DON'T)))
	      ((SETQ COMS.WINDOW (WFROMMENU (GETDATUM COMSTYPE)))
		(Manager.COMSCLOSE COMS.WINDOW])

(Manager.COMSSHRINK
  [LAMBDA (WINDOW)                                           (* j.ferguson "13-Dec-85 09:44")
    (PROG (ICONWINDOW)
	    (RESETLST [RESETSAVE (DSPFONT Manager.TITLEFONT WindowTitleDisplayStream)
				     (QUOTE (PROGN (DSPFONT OLDVALUE WindowTitleDisplayStream]
			[SHRINKW WINDOW (fetch (MENU TITLE) of (GETDATUM (WINDOWPROP
										   WINDOW
										   (QUOTE COMSTYPE]
			(WINDOWPROP WINDOW (QUOTE EXPANDFN)
				      (FUNCTION Manager.COMSUPDATE))
			(SETQ ICONWINDOW (WINDOWPROP WINDOW (QUOTE ICONWINDOW)))
			(WINDOWPROP ICONWINDOW (QUOTE RIGHTBUTTONFN)
				      (QUOTE NILL))
			(WINDOWPROP ICONWINDOW (QUOTE CLOSEFN)
				      (QUOTE DON'T])

(Manager.COMSUPDATE
  [LAMBDA (WINDOW FLASHFLG)                                  (* j.ferguson "18-Sep-85 14:41")
    (PROG ([MENU (CAR (WINDOWPROP WINDOW (QUOTE MENU]
	     CHANGELST FILE TYPE)
	    (SETQ FILE (CAR (GETDATUM MENU)))
	    (SETQ TYPE (CDR (GETDATUM MENU)))
	    (SETQ CHANGELST (Manager.FILECHANGES FILE TYPE))
	    [COND
	      [(NULL (OPENWP WINDOW))
		(if (OPENWP (WINDOWPROP WINDOW (QUOTE ICONWINDOW)))
		    then (EXPANDW (WINDOWPROP WINDOW (QUOTE ICONWINDOW]
	      (T (if FLASHFLG
		     then (FLASHWINDOW WINDOW 2)
		   else (TOTOPW WINDOW]
	    (COND
	      ((EQUAL (fetch (MENU ITEMS) of MENU)
			(Manager.COLLECTCOMS FILE TYPE))
		(for ITEM in (LDIFFERENCE (WINDOWPROP WINDOW (QUOTE MANAGER.CHANGES))
						CHANGELST)
		   do (Manager.SHOWCHANGED WINDOW MENU ITEM))
		(for ITEM in CHANGELST do (Manager.SHOWCHANGED WINDOW MENU ITEM T)))
	      (T (Manager.COMSOPEN FILE TYPE])

(Manager.CORNER.POSITION
  [LAMBDA (OLDWINDOW MENU)                                   (* jcf "13-Feb-85 21:51")
    (PROG (POSITION)
	    (with REGION (WINDOWPROP OLDWINDOW (QUOTE REGION))
		    (SELECTQ Manager.DIRECTION
			       (UP (SETQ POSITION (create POSITION
							      XCOORD ← LEFT
							      YCOORD ← BOTTOM)))
			       [DOWN (SETQ POSITION (create POSITION
								XCOORD ← LEFT
								YCOORD ←(MAX (IDIFFERENCE
										 PTOP
										 (fetch IMAGEHEIGHT
										    of MENU))
									       0]
			       [CENTER (SETQ POSITION
					 (create POSITION
						   XCOORD ← LEFT
						   YCOORD ←(MAX (IQUOTIENT (IDIFFERENCE
										 PTOP
										 (fetch IMAGEHEIGHT
										    of MENU))
									       2)
								  0]
			       NIL))
	    (RETURN POSITION])

(Manager.FILECHANGES
  [LAMBDA (FILE COMSTYPE)                                  (* j.ferguson "18-Sep-85 12:32")
    (PROG (CHANGES)
	    (SETQ CHANGES (GETPROP FILE (QUOTE FILE)))
	    (RETURN (COND
			[(AND CHANGES (EQ COMSTYPE (QUOTE PROPS)))
			  (for CHANGE in (CDR (FASSOC COMSTYPE (CDR CHANGES)))
			     collect (CAR CHANGE) when (NOT (FMEMB (CAR CHANGE)
									     $$VAL]
			[CHANGES (CDR (FASSOC COMSTYPE (CDR CHANGES]
			((INTERSECTION (GETATOMVAL (PACK* (QUOTE CHANGED)
								COMSTYPE
								(QUOTE LST)))
					 (FILECOMSLST FILE COMSTYPE])

(Manager.FILESUBTYPES
  [LAMBDA (FILE)                                           (* j.ferguson "26-Sep-85 16:30")
    (for TYPE in FILEPKGTYPES bind COMSLST
       when (AND [NOT (FMEMB TYPE (QUOTE (EXPRESSIONS]
		     (SETQ COMSLST (FILECOMSLST FILE TYPE))
		     (if (EQ TYPE (QUOTE PROPS))
			 then (for PROP in COMSLST thereis (NOT (FMEMB (CADR PROP)
										   MACROPROPS)))
		       else (if (EQ TYPE (QUOTE VARS))
				  then (for VAR in COMSLST bind (FILEVARS
									  ←(FILECOMSLST
									    FILE
									    (QUOTE FILEVARS)))
					    thereis (NOT (FMEMB VAR FILEVARS)))
				else T)))
       collect TYPE])

(Manager.GETFILE
  [LAMBDA (MOVE.OR.COPY)                                     (* jcf "16-Mar-85 09:32")
    (PROG (FILEMENU)
	    (SETQ FILEMENU (GETDATUM (QUOTE FILELST.MENU)))
	    (COND
	      ([OR (NULL FILEMENU)
		     (NOT (EQUAL FILELST (CDR (fetch ITEMS of FILEMENU]
		[SETQ FILEMENU (create MENU
					   ITEMS ←(CONS (QUOTE *newfile*)
							  (COPY FILELST))
					   TITLE ← "Files"
					   WHENSELECTEDFN ←(FUNCTION (LAMBDA (ITEM MENU KEY)
					       (PROG (ANSWER FILECOMS)
						       (COND
							 ((EQ ITEM (QUOTE *newfile*))
							   (SETQ ANSWER (Manager.PROMPT 
										    "File Name: "))
							   (SETQ FILECOMS (FILECOMS ANSWER))
							   [SET FILECOMS (COPY (QUOTE (
                                                             (* File created by Coms Manager.)]
							   (ADDFILE ANSWER)
							   (RETURN ANSWER))
							 (T (RETURN ITEM]
		(PUTDATUM (QUOTE FILELST.MENU)
			  FILEMENU)))
	    (RETURN (MENU FILEMENU])

(Manager.INIT
  [LAMBDA NIL                                                (* j.ferguson "13-Dec-85 09:55")
    (COND
      ((NOT (SASSOC "Manager" BackgroundMenuCommands))
	(SETQ BackgroundMenu)
	[NCONC1 BackgroundMenuCommands (QUOTE ("Manager" (QUOTE (MANAGER]
	(for MENU in (QUOTE (MAIN.BACKGROUND FNS VARS RECORDS PROPS MAIN.MIDDLE COMS.MIDDLE 
						   COMS.RIGHT NEW.TYPE))
	   do (Manager.NEWMENU MENU))
	(for ADVICE in MANAGERADVICE do (UNMARKASCHANGED ADVICE (QUOTE ADVICE])

(Manager.INTITLE?
  [LAMBDA (WINDOW)                                           (* jcf " 9-Mar-85 13:24")
    (PROG (INTERIOR.HEIGHT REGION MENU)
	    [SETQ MENU (CAR (WINDOWPROP WINDOW (QUOTE MENU]
	    (SETQ INTERIOR.HEIGHT (FONTPROP (OR (fetch MENUTITLEFONT of MENU)
						      (fetch MENUFONT of MENU))
						(QUOTE HEIGHT)))
	    (with REGION (WINDOWPROP WINDOW (QUOTE REGION))
		    (SETQ REGION (CREATEREGION LEFT (IDIFFERENCE TOP INTERIOR.HEIGHT)
						   WIDTH INTERIOR.HEIGHT)))
	    (RETURN (INSIDEP REGION LASTMOUSEX LASTMOUSEY])

(Manager.MAIN.BEF
  [LAMBDA (WINDOW)                                           (* edited: " 3-Jan-86 08:39")
    (PROG (ICONWINDOW)
	    (if (Manager.INTITLE? WINDOW)
		then (SELECTQ LASTMOUSEBUTTONS
				  (1                         (* MIDDLE BUTTON)
				     (SHRINKW WINDOW)
				     (WINDOWPROP WINDOW (QUOTE EXPANDFN)
						   (FUNCTION Manager.MAINUPDATE))
				     (SETQ ICONWINDOW (WINDOWPROP WINDOW (QUOTE ICONWINDOW)))
				     (WINDOWPROP ICONWINDOW (QUOTE RIGHTBUTTONFN)
						   (QUOTE NILL))
				     (WINDOWPROP ICONWINDOW (QUOTE CLOSEFN)
						   (QUOTE DON'T)))
				  (4                         (* LEFT BUTTON)
				     (MOVEW WINDOW))
				  NIL)
	      else (APPLY* (QUOTE MENUBUTTONFN)
			       WINDOW])

(Manager.MAIN.BGF
  [LAMBDA (WINDOW)                                           (* jcf "10-Mar-85 15:15")
    (SELECTQ (MENU (Manager.GETMENU (QUOTE MAIN.BACKGROUND)))
	       (FILES? (Manager.TTYCOMMAND (FILES?)))
	       (CHANGES (Manager.TTYCOMMAND (Manager.CHANGED?)))
	       (MAKEFILES (Manager.TTYCOMMAND (MAKEFILES)))
	       (CLEANUP (Manager.TTYCOMMAND (CLEANUP)))
	       (EDIT (DV FILELST)
		       (UNMARKASCHANGED FILELST (QUOTE VARS))
		       (MANAGER))
	       (CLOSE (Manager.MAINCLOSE T))
	       NIL])

(Manager.MAIN.WHF
  [LAMBDA (ITEM MENU KEY)                                    (* jcf "11-Mar-85 09:10")
    (COND
      ([NOT (OR (KEYDOWNP (QUOTE LSHIFT))
		    (KEYDOWNP (QUOTE RSHIFT]
	[COND
	  ((EQLENGTH ITEM 3)
	    (SETQ KEY (QUOTE MIDDLE]
	(SETQ ITEM (CADR ITEM))
	(SELECTQ KEY
		   (MIDDLE (CLRPROMPT)
			   (PROMPTPRINT "Create a menu of " (CDR ITEM)
					  " for the file "
					  (CAR ITEM)))
		   (LEFT (CLRPROMPT)
			 (PROMPTPRINT "Menu of individual operations for file " (CAR ITEM)))
		   NIL])

(Manager.MAIN.WSF
  [LAMBDA (ITEM MENU KEY)                                    (* j.ferguson "13-Dec-85 17:39")
    (DECLARE (SPECVARS ITEM))
    [COND
      ((EQLENGTH ITEM 3)
	(SETQ KEY (QUOTE MIDDLE]
    (SETQ ITEM (CADR ITEM))
    (SELECTQ KEY
	       (MIDDLE (Manager.COMSOPEN (CAR ITEM)
					   (CDR ITEM)
					   T))
	       (LEFT (SELECTQ (MENU (Manager.GETMENU (QUOTE MAIN.MIDDLE)))
				[LOAD (Manager.TTYCOMMAND (BQUOTE (LOAD ,
										(KWOTE
										  (CAR ITEM]
				[MAKEFILE (Manager.TTYCOMMAND (BQUOTE
								    (MAKEFILE ,
										(KWOTE
										  (CAR ITEM]
				[NEW (Manager.TTYCOMMAND (BQUOTE (MAKEFILE ,
										 (KWOTE
										   (CAR ITEM))
										 (QUOTE NEW]
				[CLISPIFY (Manager.TTYCOMMAND (BQUOTE
								    (MAKEFILE ,
										(KWOTE
										  (CAR ITEM))
										(QUOTE CLISPIFY]
				[FAST (Manager.TTYCOMMAND (BQUOTE (MAKEFILE
									,
									(KWOTE (CAR ITEM))
									(QUOTE FAST]
				[LIST (Manager.TTYCOMMAND (BQUOTE (LISTFILES
									  ,
									  (KWOTE (CAR ITEM]
				[CLEANUP (Manager.TTYCOMMAND (BQUOTE (CLEANUP , (CAR ITEM]
				[ANALYZE (Manager.TTYCOMMAND
					   (BQUOTE (MASTERSCOPE (QUOTE (ANALYZE FNS ON ,
										      (CAR ITEM]
				[CHECK (Manager.TTYCOMMAND
					 (BQUOTE (MASTERSCOPE (QUOTE (CHECK , (CAR ITEM]
				[INCORE (Manager.TTYCOMMAND (BQUOTE (Manager.COMPILE
									  ,
									  (KWOTE (CAR ITEM))
									  T]
				[COMPILE (Manager.TTYCOMMAND (BQUOTE (COMPILEFILES
									     ,
									     (CAR ITEM]
				[TCOMPL (Manager.TTYCOMMAND (BQUOTE (TCOMPL
									    ,
									    (KWOTE (CAR ITEM]
				[BCOMPL (Manager.TTYCOMMAND (BQUOTE (BCOMPL
									    ,
									    (KWOTE (CAR ITEM]
				[RECOMPILE (Manager.TTYCOMMAND (BQUOTE
								     (RECOMPILE
								       ,
								       (KWOTE (CAR ITEM]
				[BRECOMPILE (Manager.TTYCOMMAND
						(BQUOTE (BRECOMPILE , (KWOTE (CAR ITEM]
				(REMOVE (if (EQLENGTH FILELST 1)
					      then (SETTOPVAL (QUOTE FILELST)
								  NIL)
					    else (DREMOVE (CAR ITEM)
							      FILELST))
					  (UNMARKASCHANGED (QUOTE FILELST)
							     (QUOTE VARS))
					  (MANAGER))
				[CHANGES (Manager.TTYCOMMAND
					   (BQUOTE (Manager.CHANGED? (QUOTE
									   (, (CAR ITEM]
				[UNMARK (COND
					  ((MOUSECONFIRM (CONCAT "Unmark entire contents of "
								     (CAR ITEM)
								     "?"))
					    [PUTPROP (CAR ITEM)
						       (QUOTE FILE)
						       (LIST (CAR (GETPROP (CAR ITEM)
										 (QUOTE FILE]
					    (Manager.SHOWCHANGED (GETDATUM (QUOTE MAINWINDOW))
								   MENU
								   (CAR ITEM))
					    (for WINDOW in (GETDATUM (QUOTE OPEN.WINDOWS))
					       bind MENU
					       when
						(EQ [CAR (GETDATUM (SETQ MENU
									 (CAR (WINDOWPROP
										  WINDOW
										  (QUOTE MENU]
						      (CAR ITEM))
					       do (for ITEM in (APPEND (WINDOWPROP
										 WINDOW
										 (QUOTE 
										  MANAGER.CHANGES)))
						       do (Manager.SHOWCHANGED WINDOW MENU ITEM]
				NIL))
	       NIL])

(Manager.MAINCLOSE
  [LAMBDA (SHUTDOWNFLG)                                      (* j.ferguson "18-Sep-85 14:34")
    (PROG (MENU ICON.WINDOW MAIN.WINDOW)
	    (COND
	      (SHUTDOWNFLG (SETQ Manager.ACTIVEFLG NIL)))
	    (for WINDOW in (APPEND (GETDATUM (QUOTE OPEN.WINDOWS)))
	       when (OR SHUTDOWNFLG (NOT (FMEMB [CAR (GETDATUM (CAR (WINDOWPROP
										  WINDOW
										  (QUOTE MENU]
							FILELST)))
	       do (Manager.COMSCLOSE WINDOW))
	    (SETQ MAIN.WINDOW (GETDATUM (QUOTE MAINWINDOW)))
	    (if [SETQ MENU (CAR (WINDOWPROP MAIN.WINDOW (QUOTE MENU]
		then (WINDOWPROP MAIN.WINDOW (QUOTE CLOSEFN)
				     NIL)
		       (DELETEMENU MENU T)
		       (if (SETQ ICON.WINDOW (WINDOWPROP MAIN.WINDOW (QUOTE ICON)))
			   then (CLOSEW (WINDOWPROP MAIN.WINDOW (QUOTE ICON])

(Manager.MAINMENUITEMS
  [LAMBDA NIL                                                (* edited: " 3-Jan-86 08:55")
    (for FILE in (if Manager.SORTFILELSTFLG
			 then (SORT FILELST)
		       else FILELST)
       bind DEFAULT MENU OLDITEMS OLDITEM SUBTYPES ITEMS FILECOMS
       first (if (SETQ MENU (Manager.GETMENU (QUOTE MAIN)))
		   then (SETQ OLDITEMS (fetch (MENU ITEMS) of MENU)))
       do [if (NULL (SETQ OLDITEM (FASSOC FILE OLDITEMS)))
		then (SETQ FILECOMS (FILECOMS FILE))
		       (SETQ DEFAULT (if (INFILECOMS? T (QUOTE FNS)
							    FILECOMS)
					   then (QUOTE FNS)
					 elseif (LDIFFERENCE (FILECOMSLST FILE (QUOTE VARS))
								 (FILECOMSLST FILE (QUOTE 
											 FILEVARS)))
					   then (QUOTE VARS)
					 else (QUOTE FILEVARS)))
		       (SETQ SUBTYPES (for TYPE in (Manager.FILESUBTYPES FILE)
					   collect (BQUOTE (, TYPE (, FILE ,@ TYPE)
								  NIL]
	    (SETQ ITEMS (DOCOLLECT [OR OLDITEM (BQUOTE (, FILE (, FILE ,@ DEFAULT)
								  NIL
								  (SUBITEMS ,@ SUBTYPES]
				       ITEMS))
       finally (RETURN (ENDCOLLECT ITEMS NIL])

(Manager.MAINOPEN
  [LAMBDA (WIN.OR.POSITION)                                  (* edited: " 3-Jan-86 08:44")
    (PROG (MENU WINDOW ITEMS)
	    (if (IGREATERP (TIMES (FONTPROP (GETDATUM (QUOTE MENUFONT))
						    (QUOTE HEIGHT))
					(PLUS (LENGTH FILELST)
						2))
			       SCREENHEIGHT)
		then (CLRPROMPT)
		       (printout PROMPTWINDOW T 
				 "The MANAGER menu is too large to fit on the screen..."
				 T T "Please edit the FILELST and try again." T)
		       (RETURN))
	    (SETQ ITEMS (Manager.MAINMENUITEMS))
	    (SETQ MENU (create MENU
				   ITEMS ← ITEMS
				   WHENHELDFN ←(FUNCTION Manager.MAIN.WHF)
				   WHENSELECTEDFN ←(FUNCTION Manager.MAIN.WSF)
				   MENUTITLEFONT ← Manager.TITLEFONT
				   TITLE ← "Manager"
				   MENUFONT ←(GETDATUM (QUOTE MENUFONT))
				   MENUCOLUMNS ← 1))
	    (PUTASSOC (QUOTE MAIN)
			MENU
			(GETDATUM (QUOTE MENUS)))
	    [SETQ WINDOW (PUTDATUM (QUOTE MAINWINDOW)
				     (ADDMENU MENU NIL (COND
						  ((WINDOWP WIN.OR.POSITION)
						    (Manager.CORNER.POSITION WIN.OR.POSITION MENU))
						  (WIN.OR.POSITION)
						  (T (with MENU MENU (GETBOXPOSITION IMAGEWIDTH 
										      IMAGEHEIGHT]
	    (WINDOWPROP WINDOW (QUOTE RIGHTBUTTONFN)
			  (FUNCTION Manager.MAIN.BGF))
	    (WINDOWPROP WINDOW (QUOTE BUTTONEVENTFN)
			  (FUNCTION Manager.MAIN.BEF))
	    (WINDOWPROP WINDOW (QUOTE REPAINTFN)
			  (FUNCTION Manager.REPAINTFN))
	    (WINDOWPROP WINDOW (QUOTE CLOSEFN)
			  (QUOTE DON'T))
	    [WINDOWPROP WINDOW (QUOTE ICONFN)
			  (FUNCTION (LAMBDA (WIN OICON)
			      (if (NULL OICON)
				  then (if (GETPROP (QUOTE ICONW)
							  (QUOTE FILEDATES))
					     then (ICONW MANAGER.BM MANAGER.BM.MASK)
					   else MANAGER.BM)
				else OICON]
	    (for ITEM in [for FILE in FILELST collect FILE
				when (CDR (GETPROP FILE (QUOTE FILE]
	       do (Manager.SHOWCHANGED WINDOW MENU ITEM T))
	    (SETQ Manager.ACTIVEFLG T])

(Manager.MAINUPDATE
  [LAMBDA (WINDOW)                                           (* j.ferguson "28-Oct-85 11:11")
    (PROG (MENU)
	    (SETQ MENU (Manager.GETMENU (QUOTE MAIN)))
	    (if MENU
		then [if (NULL WINDOW)
			   then (SETQ WINDOW (GETDATUM (QUOTE MAINWINDOW]
		       (if (OPENWP WINDOW)
			   then (for FILE in FILELST do (Manager.SHOWCHANGED
								  WINDOW MENU FILE
								  (CDR (GETPROP FILE
										    (QUOTE FILE])

(Manager.MAKEFILE.ADV
  [LAMBDA (FILE)                                           (* j.ferguson "23-Sep-85 17:05")
    (bind MENU (FILENAME ←(ROOTFILENAME FILE)) for WINDOW in (GETDATUM (QUOTE OPEN.WINDOWS))
       when (AND (OPENWP WINDOW)
		     (EQ [CAR (GETDATUM (SETQ MENU (CAR (WINDOWPROP WINDOW (QUOTE MENU]
			   FILENAME))
       do (for ITEM in (APPEND (WINDOWPROP WINDOW (QUOTE MANAGER.CHANGES)))
	       do (Manager.SHOWCHANGED WINDOW MENU ITEM))
       finally (Manager.SHOWCHANGED (GETDATUM (QUOTE MAINWINDOW))
					(Manager.GETMENU (QUOTE MAIN))
					FILENAME])

(Manager.MENUCOLUMNS
  [LAMBDA (ITEMSLST FONT BORDER)                             (* jcf "12-Jun-85 15:55")
    (PROG (NUMBER.COLUMNS MAX.ROW.WIDTH)
	    (if (NULL BORDER)
		then (SETQ BORDER 1))
	    [if (NULL FONT)
		then (SETQ FONT (GETDATUM (QUOTE MENUFONT]
	    (SETQ MAX.ROW.WIDTH (IPLUS BORDER (for NAME in ITEMSLST largest (STRINGWIDTH
											NAME FONT)
						     finally (RETURN $$EXTREME))
					   BORDER))
	    (SETQ NUMBER.COLUMNS (ADD1 (IQUOTIENT (SUB1 (FLENGTH ITEMSLST))
							Manager.MENUROWS)))
	    (if (IGREATERP (ITIMES NUMBER.COLUMNS MAX.ROW.WIDTH)
			       1024)
		then (SETQ NUMBER.COLUMNS (QUOTIENT 1024 MAX.ROW.WIDTH)))
	    (RETURN NUMBER.COLUMNS])

(Manager.NEWMENU
  [LAMBDA (MENU)                                           (* j.ferguson "13-Dec-85 17:36")
    (PUTASSOC
      MENU
      (SELECTQ
	MENU
	[COMS.RIGHT (create MENU
			      ITEMS ←(QUOTE (CLOSE BURY REDISPLAY MOVE SHRINK))
			      CENTERFLG ← T
			      MENUFONT ←(GETDATUM (QUOTE MENUFONT]
	[MAIN.BACKGROUND (create MENU
				   ITEMS ←(QUOTE ((CLOSE (QUOTE CLOSE)
							   "Close this window")
						     (CHANGES (QUOTE CHANGES)
							      
						     "Prints all the changes that have been made")
						     (MAKEFILES (QUOTE MAKEFILES)
								  
							 "Update the source of all changed files")
						     ("Edit FILELST" (QUOTE EDIT)
								     
						      "Edit the FILELST and remake the main menu")
						     (CLEANUP (QUOTE CLEANUP)
								
						     "Dump, list and recompile any changed files")
						     (FILES? (QUOTE FILES?)
							       
						    "Ask for updates and display status of files")))
				   CENTERFLG ← T
				   MENUFONT ←(GETDATUM (QUOTE MENUFONT]
	[FNS (create MENU
		       ITEMS ←(QUOTE
			 (("BREAK" (Manager.VALUE/ERROR (BQUOTE (BREAK , ITEM)))
				   "Break this function")
			   ("TRACE" (Manager.VALUE/ERROR (BQUOTE (TRACE , ITEM)))
				    "Trace this function")
			   ("UNBREAK" (Manager.VALUE/ERROR (BQUOTE (UNBREAK , ITEM)))
				      "UnBreak this function")
			   ("PP" (Manager.TTYCOMMAND (BQUOTE (PP , ITEM)))
				 "Print the function"
				 (SUBITEMS (PRINTCODE [Manager.TTYCOMMAND
							  (BQUOTE (PRINTCODE , (KWOTE ITEM]
							" Print the compiled code of the function")))
			   ("COMPILE" [Manager.TTYCOMMAND (BQUOTE (Manager.COMPILE
									,
									(KWOTE ITEM]
				      "Compile Function")
			   (DESCRIBE [Manager.TTYCOMMAND (BQUOTE (MASTERSCOPE
								       (QUOTE (DESCRIBE , ITEM]
				     "Invoke MasterScope to DESCRIBE the function"
				     (SUBITEMS (CALLS [Manager.TTYCOMMAND
							  (BQUOTE (CAR (CALLS , (KWOTE ITEM]
							
					"Returns a list of functions called by selected function")
					       (USES (Manager.TTYCOMMAND
						       [BQUOTE (CADR (CALLS , (KWOTE ITEM]
						       
				       "Returns the list of variables bound by selected function"))
					       (USES% FREELY
						 [Manager.TTYCOMMAND
						   (BQUOTE (CADDR (CALLS , (KWOTE ITEM]
						 
				 "Returns the list of variables used freely by selected function")
					       (USES% GLOBALLY
						 [Manager.TTYCOMMAND
						   (BQUOTE (CADDDR (CALLS , (KWOTE ITEM]
						 
			       "Returns the list of variables used globally by selected function")))
			   ("?=" (Manager.VALUE/ERROR
				   [BQUOTE (QUOTE , (CONS ITEM
								(OR (CADR (GETPROP
										ITEM
										(QUOTE ARGNAMES)))
								      (ARGLIST ITEM]
				   "Args not availiable!")
				 "The function's argument list"
				 (SUBITEMS ("FNTYP" (Manager.VALUE/ERROR
						      [BQUOTE (LIST , (KWOTE ITEM)
									"="
									(FNTYP , (KWOTE ITEM]
						      "Fn's type not found")
						    "Get the FNTYP of the function")))
			   ("EDIT" (Manager.VALUE/ERROR (BQUOTE (EDITDEF , (KWOTE ITEM)
									       (QUOTE FNS)))
							  "Nothing to EDIT!")
				   "Edit the function")))
		       CENTERFLG ← T
		       MENUFONT ←(GETDATUM (QUOTE MENUFONT]
	[VARS (create MENU
			  ITEMS ←(QUOTE (("NIL" (SETTOPVAL ITEM NIL)
						  "Set the toplevel value of this variable to NIL")
					    ("PP" (Manager.TTYCOMMAND (BQUOTE (PP , ITEM)))
						  "Pretty Print the variable")
					    ("EDIT" (Manager.VALUE/ERROR
						      (BQUOTE (EDITDEF , (KWOTE ITEM)
									   (QUOTE VARS)))
						      "Nothing to EDIT!")
						    "Edit the value")))
			  CENTERFLG ← T
			  MENUFONT ←(GETDATUM (QUOTE MENUFONT]
	(RECORDS (create MENU
			   ITEMS ←(QUOTE ((FIELDS [Manager.VALUE/ERROR
						      (BQUOTE (QUOTE ,
									 (LIST ITEM "="
										 (REVERSE
										   (RECORDFIELDNAMES
										     ITEM]
						    "List the field names")
					     ("EDIT" (Manager.VALUE/ERROR
						       (BQUOTE (EDITDEF , (KWOTE ITEM)
									    (QUOTE RECORDS)))
						       "Nothing to EDIT!")
						     "Edit the property list")))
			   CENTERFLG ← T))
	[PROPS (create MENU
			 ITEMS ←(QUOTE ((PL (Manager.TTYCOMMAND (BQUOTE (PL , ITEM)))
					      "Print the property list")
					   (EDIT (Manager.VALUE/ERROR (BQUOTE (DP , ITEM))
									  "Nothing to EDIT!")
						   "Edit the property list")))
			 CENTERFLG ← T
			 MENUFONT ←(GETDATUM (QUOTE MENUFONT]
	[MAIN.MIDDLE (create MENU
			       ITEMS ←(QUOTE ((LOAD (QUOTE LOAD)
							"Load the source of this file")
						 (MAKEFILE (QUOTE MAKEFILE)
							     "Dump the source of this file"
							     (SUBITEMS (NEW (QUOTE NEW)
									    
								      "Dump the source from core")
								       (FAST (QUOTE FAST)
									     
							"Dump the source without pretty printing")
								       (CLISPIFY (QUOTE CLISPIFY)
										   
								  "Clispify and then dump source")
								       (MAKEFILE (QUOTE MAKEFILE)
										   
								   "Dump the source of this file")))
						 (LIST (QUOTE LIST)
							 "List this file")
						 (CLEANUP (QUOTE CLEANUP)
							    "Dump, list and recompile this file")
						 (CHECK (QUOTE CHECK)
							
						"Check the file for problems through MasterScope"
							(SUBITEMS (ANALYZE (QUOTE ANALYZE)
									   
					       "Analyze the FNS on selected file for MasterScope")))
						 [COMPILE (QUOTE COMPILE)
							    "Compile this file"
							    (SUBITEMS (INCORE (QUOTE INCORE))
								      (TCOMPL (QUOTE TCOMPL))
								      (RECOMPILE (QUOTE RECOMPILE)
										   )
								      (BCOMPL (QUOTE BCOMPL))
								      (BRECOMPILE (QUOTE 
										       BRECOMPILE]
						 (REMOVE (QUOTE REMOVE)
							   "Remove this file from FILELST")
						 (CHANGES (QUOTE CHANGES)
							  
					    "Print the changes that have been made to this file.")
						 (UNMARK (QUOTE UNMARK)
							 
					       "Unmark this file.  No changes will be remembered")))
			       CENTERFLG ← T
			       MENUFONT ←(GETDATUM (QUOTE MENUFONT]
	[COMS.MIDDLE (create MENU
			       ITEMS ←(QUOTE ((RENAME (QUOTE RENAME)
							  
						 "Rename this item and update file with new name"
							  (SUBITEMS (RENAME (QUOTE RENAME)
									      
					 "Rename this item locally and update file with new name")
								    (RENAME% ALL (QUOTE RENAME-ALL)
										 
							 "Rename this item in *ALL* loaded files")))
						 (DELETE (QUOTE DELETE)
							 "Delete this item")
						 (MOVE (QUOTE MOVE)
						       "Move this item to another file")
						 (COPY (QUOTE COPY)
							 "Copy this item to another file")
						 (MARK (QUOTE CHANGED)
						       "Mark this item as being changed"
						       (SUBITEMS (DEFINED (QUOTE DEFINED)
									  
								     "Mark item as being DEFINED")
								 (CHANGED (QUOTE CHANGED)
									  
								     "Mark item as being CHANGED")
								 (DELETED (QUOTE DELETED)
									  
								     "Mark item as being DELETED")
								 (CLISP (QUOTE CLISP)
									  
								  "Mark item as being CLISPIFIED")))
						 (UNMARK (QUOTE UNMARK)
							 "Unmark this item as being changed")))
			       CENTERFLG ← T
			       MENUFONT ←(GETDATUM (QUOTE MENUFONT]
	[NEW.TYPE (create MENU
			    ITEMS ←(QUOTE ((EDIT (QUOTE EDIT)
						     "Edit item")
					      (PP (QUOTE PP)
						    "Display item"]
	NIL)
      (GETDATUM (QUOTE MENUS])

(Manager.PROMPT
  [LAMBDA (PROMPT)                                           (* jop: "30-Sep-85 15:32")
    (CLRPROMPT)
    (RESETFORM (TTY.PROCESS (THIS.PROCESS))
		 (PROG1 (MKATOM (PROMPTFORWORD PROMPT NIL NIL PROMPTWINDOW))
			  (printout PROMPTWINDOW T])

(Manager.RENAME
  [LAMBDA (ITEM COMSTYPE FILE WINDOW)                        (* jop: "30-Sep-85 15:17")
    (PROG (ANSWER)
	    (COND
	      ((SETQ ANSWER (Manager.PROMPT (CONCAT "Rename " ITEM " to: ")))
		(RESETLST [RESETSAVE (WINDOWPROP PROMPTWINDOW (QUOTE PROCESS))
					 (QUOTE (PROGN (WINDOWPROP PROMPTWINDOW (QUOTE 
											  PROCESS)
									 OLDVALUE]
			    (RESETSAVE (TTYDISPLAYSTREAM PROMPTWINDOW))
			    (RENAME ITEM ANSWER COMSTYPE FILE))
		(Manager.COMSUPDATE WINDOW)
		(if (WINDOWDELPROP WINDOW (QUOTE Manager.CHANGES)
				       ITEM)
		    then (WINDOWADDPROP WINDOW (QUOTE Manager.CHANGES)
					    ANSWER])

(Manager.REPAINTFN
  [LAMBDA (WIN)                                            (* j.ferguson "31-Jul-85 16:42")
    (PROG (MENU)
	    [SETQ MENU (CAR (WINDOWPROP WIN (QUOTE MENU]
	    (BLTMENUIMAGE MENU WIN)
	    (for ITEM in (WINDOWPROP WIN (QUOTE MANAGER.CHANGES)
					   NIL)
	       do (Manager.SHOWCHANGED WIN MENU ITEM T])

(Manager.RESETSUBITEMS
  [LAMBDA (FILE COMSTYPE)                                  (* j.ferguson "17-Sep-85 08:32")
    (AND FILE (PROG (ITEMS MENU.ITEMS SUBTYPES)

          (* * REPLACE DEFAULT COMSTYPE IF CHANGED)


		        [SETQ MENU.ITEMS (FASSOC FILE (fetch (MENU ITEMS)
							     of (Manager.GETMENU (QUOTE MAIN]
		        (SETQ ITEMS (NTH MENU.ITEMS 4))
		        (SETQ SUBTYPES (Manager.FILESUBTYPES FILE))
		        (if [AND ITEMS (OR (NULL COMSTYPE)
						 (if (FASSOC COMSTYPE (CDAR ITEMS))
						     then (NULL (FMEMB COMSTYPE SUBTYPES))
						   else (FMEMB COMSTYPE SUBTYPES]
			    then [RPLACA ITEMS
					     (BQUOTE (SUBITEMS ,@(for TYPE in SUBTYPES
								      collect
								       (BQUOTE (, TYPE
										    (, FILE ,@ TYPE)
										    NIL]
				   (RPLACD (CADR MENU.ITEMS)
					     (COND
					       ((FILECOMSLST FILE (QUOTE FNS))
						 (QUOTE FNS))
					       ((LDIFFERENCE (FILECOMSLST FILE (QUOTE VARS))
							       (FILECOMSLST FILE (QUOTE FILEVARS))
							       )
						 (QUOTE VARS))
					       (T (QUOTE FILEVARS])

(Manager.SHOWCHANGED
  [LAMBDA (WINDOW MENU ITEM MARKED?)                         (* j.ferguson "23-Sep-85 16:52")
                                                             (* Highlights a menu entry in bold print to show its 
							     marked status in the FILEPKG.)
    (if (OPENWP WINDOW)
	then (COND
		 ([COND
		     [MARKED? (NOT (FMEMB (COND
						((LISTP ITEM)
						  (CAR ITEM))
						(T ITEM))
					      (WINDOWPROP WINDOW (QUOTE MANAGER.CHANGES]
		     (T (FMEMB (COND
				   ((LISTP ITEM)
				     (CAR ITEM))
				   (T ITEM))
				 (WINDOWPROP WINDOW (QUOTE MANAGER.CHANGES]
		   (COND
		     ([SETQ ITEM (for MENU.ITEM in (fetch (MENU ITEMS) of MENU)
				      thereis (COND
						  ((LISTP MENU.ITEM)
						    (OR (EQ ITEM (CAR MENU.ITEM))
							  (EQUAL ITEM MENU.ITEM)))
						  ((EQ ITEM MENU.ITEM]
		       (with REGION (MENUITEMREGION ITEM MENU)
			       (BITBLT NIL NIL NIL WINDOW (ADD1 LEFT)
					 (IPLUS BOTTOM 2)
					 (IDIFFERENCE WIDTH (COND
							  ((AND (LISTP ITEM)
								  (FASSOC (QUOTE SUBITEMS)
									    (CDR ITEM)))
							    9)
							  (2)))
					 (IDIFFERENCE HEIGHT 2)
					 (QUOTE TEXTURE)
					 (QUOTE REPLACE)
					 WHITESHADE)
			       (MOVETO (ADD1 LEFT)
					 (IPLUS BOTTOM (COND
						    ((EQ BOTTOM 1)
						      3)
						    (2)))
					 WINDOW)
			       [COND
				 ((LISTP ITEM)
				   (SETQ ITEM (CAR ITEM]
			       (COND
				 (MARKED? (WINDOWADDPROP WINDOW (QUOTE MANAGER.CHANGES)
							   ITEM)
					  (DSPFONT (GETDATUM (QUOTE MENUBOLDFONT))
						     WINDOW))
				 (T (WINDOWDELPROP WINDOW (QUOTE MANAGER.CHANGES)
						     ITEM)
				    (DSPFONT (GETDATUM (QUOTE MENUFONT))
					       WINDOW)))
			       (PRIN1 ITEM WINDOW])

(Manager.SORTBYCOLUMN
  [LAMBDA (ITEMS)                                            (* j.ferguson "10-Sep-85 11:14")
    (PROG ((LNGTH (FLENGTH ITEMS))
	     COLUMNCOUNT COLUMNLENGTH EXTRAITEMCOLUMNS RESULT)
	    (if (NULL ITEMS)
		then (RETURN))
	    (SORT ITEMS)
	    (SETQ COLUMNCOUNT (Manager.MENUCOLUMNS ITEMS))
	    (SETQ COLUMNLENGTH (IQUOTIENT LNGTH COLUMNCOUNT))
	    (SETQ EXTRAITEMCOLUMNS (IREMAINDER LNGTH COLUMNCOUNT))
	    [SETQ RESULT (for I to COLUMNCOUNT collect (for J to (COND
									       ((ILEQ I 
										 EXTRAITEMCOLUMNS)
										 (ADD1 COLUMNLENGTH)
										 )
									       (COLUMNLENGTH))
								  collect (pop ITEMS]
	    (RETURN (while (CAR RESULT) join (DREMOVE NIL
								(for LST on RESULT
								   collect
								    (PROG1 (CAAR LST)
									     (RPLACA LST
										       (CDAR LST])

(Manager.TTYCOMMAND
  [NLAMBDA (COMMAND)                                       (* ren "11-Feb-85 06:33")
    (GIVE.TTY.PROCESS \TopLevelTtyWindow)
    (BKSYSBUF (COND
		  ([AND (LISTP COMMAND)
			  (FMEMB (CAR COMMAND)
				   (QUOTE (QUOTE BQUOTE]
		    (EVAL COMMAND))
		  (T COMMAND])

(Manager.VALUE/ERROR
  [LAMBDA ($$FORM $$ERRORMSG)                                (* j.ferguson "13-Dec-85 20:26")
    (TTY.PROCESS (ADD.PROCESS (BQUOTE (ManagerCommand , (KWOTE $$FORM)
							      ,
							      (KWOTE $$ERRORMSG)))
				  (QUOTE RESTARTABLE)
				  (QUOTE YES])

(ManagerCommand
  [LAMBDA ($$FORM $$ERRORMSG)                                (* j.ferguson "13-Dec-85 16:06")
    (PROG ($$RESULT MESSAGE)
	    (SETQ $$RESULT (RESETLST (RESETSAVE (TTYDISPLAYSTREAM PROMPTWINDOW))
					 (EVAL $$FORM)))
	    (CLRPROMPT)
	    (SETQ MESSAGE (OR $$RESULT $$ERRORMSG))
	    (if (ILESSP (fetch (REGION WIDTH) of (WINDOWPROP PROMPTWINDOW (QUOTE REGION)))
			    (STRINGWIDTH MESSAGE PROMPTWINDOW))
		then (PROMPTPRINT MESSAGE)
	      else (CENTERPRINTINREGION MESSAGE NIL PROMPTWINDOW))
	    (RETURN $$RESULT])
)
(DECLARE: EVAL@COMPILE 
[PUTPROPS GETDATUM MACRO ((KEY)
	   (CDR (FASSOC KEY Manager.DATASPACE]
(PUTPROPS PUTDATUM MACRO ((KEY VALUE)
	   (PUTASSOC KEY VALUE Manager.DATASPACE)))
[PUTPROPS Manager.GETMENU MACRO ((MEN)
	   (CDR (FASSOC MEN (GETDATUM (QUOTE MENUS]
)
(* * Misc)

(Manager.INIT)
(DECLARE: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS 

(ADDTOVAR NLAMA )

(ADDTOVAR NLAML Manager.TTYCOMMAND)

(ADDTOVAR LAMA )
)
(DECLARE: DONTCOPY
  (FILEMAP (NIL (8993 57295 (MANAGER 9003 . 10283) (MANAGER.RESET 10285 . 11129) (Manager.ADDADV 11131
 . 12319) (Manager.ADDTOFILES? 12321 . 12651) (Manager.ALTERMARKING 12653 . 13704) (Manager.CHANGED? 
13706 . 14218) (Manager.CHECKFILE 14220 . 14941) (Manager.COLLECTCOMS 14943 . 15997) (Manager.COMPILE 
15999 . 16510) (Manager.COMS.BEF 16512 . 17148) (Manager.COMS.BGF 17150 . 17568) (Manager.COMS.WSF 
17570 . 20161) (Manager.COMSCLOSE 20163 . 20878) (Manager.COMSOPEN 20880 . 23633) (Manager.COMSSHRINK 
23635 . 24418) (Manager.COMSUPDATE 24420 . 25511) (Manager.CORNER.POSITION 25513 . 26395) (
Manager.FILECHANGES 26397 . 27083) (Manager.FILESUBTYPES 27085 . 27861) (Manager.GETFILE 27863 . 28961
) (Manager.INIT 28963 . 29526) (Manager.INTITLE? 29528 . 30161) (Manager.MAIN.BEF 30163 . 30989) (
Manager.MAIN.BGF 30991 . 31599) (Manager.MAIN.WHF 31601 . 32203) (Manager.MAIN.WSF 32205 . 35819) (
Manager.MAINCLOSE 35821 . 36760) (Manager.MAINMENUITEMS 36762 . 38057) (Manager.MAINOPEN 38059 . 40232
) (Manager.MAINUPDATE 40234 . 40765) (Manager.MAKEFILE.ADV 40767 . 41458) (Manager.MENUCOLUMNS 41460
 . 42269) (Manager.NEWMENU 42271 . 50339) (Manager.PROMPT 50341 . 50635) (Manager.RENAME 50637 . 51369
) (Manager.REPAINTFN 51371 . 51762) (Manager.RESETSUBITEMS 51764 . 53022) (Manager.SHOWCHANGED 53024
 . 55011) (Manager.SORTBYCOLUMN 55013 . 56002) (Manager.TTYCOMMAND 56004 . 56342) (Manager.VALUE/ERROR
 56344 . 56663) (ManagerCommand 56665 . 57293)))))
STOP