(FILECREATED " 5-AUG-83 11:40:13" {PHYLUM}<LISPCORE>SOURCES>FILEBROWSER.;45 38744  

      changes to:  (FNS FDIRECTORY)

      previous date: " 3-AUG-83 16:14:33" {PHYLUM}<LISPCORE>SOURCES>FILEBROWSER.;44)


(* Copyright (c) 1983 by Xerox Corporation)

(PRETTYCOMPRINT FILEBROWSERCOMS)

(RPAQQ FILEBROWSERCOMS [(VARS (DEFAULTBROWSERFONT (FONTCREATE (QUOTE GACHA)
							      10
							      (QUOTE BOLD)))
			      FBITEMUNSELECTEDSHADE
			      (FCOMPILEOPS NIL)
			      (FEDITOPS NIL)
			      (FUPDATEOPS NIL)
			      (FLOADOPS NIL)
			      (FBMENU NIL)
			      (DELETEDFILEFONT (FONTCREATE (QUOTE HELVETICA)
							   10
							   (QUOTE ITALIC)))
			      (FILEBROWSERBUSY NIL)
			      FBITEMSELECTEDSHADE)
	(FNS FBROWSEBUTTON FBROWSEMOVEDFN FBROWSEOUTFN FBROWSEREPAINTFN FBROWSERPRINTANDBOX 
	     FDELCOMMAND FDIRECTORY FEDITLISPFILE FEXPNGFILECOMMAND FGETFILENAME FHARDCPYCOMMAND 
	     FLOADFILECOMMAND FNEWPTRNCOMMAND FOPENINFOW FRENAMEFILECOMMAND FBROWSERIGHT 
	     FBROWSESELECT FDOEDITCOMMAND FDOFILEBROWSERCOMMAND FDOSEECOMMAND FILEBROWSER FINDFOLDER 
	     FMAKEFOLDERSELECTED FMAKEFOLDERUNSELECTED FMAKESEEWINDOW FCHANGEFOLDERMARK 
	     FCHANGESELMARK FCOMPLFILECOMMAND FCOPYFILECOMMAND FMARKFOLDERSELECTED 
	     FMARKFOLDERUNSELECTED FPRINTFILEINFO FPROMPTEDIT FSEEREPAINTFN FSEERESHAPEFN 
	     FSHORTFILENAME FPRINTHEADER FUNDELCOMMAND FUPDATEBROWSERITEMS FUPDATECOMMAND)
	(RECORDS BrowserRec)
	(FNS Execute.As.Process)
	(CURSORS RIGHTARROWCURSOR)
	(CONSTANTS (MarkXPos 10))
	(BITMAPS SELECTBM)
	(LISPXMACROS FB)
	(FILES (COMPILED SYSLOAD)
	       MENUEDWINDOW TEDIT DPUPFTP BSP)
	(DECLARE: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS (ADDVARS (NLAMA)
									      (NLAML 
									       Execute.As.Process)
									      (LAMA])

(RPAQ DEFAULTBROWSERFONT (FONTCREATE (QUOTE GACHA)
				     10
				     (QUOTE BOLD)))

(RPAQQ FBITEMUNSELECTEDSHADE 0)

(RPAQQ FCOMPILEOPS NIL)

(RPAQQ FEDITOPS NIL)

(RPAQQ FUPDATEOPS NIL)

(RPAQQ FLOADOPS NIL)

(RPAQQ FBMENU NIL)

(RPAQ DELETEDFILEFONT (FONTCREATE (QUOTE HELVETICA)
				  10
				  (QUOTE ITALIC)))

(RPAQQ FILEBROWSERBUSY NIL)

(RPAQQ FBITEMSELECTEDSHADE 43605)
(DEFINEQ

(FBROWSEBUTTON
  [LAMBDA (WINDOW)                                           (* SDG "22-JUL-83 13:24")
    (COND
      [(OR (KEYDOWNP (QUOTE LSHIFT))
	   (KEYDOWNP (QUOTE RSHIFT)))
	(while (OR (KEYDOWNP (QUOTE LSHIFT))
		   (KEYDOWNP (QUOTE RSHIFT)))
	   bind FOLDER
	   do (GETMOUSESTATE)
	      (if FOLDER
		  then (FCHANGESELMARK FOLDER WINDOW))
	      (FCHANGESELMARK (SETQ FOLDER (FINDFOLDER WINDOW))
			      WINDOW)
	   finally (FCHANGESELMARK FOLDER WINDOW)
		   (BKSYSBUF (fetch (BrowserRec USERDATA) of FOLDER]
      ((FBROWSESELECT WINDOW])

(FBROWSEMOVEDFN
  [LAMBDA (WINDOW)                                           (* mdy: "20-OCT-82 16:29")
    (SETCURSOR (COND
		 ((IGEQ 30 (fetch XCOORD of (CURSORPOSITION NIL WINDOW)))
		   RIGHTARROWCURSOR)
		 (T DEFAULTCURSOR])

(FBROWSEOUTFN
  [LAMBDA (WINDOW)                                           (* rao: "30-JUN-82 15:49")
    (SETCURSOR DEFAULTCURSOR])

(FBROWSEREPAINTFN
  [LAMBDA (WINDOW R)                                         (* SDG "21-JUL-83 09:48")
    (DECLARE (SPECVARS MAXWIDTH))
    (PROG ((BROWSERITEMMAP (WINDOWPROP WINDOW (QUOTE BROWSERITEMMAP)))
	   (ITEMPRINTFN (WINDOWPROP WINDOW (QUOTE BROWSERITEMPRINTFN)))
	   (DIRSTART (WINDOWPROP WINDOW (QUOTE DIRSTART)))
	   YPOS
	   [TOP (IPLUS (fetch TOP of R)
		       (FONTPROP WINDOW (QUOTE DESCENT]
	   [BOTTOM (IDIFFERENCE (fetch BOTTOM of R)
				(FONTPROP WINDOW (QUOTE ASCENT]
	   (MAXWIDTH 0))
          (for BROWSERMAPITEM in BROWSERITEMMAP as ITEMCOUNT from 1
	     when (AND [IGREATERP TOP (SETQ YPOS (fetch BOTTOM of (fetch (BrowserRec ITEMREGION)
								     of BROWSERMAPITEM]
		       (ILESSP BOTTOM YPOS))
	     do (MOVETO 0 (IPLUS YPOS (FONTPROP WINDOW (QUOTE DESCENT)))
			WINDOW)
		(replace (BrowserRec ITEMREGION) of BROWSERMAPITEM
		   with (FBROWSERPRINTANDBOX (APPLY* ITEMPRINTFN (fetch (BrowserRec USERDATA)
								    of BROWSERMAPITEM)
						     DIRSTART)
					     WINDOW 30 10))
		(COND
		  ((fetch (BrowserRec SELECTED?) of BROWSERMAPITEM)
		    (FMARKFOLDERSELECTED BROWSERMAPITEM WINDOW)))
		(COND
		  ((fetch (BrowserRec DELETED?) of BROWSERMAPITEM)
		    (FCHANGEFOLDERMARK BROWSERMAPITEM WINDOW)))
	     repeatwhile (ILESSP BOTTOM YPOS])

(FBROWSERPRINTANDBOX
  [LAMBDA (EXP WINDOW LFTMARGIN MINSPACE)                    (* ecc "19-JUL-83 16:41")
    (DECLARE (GLOBALVARS PLVLFILEFLG))                       (* prints EXP on WINDOW starting at LFTMARGIN and 
							     returns the box taken by the characters.
							     Leaves at least MINSPACE points.)
                                                             (* set the left margin so that at least nothing will CR 
							     past it. This does not handle multiple line values.)
    (PROG ((DS (\SFInsureDisplayStream WINDOW))
	   PREVRM PREVLM YSTART YEND HGHT DSPFONT)
          (DSPFONT DEFAULTBROWSERFONT DS)
          (SETQ PREVRM (DSPRIGHTMARGIN 50000 DS))            (* so that it won't auto carrage return.)
          (SETQ PREVLM (DSPLEFTMARGIN LFTMARGIN DS))
          (AND (FIXP MINSPACE)
	       (RELMOVETO MINSPACE 0 DS))
          (COND
	    ((IGREATERP (fetch \SFXPOSITION of DS)
			LFTMARGIN)
	      (TERPRI DS)))
          (DSPXPOSITION LFTMARGIN DS)
          (SETQ YSTART (DSPYPOSITION NIL DS))
          (RETURN (PROG1 [create REGION
				 LEFT ← LFTMARGIN
				 BOTTOM ←[PROGN (RESETLST (RESETSAVE (PRINTLEVEL INSPECTPRINTLEVEL))
							  (RESETSAVE PLVLFILEFLG T)
							  (PRIN1 EXP DS))
						(IDIFFERENCE (SETQ YEND (DSPYPOSITION NIL DS))
							     (FONTPROP (SETQ DSPFONT
									 (DSPFONT NIL DS))
								       (QUOTE DESCENT]
				 HEIGHT ←(IPLUS (SETQ HGHT (IDIFFERENCE YSTART YEND))
						(FONTPROP DSPFONT (QUOTE HEIGHT)))
				 WIDTH ←(COND
				   ((IGREATERP HGHT 0)       (* printing the thing did an overflow;
							     use at least the width of the window.)
				     (IMAX (IDIFFERENCE (DSPXPOSITION NIL DS)
							LFTMARGIN)
					   (IDIFFERENCE (fetch (REGION WIDTH)
							   of (DSPCLIPPINGREGION NIL DS))
							LFTMARGIN)))
				   (T (IDIFFERENCE (DSPXPOSITION NIL DS)
						   LFTMARGIN]
			 (DSPRIGHTMARGIN PREVRM DS)
			 (DSPLEFTMARGIN PREVLM DS])

(FDELCOMMAND
  [LAMBDA (FILEENTRY WINDOW)                                 (* SDG "23-JUL-83 08:18")
    (COND
      ((NOT (fetch (BrowserRec DELETED?) of FILEENTRY))
	(FCHANGEFOLDERMARK FILEENTRY WINDOW)
	(replace (BrowserRec DELETED?) of FILEENTRY with T])

(FDIRECTORY
  [LAMBDA (SPEC)                                             (* SDG " 5-AUG-83 11:32")
    (RESETLST (RESETSAVE NIL (LIST (QUOTE CURSOR)
				   T))
	      (CURSOR WAITINGCURSOR)
	      (COND
		((if (OR (STRPOS "{DSK" SPEC 1 NIL T))
		     then (SORT (FILDIR SPEC))
		   else (FILDIR SPEC)))
		(T (PROMPTPRINT (CONCAT "No files in group " SPEC))
		   NIL])

(FEDITLISPFILE
  [LAMBDA (FILE WINDOW)                                      (* sg: " 3-AUG-83 16:08")
    (SETQ WINDOW (OR (WINDOWPROP WINDOW (QUOTE BROWSERINFOW))
		     (FOPENINFOW WINDOW)))
    (RESETLST (RESETSAVE NIL (LIST (QUOTE CLOSEW)
				   WINDOW))
	      (TTYDISPLAYSTREAM WINDOW)
	      (WINDOWPROP WINDOW (QUOTE TITLE)
			  (CONCAT "Edit COMS for file " FILE))
	      (CLEARW WINDOW)
	      (GIVE.TTY.PROCESS WINDOW)
	      [COND
		((NEQ (CDAR (GETPROP (ROOTFILENAME FILE)
				     (QUOTE FILEDATES)))
		      (U-CASE FILE))
		  (printout T "The file " .FONT BOLDFONT FILE .FONT DEFAULTFONT 
			    "is either not loaded or is not the currently loaded version:"
			    T T)
		  (printout T "LOADFROM[" FILE "]" T)
		  (LISPX (LIST (QUOTE LOADFROM)
			       (KWOTE FILE]
	      (APPLY* (QUOTE DV)
		      (PACK (LIST (FILENAMEFIELD FILE (QUOTE NAME))
				  (QUOTE COMS])

(FEXPNGFILECOMMAND
  [LAMBDA (WINDOW)                                           (* SDG "23-JUL-83 08:53")
    [for FILEENTRY in (WINDOWPROP WINDOW (QUOTE BROWSERITEMMAP)) do (if (fetch (BrowserRec DELETED?)
									   of FILEENTRY)
									then (DELFILE (FGETFILENAME
											FILEENTRY]
    (CLEARW WINDOW)
    (WINDOWPROP WINDOW (QUOTE CURRENTFOLDERNUMBERS)
		NIL)
    (FUPDATEBROWSERITEMS (FDIRECTORY (WINDOWPROP WINDOW (QUOTE ITEMSPEC)))
			 (QUOTE FSHORTFILENAME)
			 WINDOW])

(FGETFILENAME
  [LAMBDA (ENTRY)                                            (* SDG " 8-APR-83 14:05")
    (fetch (BrowserRec USERDATA)
	   ENTRY])

(FHARDCPYCOMMAND
  [LAMBDA (FILEENTRY KEY WINDOW)                             (* SDG " 3-AUG-83 10:26")
    (PROG ((FILE (FGETFILENAME FILEENTRY)))
          (SETQ WINDOW (OR (WINDOWPROP WINDOW (QUOTE BROWSERINFOW))
			   (FOPENINFOW WINDOW)))
          (WINDOWPROP WINDOW (QUOTE TITLE)
		      (CONCAT "Hardcopy of file " FILE))
          (RESETLST (RESETSAVE NIL (LIST (QUOTE CLOSEW)
					 WINDOW))
		    (CLEARW WINDOW)
		    (TTYDISPLAYSTREAM WINDOW)
		    (GIVE.TTY.PROCESS WINDOW)
		    (printout T "Printing file " FILE T T)
		    [if (FILEDATE FILE)
			then (APPLY* (QUOTE LISTFILES)
				     FILE)
		      else (LISPX (LIST (QUOTE EMPRESS)
					(KWOTE FILE]
		    (DISMISS 5000])

(FLOADFILECOMMAND
  [LAMBDA (FILEENTRY KEY WINDOW)                             (* SDG " 3-AUG-83 08:35")
    (PROG [(FILE (FGETFILENAME FILEENTRY))
	   (LOADOP (if (EQ KEY (QUOTE MIDDLE))
		       then [MENU (OR FLOADOPS (SETQ FLOADOPS (create MENU
								      MENUFONT ← DEFAULTBROWSERFONT
								      ITEMS ←(QUOTE
									((LOAD (QUOTE LOAD)
									       
								"Performs LOAD on selected files")
									  (LOADFROM (QUOTE LOADFROM)
										    
							    "Performs LOADFROM on selected files"]
		     else (QUOTE LOAD]
          (if (NULL LOADOP)
	      then (RETURN))
          (if (FILEDATE FILE)
	      then (SETQ WINDOW (OR (WINDOWPROP WINDOW (QUOTE BROWSERINFOW))
				    (FOPENINFOW WINDOW)))
		   (RESETLST (RESETSAVE NIL (LIST (QUOTE CLOSEW)
						  WINDOW))
			     (WINDOWPROP WINDOW (QUOTE TITLE)
					 (CONCAT LOADOP " on file " FILE))
			     (CLEARW WINDOW)
			     (TTYDISPLAYSTREAM WINDOW)
			     (GIVE.TTY.PROCESS WINDOW)
			     (LISPX (LIST LOADOP (KWOTE FILE)))
			     (DISMISS 5000))
	    else (PROMPTPRINT (CONCAT "Can't load " FILE])

(FNEWPTRNCOMMAND
  [LAMBDA (WINDOW)                         (* SDG "28-JUL-83 20:04")
    (PROG (ITEMLIST DIRSTART)
          (CLRPROMPT)
          (PROMPTPRINT 
              "New File Group Description?
  (Enter NIL to ABORT) ")
          [SETQ ITEMLIST
            (CAR (FPROMPTEDIT (if [ATOM (SETQ ITEMLIST
                                          (WINDOWPROP WINDOW
                                                      (QUOTE ITEMSPEC]
                                  then ITEMLIST
                                else "")
                              PROMPTWINDOW
                              (QUOTE PRIN2]
          (if (NULL ITEMLIST)
              then (RETURN))
          (WINDOWPROP WINDOW (QUOTE TITLE)
                      (CONCAT "Files in group: " ITEMLIST))
          (SETQ ITEMLIST (\ADD.CONNECTED.DIR ITEMLIST))
          (SETQ DIRSTART (LISTGET (UNPACKFILENAME ITEMLIST)
                                  (QUOTE DIRECTORY)))
          (WINDOWPROP WINDOW (QUOTE DIRSTART)
                      (if DIRSTART
                          then (PLUS (NCHARS DIRSTART)
                                     2)
                        else 1))
          (WINDOWPROP WINDOW (QUOTE ITEMSPEC)
                      ITEMLIST)
          (WINDOWPROP WINDOW (QUOTE TITLE)
                      (if (ATOM ITEMLIST)
                          then (CONCAT "Files in group: " ITEMLIST)
                        else "File Browser"))
          (RETURN T])

(FOPENINFOW
  [LAMBDA (WINDOW)                                           (* SDG "29-JUL-83 09:37")
    (PROG (FILEBROWSERINFOW)
          (SETQ FILEBROWSERINFOW
	    (CREATEW (create REGION
			     BOTTOM ← 0
			     LEFT ← 0
			     WIDTH ← 500
			     HEIGHT ← 200)
		     "File Properties")
	    (WINDOWPROP WINDOW (QUOTE BROWSERINFOW)
			FILEBROWSERINFOW))
          (WINDOWPROP FILEBROWSERINFOW (QUOTE SCROLLFN)
		      (QUOTE SCROLLBYREPAINTFN))
          [WINDOWPROP FILEBROWSERINFOW (QUOTE EXTENT)
		      (create REGION
			      LEFT ← 0
			      BOTTOM ←(IDIFFERENCE (DSPYPOSITION NIL FILEBROWSERINFOW)
						   (FONTPROP FILEBROWSERINFOW (QUOTE DESCENT)))
			      HEIGHT ←(IPLUS (FONTPROP FILEBROWSERINFOW (QUOTE HEIGHT))
					     (FONTPROP FILEBROWSERINFOW (QUOTE DESCENT]
          (RETURN FILEBROWSERINFOW])

(FRENAMEFILECOMMAND
  [LAMBDA (FILEENTRY)                                        (* SDG "23-JUL-83 10:53")
    (PROG (TOFILE)
          (CLRPROMPT)
          (SETQ FILEENTRY (FGETFILENAME FILEENTRY))
          (PROMPTPRINT (CONCAT "New name for " FILEENTRY "?
  (Enter NIL to ABORT  "))
          (SETQ TOFILE (CAR (PROCESS.READ PROMPTWINDOW)))
          (if (NULL TOFILE)
	      then (CLRPROMPT)
		   (RETURN))
          (SETQ TOFILE (\ADD.CONNECTED.DIR TOFILE))
          (RENAMEFILE FILEENTRY TOFILE)
          (CLRPROMPT)
          (PROMPTPRINT (CONCAT "file renamed " TOFILE))
          (RETURN TOFILE])

(FBROWSERIGHT
  [LAMBDA (WINDOW)                                           (* SDG " 7-APR-83 08:25")
    (COND
      ((IGREATERP (LASTMOUSEX WINDOW)
		  30)
	(DOWINDOWCOM WINDOW))
      (T (FBROWSESELECT WINDOW])

(FBROWSESELECT
  [LAMBDA (WINDOW)                                           (* SDG "22-JUL-83 12:29")
    (PROG (BROWSERITEMMAP FOLDER SETSEL ADDSEL EXTEND CURRENT#S FOLDER# FIRST# LAST#)
          (OR (SETQ SETSEL (MOUSESTATE LEFT))
	      (SETQ ADDSEL (LASTMOUSESTATE MIDDLE))
	      (SETQ EXTEND (LASTMOUSESTATE RIGHT))
	      (RETURN))
          (SETQ BROWSERITEMMAP (WINDOWPROP WINDOW (QUOTE BROWSERITEMMAP)))
          (SETQ FOLDER (FINDFOLDER WINDOW))
          (COND
	    ((NULL FOLDER)
	      (RETURN)))
          (COND
	    (SETSEL (for FOLDER# in (WINDOWPROP WINDOW (QUOTE CURRENTFOLDERNUMBERS))
		       do (FMAKEFOLDERUNSELECTED (CAR (NTH BROWSERITEMMAP FOLDER#))
						 WINDOW))
		    (FMAKEFOLDERSELECTED FOLDER WINDOW))
	    [ADDSEL (COND
		      ((fetch (BrowserRec SELECTED?) of FOLDER)
			(FMAKEFOLDERUNSELECTED FOLDER WINDOW))
		      (T (FMAKEFOLDERSELECTED FOLDER WINDOW]
	    (EXTEND                                          (* have to find all the messages between FOLDER and the 
							     one selected *)
		    (COND
		      ([SETQ CURRENT#S (SORT (WINDOWPROP WINDOW (QUOTE CURRENTFOLDERNUMBERS]
			(SETQ FOLDER# (fetch (BrowserRec #) of FOLDER))
			[COND
			  [(ILESSP FOLDER# (CAR CURRENT#S))
                                                             (* before *)
			    (SETQ FIRST# FOLDER#)
			    (SETQ LAST# (SUB1 (CAR CURRENT#S]
			  (T (SETQ LAST# FOLDER#)            (* after *)
			     (SETQ FIRST# (ADD1 (CAR (LAST CURRENT#S]
			(for I from FIRST# to LAST# do (FMAKEFOLDERSELECTED (CAR (NTH BROWSERITEMMAP 
										      I))
									    WINDOW])

(FDOEDITCOMMAND
  [LAMBDA (FILEENTRY KEY WINDOW)                             (* SDG " 2-AUG-83 09:14")
    (PROG ((FILE (FGETFILENAME FILEENTRY)))
          (if (EQ KEY (QUOTE MIDDLE))
	      then (SELECTQ [MENU (OR FEDITOPS (SETQ FEDITOPS (create MENU
								      MENUFONT ← DEFAULTBROWSERFONT
								      ITEMS ←(QUOTE
									((TEDIT (QUOTE TEDIT)
										
								  "Calls TEDIT on selected files")
									  (DEDIT (QUOTE DEDIT)
										 
								  "Calls DEDIT on selected files"]
			    (TEDIT (TEDIT FILE))
			    [DEDIT (if (FILEDATE FILE)
				       then (FEDITLISPFILE WINDOW FILE)
				     else (PROMPTPRINT (CONCAT FILE "is not a LISP file..Can't DEDIT"]
			    (RETURN))
	    else (if (FILEDATE FILE)
		     then (FEDITLISPFILE FILE WINDOW)
		   else (TEDIT FILE])

(FDOFILEBROWSERCOMMAND
  [LAMBDA (ITEM MENU KEY)                                    (* SDG " 3-AUG-83 08:37")
    (PROG (WINDOW FBUPDATE? FILELIST)
          (if FILEBROWSERBUSY
	      then (PROMPTPRINT "Only one command at a time may be executed")
		   (RETURN))
          (SETQ WINDOW (WINDOWPROP (WFROMMENU MENU)
				   (QUOTE MAINWINDOW)))
          (OR (FMEMB (CADR ITEM)
		     (QUOTE (Update Expunge)))
	      [SETQ FILELIST (for INDEX in (WINDOWPROP WINDOW (QUOTE CURRENTFOLDERNUMBERS))
				collect (CAR (NTH (WINDOWPROP WINDOW (QUOTE BROWSERITEMMAP))
						  INDEX]
	      (PROGN (PROMPTPRINT "No Files are selected")
		     (RETURN)))
          (RESETLST (RESETSAVE NIL (LIST (QUOTE SHADEITEM)
					 ITEM MENU FBITEMUNSELECTEDSHADE))
		    (RESETSAVE FILEBROWSERBUSY T)
		    (SHADEITEM ITEM MENU FBITEMSELECTEDSHADE)
		    (SELECTQ (CADR ITEM)
			     (Edit (for FILEENTRY in FILELIST do (FDOEDITCOMMAND FILEENTRY KEY WINDOW)
					))
			     (See (for FILEENTRY in FILELIST do (FDOSEECOMMAND FILEENTRY KEY)))
			     (Update (SETQ FBUPDATE? (FUPDATECOMMAND KEY WINDOW)))
			     (Delete (for FILEENTRY in FILELIST do (FDELCOMMAND FILEENTRY WINDOW)))
			     (Info (FPRINTFILEINFO WINDOW FILELIST))
			     (Undelete (for FILEENTRY in FILELIST do (FUNDELCOMMAND FILEENTRY WINDOW))
				       )
			     (Expunge (SETQ FBUPDATE? (FEXPNGFILECOMMAND WINDOW)))
			     (Copy (for FILEENTRY in FILELIST do (SETQ FBUPDATE? T)
				      when (FCOPYFILECOMMAND FILEENTRY)))
			     (Load (for FILEENTRY in FILELIST do (FLOADFILECOMMAND FILEENTRY KEY 
										   WINDOW)))
			     (Compile (for FILEENTRY in FILELIST do (FCOMPLFILECOMMAND FILEENTRY KEY 
										       WINDOW)))
			     (Hardcopy (for FILEENTRY in FILELIST do (FHARDCPYCOMMAND FILEENTRY KEY 
										      WINDOW)))
			     (Rename (for FILEENTRY in FILELIST do (SETQ FBUPDATE? T)
					when (FRENAMEFILECOMMAND FILEENTRY)))
			     (SHOULDNT))
		    (if FBUPDATE?
			then (FUPDATEBROWSERITEMS (FDIRECTORY (WINDOWPROP WINDOW (QUOTE ITEMSPEC)))
						  (QUOTE FSHORTFILENAME)
						  WINDOW])

(FDOSEECOMMAND
  [LAMBDA (FILEENTRY KEY)                                    (* SDG "29-JUL-83 10:37")
    (PROG ((FILE (FGETFILENAME FILEENTRY))
	   WINDOW)
          (if (AND (NULL (FILENAMEFIELD FILE (QUOTE NAME)))
		   (DIRECTORYNAMEP FILE))
	      then (FILEBROWSER (PACKFILENAME (QUOTE NAME)
					      (QUOTE *)
					      (QUOTE VERSION)
					      NIL
					      (QUOTE BODY)
					      FILE))
	    else (SETQ WINDOW (CREATEW NIL (CONCAT "Listing of file " FILE)))
		 (TTYDISPLAYSTREAM WINDOW)
		 (GIVE.TTY.PROCESS WINDOW)
		 (LISPX (LIST (QUOTE SEE)
			      FILE])

(FILEBROWSER
  [LAMBDA (ITEMLIST BROWSERWINDOW)                           (* SDG " 3-AUG-83 08:25")
    (PROG (MENU DIRSTART FILEBROWSERINFOW REGION)
          (if (NULL ITEMLIST)
	      then (RETURN))
          (if (LISTP ITEMLIST)
	      then [SETQ ITEMLIST (REMOVE NIL (for FILE in ITEMLIST
						 collect (CDAR (GETP (ROOTFILENAME FILE)
								     (QUOTE FILEDATES]
	    else (SETQ ITEMLIST (\ADD.CONNECTED.DIR ITEMLIST)))
          [SETQ MENU (OR FBMENU (SETQ FBMENU (create MENU
						     MENUFONT ← DEFAULTBROWSERFONT
						     ITEMS ←(QUOTE ((Edit Edit 
"Calls an editor on the selected files:
  DEDIT for LISP source & TEDIT for other files
  (Use MIDDLE mouse button to select options)")
								     (Delete Delete 
	      "Marks selected files for deletion:  
  (Use  EXPUNGE to remove files from system)")
								     (Undelete Undelete 
						       "Removes deletion mark for selected files")
								     (Expunge Expunge 
					      "Removes files marked for deletion from the system")
								     (Load Load 
			    "LOADs  selected files
  (Use MIDDLE mouse button to select options)")
								     (Compile Compile 
	   "Compiles selected  LISP source files:
   (Use MIDDLE mouse button to select options)")
								     (Copy Copy 
					  "Copies selected files:
   (Prompts for new file name)")
								     (Rename Rename 
					     "Renames selected files:
   (Prompts for new names)")
								     (See See 
						   "Displays selected files in typescript window")
								     (Update Update 
"Updates list of files satisfying selection pattern:
  (Use MIDDLE mouse button to select options)")
								     (Hardcopy Hardcopy 
							    "Produces hardcopy of selected files")
								     (Info Info 
						      "Displays information about selected files")))
						     CENTERFLG ← T
						     MENUROWS ← 4
						     WHENSELECTEDFN ←(FUNCTION (LAMBDA (Item Menu Key)
							 (Execute.As.Process
							   (FDOFILEBROWSERCOMMAND Item Menu Key)
							   (PACK (LIST (QUOTE FB-)
								       (CAR Item]
          (SETQ BROWSERWINDOW (MAKEMENUEDWINDOW MENU (if (ATOM ITEMLIST)
							 then (CONCAT "Files in group: " ITEMLIST)
						       else "File Browser")
						(QUOTE TOP)
						BROWSERWINDOW NIL DEFAULTBROWSERFONT))
          (WINDOWPROP BROWSERWINDOW (QUOTE SELECTBM)
		      (BITMAPCREATE (WINDOWPROP BROWSERWINDOW (QUOTE WIDTH))
				    (FONTHEIGHT BROWSERWINDOW)))
          (WINDOWPROP BROWSERWINDOW (QUOTE BROWSERFONT)
		      DEFAULTBROWSERFONT)
          (WINDOWPROP BROWSERWINDOW (QUOTE BUTTONEVENTFN)
		      (FUNCTION FBROWSEBUTTON))
          (WINDOWPROP BROWSERWINDOW (QUOTE RIGHTBUTTONFN)
		      (FUNCTION FBROWSERIGHT))
          (WINDOWPROP BROWSERWINDOW (QUOTE SCROLLFN)
		      (FUNCTION SCROLLBYREPAINTFN))
          (WINDOWPROP BROWSERWINDOW (QUOTE REPAINTFN)
		      (FUNCTION FBROWSEREPAINTFN))
          (WINDOWPROP BROWSERWINDOW (QUOTE CURSORMOVEDFN)
		      (FUNCTION FBROWSEMOVEDFN))
          (WINDOWPROP BROWSERWINDOW (QUOTE CURSOROUTFN)
		      (FUNCTION FBROWSEOUTFN))
          [WINDOWADDPROP BROWSERWINDOW (QUOTE RESHAPEFN)
			 (FUNCTION (LAMBDA (W)
			     (REDISPLAYW W]
          (WINDOWPROP BROWSERWINDOW (QUOTE BROWSERINFOW)
		      (SETQ FILEBROWSERINFOW
			(CREATEW (SETQ REGION (create REGION
						      BOTTOM ←(IABS
							(IDIFFERENCE (fetch BOTTOM
									of (WINDOWPROP BROWSERWINDOW
										       (QUOTE REGION))
									    )
								     250))
						      LEFT ←(IABS (IDIFFERENCE
								    (fetch LEFT
								       of (WINDOWPROP BROWSERWINDOW
										      (QUOTE REGION)))
								    150))
						      WIDTH ← 500
						      HEIGHT ← 200))
				 "File Properties" NIL T)))
          (if (OR (ILESSP (fetch BOTTOM of REGION)
			  0)
		  (ILESSP (fetch LEFT of REGION)
			  0))
	      then                                           (* Info window is off the edge of the screen;
							     let the user move it someplace else.)
		   (MOVEW FILEBROWSERINFOW))
          [WINDOWADDPROP BROWSERWINDOW (QUOTE CLOSEFN)
			 (FUNCTION (LAMBDA (W)
			     (CLOSEW (WINDOWPROP W (QUOTE BROWSERINFOW]
          [WINDOWADDPROP BROWSERWINDOW (QUOTE OPENFN)
			 (FUNCTION (LAMBDA (W)
			     (OPENW (WINDOWPROP W (QUOTE BROWSERINFOW]
          (WINDOWPROP BROWSERWINDOW (QUOTE ITEMSPEC)
		      ITEMLIST)
          (if (ATOM ITEMLIST)
	      then (SETQ DIRSTART (LISTGET (UNPACKFILENAME ITEMLIST)
					   (QUOTE DIRECTORY)))
		   (WINDOWPROP BROWSERWINDOW (QUOTE DIRSTART)
			       (if DIRSTART
				   then (PLUS (NCHARS DIRSTART)
					      2)
				 else 1))
		   (FUPDATEBROWSERITEMS (FDIRECTORY ITEMLIST)
					(FUNCTION FSHORTFILENAME)
					BROWSERWINDOW)
	    else (WINDOWPROP BROWSERWINDOW (QUOTE DIRSTART)
			     1)
		 (FUPDATEBROWSERITEMS (SORT ITEMLIST)
				      (FUNCTION [LAMBDA (X)
					  X])
				      BROWSERWINDOW))
          (RETURN BROWSERWINDOW])

(FINDFOLDER
  [LAMBDA (WINDOW)                                           (* SDG "22-JUL-83 12:36")
    (for FOLDER in (WINDOWPROP WINDOW (QUOTE BROWSERITEMMAP))
       bind [YPOS ←(IPLUS (LASTMOUSEY WINDOW)
			  (FONTPROP WINDOW (QUOTE DESCENT]
       thereis (IGREATERP YPOS (fetch BOTTOM of (fetch (BrowserRec ITEMREGION) of FOLDER])

(FMAKEFOLDERSELECTED
  [LAMBDA (FOLDER WINDOW)                                    (* SDG " 7-APR-83 08:48")
    (COND
      (FOLDER (replace (BrowserRec SELECTED?) of FOLDER with T)
	      (WINDOWADDPROP WINDOW (QUOTE CURRENTFOLDERNUMBERS)
			     (fetch (BrowserRec #) of FOLDER))
	      [WINDOWPROP WINDOW (QUOTE CURRENTFOLDERNUMBERS)
			  (SORT (WINDOWPROP WINDOW (QUOTE CURRENTFOLDERNUMBERS]
	      (FMARKFOLDERSELECTED FOLDER WINDOW])

(FMAKEFOLDERUNSELECTED
  [LAMBDA (MSG WINDOW)                                       (* SDG " 7-APR-83 08:48")
    (COND
      (MSG (replace (BrowserRec SELECTED?) of MSG with NIL)
	   [WINDOWPROP WINDOW (QUOTE CURRENTFOLDERNUMBERS)
		       (REMOVE (fetch (BrowserRec #) of MSG)
			       (WINDOWPROP WINDOW (QUOTE CURRENTFOLDERNUMBERS]
	   (FMARKFOLDERUNSELECTED MSG WINDOW])

(FMAKESEEWINDOW
  [LAMBDA (FILE)                                             (* SDG "29-JUL-83 10:04")
    (PROG (WINDOW (COREFILE (QUOTE {CORE}SEEFILE)))
          (SETQ WINDOW (CREATEW NIL (CONCAT "Listing of file " FILE)))
          (WINDOWPROP WINDOW (QUOTE REPAINTFN)
		      (FUNCTION FSEEREPAINTFN))
          (WINDOWPROP WINDOW (QUOTE RESHAPEFN)
		      (FUNCTION FSEERESHAPEFN))
          (WINDOWPROP WINDOW (QUOTE SCROLLFN)
		      (FUNCTION SCROLLBYREPAINTFN))
          (COPYALLBYTES FILE COREFILE)
          (WINDOWPROP WINDOW (QUOTE FILE)
		      COREFILE)
          (RETURN WINDOW])

(FCHANGEFOLDERMARK
  [LAMBDA (FOLDER WINDOW)                                    (* SDG "22-JUL-83 14:29")
    (PROG ((FOLDERREGION (fetch ITEMREGION of FOLDER)))
          (BITBLT NIL 0 0 WINDOW (fetch LEFT of FOLDERREGION)
		  (IPLUS (fetch BOTTOM of FOLDERREGION)
			 (IQUOTIENT (FONTPROP WINDOW (QUOTE ASCENT))
				    2)
			 2)
		  (fetch WIDTH of FOLDERREGION)
		  2
		  (QUOTE TEXTURE)
		  (QUOTE INVERT)
		  BLACKSHADE])

(FCHANGESELMARK
  [LAMBDA (FOLDER WINDOW)                                    (* SDG "22-JUL-83 13:25")
    (PROG ((FOLDERREGION (fetch ITEMREGION of FOLDER)))
          (BITBLT NIL 0 0 WINDOW (fetch LEFT of FOLDERREGION)
		  (fetch BOTTOM of FOLDERREGION)
		  (fetch WIDTH of FOLDERREGION)
		  2
		  (QUOTE TEXTURE)
		  (QUOTE INVERT)
		  GRAYSHADE])

(FCOMPLFILECOMMAND
  [LAMBDA (FILEENTRY KEY WINDOW)                             (* SDG "29-JUL-83 09:29")
    (PROG [(FILE (FGETFILENAME FILEENTRY))
	   (COMPILEOP (if (EQ KEY (QUOTE MIDDLE))
			  then [MENU (OR FCOMPILEOPS (SETQ FCOMPILEOPS
					   (create MENU
						   MENUFONT ← DEFAULTBROWSERFONT
						   ITEMS ←(QUOTE ((TCOMPL (QUOTE TCOMPL)
									  
								  "Does TCOMPL on selected files")
								   (BCOMPL (QUOTE BCOMPL)
									   
								  "Does BCOMPL on selected files"]
			else (QUOTE TCOMPL]
          (if (NULL COMPILEOP)
	      then (RETURN))
          (if (FILEDATE FILE)
	      then (SETQ WINDOW (OR (WINDOWPROP WINDOW (QUOTE BROWSERINFOW))
				    (FOPENINFOW WINDOW)))
		   (RESETLST (RESETSAVE NIL (LIST (QUOTE CLOSEW)
						  WINDOW))
			     (WINDOWPROP WINDOW (QUOTE TITLE)
					 (CONCAT COMPILEOP " on file " FILE))
			     (CLEARW WINDOW)
			     (TTYDISPLAYSTREAM WINDOW)
			     (GIVE.TTY.PROCESS WINDOW)
			     (LISPX (LIST COMPILEOP (KWOTE FILE)))
			     (DISMISS 5000))
	    else (PROMPTPRINT (CONCAT "Can't Compile" FILE])

(FCOPYFILECOMMAND
  [LAMBDA (FILEENTRY)                                        (* SDG "23-JUL-83 10:54")
    (PROG (TOFILE)
          (CLRPROMPT)
          (SETQ FILEENTRY (FGETFILENAME FILEENTRY))
          (PROMPTPRINT (CONCAT "Copy file " FILEENTRY " where?
  (ENTER NIL to ABORT)  "))
          (SETQ TOFILE (CAR (PROCESS.READ PROMPTWINDOW)))
          (if (NULL TOFILE)
	      then (CLRPROMPT)
		   (RETURN))
          (SETQ TOFILE (\ADD.CONNECTED.DIR TOFILE))
          (COPYFILE FILEENTRY TOFILE)
          (CLRPROMPT)
          (PROMPTPRINT (CONCAT "file copied to " TOFILE))
          (RETURN TOFILE])

(FMARKFOLDERSELECTED
  [LAMBDA (FOLDER WINDOW)                                    (* SDG " 9-MAR-83 15:26")
    (\ITEMW.SELECTITEM (LIST (fetch ITEMREGION of FOLDER))
		       WINDOW])

(FMARKFOLDERUNSELECTED
  [LAMBDA (FOLDER WINDOW)                                    (* SDG " 9-MAR-83 15:26")
    (\ITEMW.DESELECTITEM (LIST (fetch ITEMREGION of FOLDER))
			 WINDOW])

(FPRINTFILEINFO
  [LAMBDA (WINDOW FILELST)                                   (* SDG " 3-AUG-83 10:36")
    (PROG ((FILEBROWSERINFOW (WINDOWPROP WINDOW (QUOTE BROWSERINFOW)))
	   (DIRSTART (WINDOWPROP WINDOW (QUOTE DIRSTART)))
	   ITEMSPEC ATTRS)
          (COND
	    ((NULL FILELST)
	      (RETURN NIL))
	    ((NULL FILEBROWSERINFOW)
	      (FOPENINFOW WINDOW))
	    (T (WINDOWPROP FILEBROWSERINFOW (QUOTE TITLE)
			   "File Properties")
	       (CLEARW FILEBROWSERINFOW)))
          (SETQ ITEMSPEC (WINDOWPROP WINDOW (QUOTE ITEMSPEC)))
          (SETQ DIRSTART (if (ATOM ITEMSPEC)
			     then (SETQ DIRSTART (LISTGET (UNPACKFILENAME ITEMSPEC)
							  (QUOTE DIRECTORY)))
				  (if DIRSTART
				      then (PLUS (NCHARS DIRSTART)
						 2)
				    else 1)
			   else 1))
          (printout FILEBROWSERINFOW # (DSPFONT DEFAULTBROWSERFONT (OUTPUT))
		    "Name" # (DSPXPOSITION 148 FILEBROWSERINFOW)
		    "Size" # (DSPXPOSITION 235 FILEBROWSERINFOW)
		    "Created" # (DSPXPOSITION 375 FILEBROWSERINFOW)
		    "Last Written" T T)
          (for FILE in FILELST
	     do [SETQ ATTRS (OR (fetch (BrowserRec FILEINFO) of FILE)
				(replace (BrowserRec FILEINFO) of FILE
				   with (for ATTR in (QUOTE (LENGTH CREATIONDATE WRITEDATE))
					   collect (if (INFILEP (FGETFILENAME FILE))
						       then (GETFILEINFO (FGETFILENAME FILE)
									 ATTR)
						     else (GETFILEINFO (ROOTFILENAME (FGETFILENAME
										       FILE))
								       ATTR]
		(printout FILEBROWSERINFOW (FILENAMEFIELD (FGETFILENAME FILE)
							  (QUOTE NAME))
			  "."
			  (OR (FILENAMEFIELD (FGETFILENAME FILE)
					     (QUOTE EXTENSION))
			      "")
			  ";"
			  (OR (FILENAMEFIELD (FGETFILENAME FILE)
					     (QUOTE VERSION))
			      "")
			  #
			  (DSPXPOSITION 140 FILEBROWSERINFOW)
			  " "
			  (CAR ATTRS)
			  #
			  (DSPXPOSITION 208 FILEBROWSERINFOW)
			  (CADR ATTRS)
			  #
			  (DSPXPOSITION 358 FILEBROWSERINFOW)
			  (CADDR ATTRS)
			  T])

(FPROMPTEDIT
  [LAMBDA (EXPRS WINDOW PRINTFN)           (* SDG "28-JUL-83 20:19")
    (OR PRINTFN (SETQ PRINTFN TTYINPRINTFN))
    (RESETLST (RESETSAVE (CURSOR DEFAULTCURSOR))
              (TTYDISPLAYSTREAM WINDOW)
              (GIVE.TTY.PROCESS WINDOW)    (* Make sure we have something to point
                                           with)
              (TTYIN TTYINEDITPROMPT NIL NIL (QUOTE LISPXREAD)
                     NIL NIL EXPRS EDITRDTBL])

(FSEEREPAINTFN
  [LAMBDA (WINDOW REGION)                                    (* SDG "29-JUL-83 10:26")
    (PROG [(FILE (OPENFILE (WINDOWPROP WINDOW (QUOTE FILE))
			   (QUOTE INPUT]
          (MOVETO (WINDOWPROP WINDOW (QUOTE XORIG))
		  (WINDOWPROP WINDOW (QUOTE YORIG))
		  WINDOW)
          (COPYBYTES FILE WINDOW)
          (CLOSEF FILE])

(FSEERESHAPEFN
  [LAMBDA (WINDOW)                                           (* SDG "29-JUL-83 10:06")
    (PROG (BTM)
          (DSPRESET WINDOW)
          (WINDOWPROP WINDOW (QUOTE XORIG)
		      (DSPXPOSITION NIL WINDOW))
          (WINDOWPROP WINDOW (QUOTE YORIG)
		      (DSPYPOSITION NIL WINDOW))
          (FSEEREPAINTFN WINDOW)
          (WINDOWPROP WINDOW (QUOTE EXTENT)
		      (create REGION
			      LEFT ← 0
			      BOTTOM ←[SETQ BTM (IPLUS (DSPYPOSITION NIL WINDOW)
						       (FONTPROP WINDOW (QUOTE ASCENT]
			      WIDTH ←(WINDOWPROP WINDOW (QUOTE WIDTH))
			      HEIGHT ←(IDIFFERENCE (WINDOWPROP WINDOW (QUOTE HEIGHT))
						   BTM])

(FSHORTFILENAME
  [LAMBDA (FILE DIRSTART)                                    (* SDG " 3-AUG-83 10:39")
    (PROG (DIRPART)
          (SETQ FILE (UNPACKFILENAME FILE))
          (SETQ DIRPART (LISTGET FILE (QUOTE DIRECTORY)))
          [if DIRPART
	      then (SETQ DIRPART (SUBSTRING DIRPART DIRSTART (NCHARS DIRPART]
          (RETURN (if DIRPART
		      then (PACKFILENAME (QUOTE DIRECTORY)
					 DIRPART
					 (QUOTE NAME)
					 (LISTGET FILE (QUOTE NAME))
					 (QUOTE EXTENSION)
					 (LISTGET FILE (QUOTE EXTENSION))
					 (QUOTE VERSION)
					 (LISTGET FILE (QUOTE VERSION)))
		    else (PACKFILENAME (QUOTE NAME)
				       (LISTGET FILE (QUOTE NAME))
				       (QUOTE EXTENSION)
				       (LISTGET FILE (QUOTE EXTENSION))
				       (QUOTE VERSION)
				       (LISTGET FILE (QUOTE VERSION])

(FPRINTHEADER
  [LAMBDA (ITEM ITEMMAP ITEMCOUNT WINDOW BROWSERFONT)        (* SDG " 7-APR-83 08:15")
    (DECLARE (SPECVARS MAXWIDTH))
    (printout WINDOW # (DSPFONT DEFAULTBROWSERFONT (OUTPUT))
	      3 .I4 ITEMCOUNT 8 # (DSPFONT BROWSERFONT (OUTPUT))
	      ITEM T)

          (* keep track of maximum width printed to. If header is allowed to print on two lines, MAXWIDTH was set to right 
	  margin by MAKEBROWSERWINDOW so this should not reset it.)


    (COND
      ((fetch (BrowserRec SELECTED?) of ITEMMAP)
	(FMARKFOLDERSELECTED ITEMMAP WINDOW)))
    (COND
      ((fetch (BrowserRec DELETED?) of ITEMMAP)
	(FCHANGEFOLDERMARK ITEMMAP WINDOW)))
    (COND
      ((ILESSP MAXWIDTH (DSPXPOSITION NIL WINDOW))
	(SETQ MAXWIDTH (DSPXPOSITION NIL WINDOW])

(FUNDELCOMMAND
  [LAMBDA (FILEENTRY WINDOW)                                 (* SDG "23-JUL-83 08:21")
    (if (fetch (BrowserRec DELETED?) of FILEENTRY)
	then (FCHANGEFOLDERMARK FILEENTRY WINDOW)
	     (replace (BrowserRec DELETED?) of FILEENTRY with NIL])

(FUPDATEBROWSERITEMS
  [LAMBDA (ITEMLIST ITEMPRINTFN WINDOW)                      (* SDG " 8-JUL-83 14:10")
    (PROG [MAXWIDTH DIRSTART NEWBROWSERITEM BROWSERITEMMAP (BROWSERFONT (WINDOWPROP WINDOW
										    (QUOTE 
										      BROWSERFONT]
          (DECLARE (SPECVARS MAXWIDTH))
          (DSPRIGHTMARGIN 10000 WINDOW)
          (LINELENGTH 1000 WINDOW)                           (* printing headers to arbitrary width, MAXWIDTH is set 
							     by PRINTHEADER.)
          (SETQ MAXWIDTH (COND
	      [(WINDOWPROP WINDOW (QUOTE EXTENT))
		(fetch WIDTH of (WINDOWPROP WINDOW (QUOTE EXTENT]
	      (T 0)))
          (CLEARW WINDOW)
          (SETQ DIRSTART (WINDOWPROP WINDOW (QUOTE DIRSTART)))
          (SETQ BROWSERITEMMAP (for ITEM in ITEMLIST as ITEMCOUNT from 1
				  collect ((SETQ NEWBROWSERITEM
					     (create BrowserRec
						     USERDATA ← ITEM
						     # ← ITEMCOUNT
						     ITEMREGION ←(FBROWSERPRINTANDBOX (APPLY* 
										      ITEMPRINTFN 
											     ITEM 
											 DIRSTART)
										      WINDOW 30 10)
						     SELECTED? ← NIL
						     DELETED? ← NIL
						     FILEINFO ← NIL))
					   NEWBROWSERITEM)))
          (WINDOWPROP WINDOW (QUOTE BROWSERSTATE)
		      (QUOTE SELECT))
          (WINDOWPROP WINDOW (QUOTE BROWSERITEMMAP)
		      BROWSERITEMMAP)
          (WINDOWPROP WINDOW (QUOTE BROWSERITEMPRINTFN)
		      ITEMPRINTFN)
          [WINDOWPROP WINDOW (QUOTE EXTENT)
		      (create REGION
			      LEFT ← 0
			      BOTTOM ←(IDIFFERENCE (DSPYPOSITION NIL WINDOW)
						   (FONTPROP WINDOW (QUOTE DESCENT)))
			      WIDTH ← MAXWIDTH
			      HEIGHT ←(IPLUS (IDIFFERENCE (OR (fetch BOTTOM
								 of (fetch (BrowserRec ITEMREGION)
								       of (CAR BROWSERITEMMAP)))
							      (DSPYPOSITION NIL WINDOW))
							  (DSPYPOSITION NIL WINDOW))
					     (FONTPROP WINDOW (QUOTE HEIGHT))
					     (FONTPROP WINDOW (QUOTE DESCENT]
          (WINDOWPROP WINDOW (QUOTE CURRENTFOLDERNUMBERS)
		      NIL)
          (WINDOWPROP WINDOW (QUOTE CURRENTITEM)
		      NIL])

(FUPDATECOMMAND
  [LAMBDA (KEY WINDOW)                                       (* SDG "25-JUL-83 16:31")
    (SELECTQ (if (EQ KEY (QUOTE MIDDLE))
		 then [MENU (OR FUPDATEOPS (SETQ FUPDATEOPS (create MENU
								    MENUFONT ← DEFAULTBROWSERFONT
								    ITEMS ←(QUOTE
								      ((Update (QUOTE UPDATE)
									       
						"Updates browser using current selection pattern")
									(NewPattern (QUOTE NEWPATTERN)
										    
					"Prompts for a new selection pattern and updates browser"]
	       else (QUOTE UPDATE))
	     (UPDATE T)
	     (NEWPATTERN (FNEWPTRNCOMMAND WINDOW))
	     NIL])
)
[DECLARE: EVAL@COMPILE 

(RECORD BrowserRec (USERDATA ITEMREGION # SELECTED? DELETED? FILEINFO))
]
(DEFINEQ

(Execute.As.Process
  [NLAMBDA (call title)                                      (* SDG "28-JUL-83 10:10")
    (ADD.PROCESS [CONS (CAR call)
		       (for arg in (CDR call) collect (KWOTE (EVAL arg]
		 (QUOTE NAME)
		 (EVAL title])
)
(RPAQ RIGHTARROWCURSOR (CURSORCREATE (READBITMAP) 7 9))
(16 16
"@@@@"
"@@@@"
"@F@@"
"@GH@"
"@GN@"
"@GOH"
"OOON"
"OOOO"
"OOON"
"@GOH"
"@GN@"
"@GH@"
"@F@@"
"@@@@"
"@@@@"
"@@@@")(DECLARE: EVAL@COMPILE 

(RPAQQ MarkXPos 10)

(CONSTANTS (MarkXPos 10))
)

(RPAQ SELECTBM (READBITMAP))
(10 10
"L@@@"
"O@@@"
"OL@@"
"OO@@"
"OOL@"
"OOL@"
"OO@@"
"OL@@"
"O@@@"
"L@@@")

(ADDTOVAR LISPXMACROS [FB (FILEBROWSER (OR (CAAR LISPXLINE NIL)
					   (CAR LISPXLINE)
					   (PROGN (PROMPTPRINT 
						"Enter Specification Pattern 
  (NIL to ABORT)  ")
						  (CAR (PROCESS.READ PROMPTWINDOW])
(FILESLOAD (COMPILED SYSLOAD)
	   MENUEDWINDOW TEDIT DPUPFTP BSP)
(DECLARE: DONTEVAL@LOAD DOEVAL@COMPILE DONTCOPY COMPILERVARS 

(ADDTOVAR NLAMA )

(ADDTOVAR NLAML Execute.As.Process)

(ADDTOVAR LAMA )
)
(PUTPROPS FILEBROWSER COPYRIGHT ("Xerox Corporation" 1983))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (2201 37497 (FBROWSEBUTTON 2211 . 2821) (FBROWSEMOVEDFN 2823 . 3068) (FBROWSEOUTFN 3070
 . 3210) (FBROWSEREPAINTFN 3212 . 4614) (FBROWSERPRINTANDBOX 4616 . 6598) (FDELCOMMAND 6600 . 6889) (
FDIRECTORY 6891 . 7278) (FEDITLISPFILE 7280 . 8183) (FEXPNGFILECOMMAND 8185 . 8718) (FGETFILENAME 8720
 . 8877) (FHARDCPYCOMMAND 8879 . 9599) (FLOADFILECOMMAND 9601 . 10730) (FNEWPTRNCOMMAND 10732 . 12246)
 (FOPENINFOW 12248 . 13087) (FRENAMEFILECOMMAND 13089 . 13717) (FBROWSERIGHT 13719 . 13943) (
FBROWSESELECT 13945 . 15627) (FDOEDITCOMMAND 15629 . 16477) (FDOFILEBROWSERCOMMAND 16479 . 18750) (
FDOSEECOMMAND 18752 . 19354) (FILEBROWSER 19356 . 24366) (FINDFOLDER 24368 . 24743) (
FMAKEFOLDERSELECTED 24745 . 25216) (FMAKEFOLDERUNSELECTED 25218 . 25626) (FMAKESEEWINDOW 25628 . 26233
) (FCHANGEFOLDERMARK 26235 . 26702) (FCHANGESELMARK 26704 . 27094) (FCOMPLFILECOMMAND 27096 . 28215) (
FCOPYFILECOMMAND 28217 . 28847) (FMARKFOLDERSELECTED 28849 . 29049) (FMARKFOLDERUNSELECTED 29051 . 
29250) (FPRINTFILEINFO 29252 . 31319) (FPROMPTEDIT 31321 . 31794) (FSEEREPAINTFN 31796 . 32146) (
FSEERESHAPEFN 32148 . 32818) (FSHORTFILENAME 32820 . 33649) (FPRINTHEADER 33651 . 34454) (
FUNDELCOMMAND 34456 . 34752) (FUPDATEBROWSERITEMS 34754 . 36862) (FUPDATECOMMAND 36864 . 37495)) (
37601 37864 (Execute.As.Process 37611 . 37862)))))
STOP