(DEFINE-FILE-INFO §READTABLE "INTERLISP" §PACKAGE "INTERLISP") (FILECREATED " 2-Feb-87 10:38:19" {ERIS}LYRIC>PHONE-DIRECTORY.;1 9029 changes to%: (VARS PHONE-DIRECTORYCOMS) previous date%: " 9-Jan-87 19:45:25" {ERIS}KOTO>PHONE-DIRECTORY.;3) (* " Copyright (c) 1986, 1987 by Xerox Corporation. All rights reserved. ") (PRETTYCOMPRINT PHONE-DIRECTORYCOMS) (RPAQQ PHONE-DIRECTORYCOMS ((FNS Cache-Phone-Directory-Files Let-your-fingers-do-the-walking Phone-Directory-Kill-Proc Phone-Window-ButtonEventFn Lookup-Person Phone-Window-WhenOpenedFn) (VARS fingersIconMask fingersIconBM) (INITVARS (*Cached-Phone-Directory-Files* NIL) (*Phone-Directory-Pos* (create POSITION XCOORD _ 15 YCOORD _ (DIFFERENCE SCREENHEIGHT 75))) (*Phone-Directory-Region* (CREATEREGION 15 (DIFFERENCE SCREENHEIGHT 258 ) 400 250))) (GLOBALVARS *Cached-Phone-Directory-Files* *Phone-Directory-Pos* *Phone-Directory-Region* fingersIconMask fingersIconBM) (FILES GREP) (P (Let-your-fingers-do-the-walking)))) (DEFINEQ (Cache-Phone-Directory-Files [LAMBDA (msgStream) (* smL " 9-Jan-87 19:40") (* * Cache the phone directory files in core) (printout msgStream T "Caching phone directory files...") (LET ((oldFiles *Cached-Phone-Directory-Files*)) (SETQ *Cached-Phone-Directory-Files* (for file in (for f inside PHONELISTFILES collect (FINDFILE f)) bind localFile when (NOT (NULL file)) collect (printout msgStream T "Caching " file "...") (SETQ localFile (PACKFILENAME.STRING 'HOST 'CORE 'VERSION NIL 'BODY file)) (COPYFILE file localFile) localFile)) (for file in oldFiles do (DELFILE file))) (printout NIL "done" T T]) (Let-your-fingers-do-the-walking [LAMBDA NIL (* smL "21-Aug-86 14:08") (* * Create a directory lookup window) (LET ((w (CREATEW *Phone-Directory-Region* "Phone directory" NIL))) [WINDOWPROP w 'ICONFN (FUNCTION (LAMBDA (w icon) (OR icon (ICONW fingersIconBM fingersIconMask *Phone-Directory-Pos* T] (WINDOWADDPROP w 'OPENFN (FUNCTION Phone-Window-WhenOpenedFn)) (WINDOWADDPROP w 'EXPANDFN (FUNCTION Phone-Window-WhenOpenedFn)) (WINDOWADDPROP w 'CLOSEFN (FUNCTION Phone-Directory-Kill-Proc)) (WINDOWADDPROP w 'SHRINKFN (FUNCTION Phone-Directory-Kill-Proc)) (WINDOWPROP w 'BUTTONEVENTFN (FUNCTION Phone-Window-ButtonEventFn)) [WINDOWPROP w 'RIGHTBUTTONFN (FUNCTION (LAMBDA (w) (if (EQ (THIS.PROCESS) (WINDOWPROP w 'PROCESS)) then [ADD.PROCESS `(DOWINDOWCOM ,w] else (DOWINDOWCOM w] (SHRINKW w) w]) (Phone-Directory-Kill-Proc [LAMBDA (window) (* smL "21-Aug-86 13:05") (* * Kill the phone directory process associated with the window) (LET [(proc (WINDOWPROP window 'PROCESS] (if (PROCESSP proc) then (if (TTY.PROCESSP proc) then (TTY.PROCESS T)) (DEL.PROCESS proc]) (Phone-Window-ButtonEventFn [LAMBDA (w) (* smL " 1-Aug-86 09:37") (* * The button event fn for the phone directory lookup window -  if the user bugs in the title, lets them re-cache the phone list) (if [AND (NOT (MOUSESTATE UP)) (NOT (INSIDEP (DSPCLIPPINGREGION NIL w) (LASTMOUSEX w) (LASTMOUSEY w))) (MENU (LOADTIMECONSTANT (create MENU ITEMS _ '("Recache the directory files?"] then (Cache-Phone-Directory-Files PROMPTWINDOW]) (Lookup-Person [LAMBDA (w) (* smL "21-Aug-86 13:46") (* * The main program for the Phone-Directory) (OPENW w) (TTYDISPLAYSTREAM w) (TTY.PROCESS (THIS.PROCESS)) (OR *Cached-Phone-Directory-Files* (Cache-Phone-Directory-Files T)) (bind name do (TERPRI) (SETQ name (TTYIN "Name: " NIL NIL '(STRING NORAISE) NIL NIL NIL NIL)) (if (NOT (NULL name)) then (GREP name *Cached-Phone-Directory-Files*)) until (NOT (OPENWP w]) (Phone-Window-WhenOpenedFn [LAMBDA (w) (* smL "21-Aug-86 13:21") (* * The OPENFN for the Phone lookup window) (if (WINDOWPROP w 'PROCESS) then (TTY.PROCESS (WINDOWPROP w 'PROCESS)) else (OPENW w) (ADD.PROCESS `(Lookup-Person ,w) 'NAME 'Lookup-Person 'WINDOW w]) ) (RPAQQ fingersIconMask #*(57 62)AOOOOOOOOOOOOL@@GOOOOOOOOOOOOO@@GOOOOOOOOOOOOO@@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OOOOOOOOOOOOOOH@OO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@@@@CN@@@@@CH@N@@@@@@@@@@@@CH@N@@@@@@@@@@@@CH@N@@@@@@@@@@@@CH@G@@@@@@@@@@@@G@@GOOOOOOOOOOOOO@@COOOOOOOOOOOON@@@OOOOOOOOOOOOH@@ ) (RPAQ? *Cached-Phone-Directory-Files* NIL) (RPAQ? *Phone-Directory-Pos* (create POSITION XCOORD _ 15 YCOORD _ (DIFFERENCE SCREENHEIGHT 75))) (RPAQ? *Phone-Directory-Region* (CREATEREGION 15 (DIFFERENCE SCREENHEIGHT 258) 400 250)) (DECLARE%: DOEVAL@COMPILE DONTCOPY (GLOBALVARS *Cached-Phone-Directory-Files* *Phone-Directory-Pos* *Phone-Directory-Region* fingersIconMask fingersIconBM) ) (FILESLOAD GREP) (Let-your-fingers-do-the-walking) (PUTPROPS PHONE-DIRECTORY COPYRIGHT ("Xerox Corporation" 1986 1987)) (DECLARE%: DONTCOPY (FILEMAP (NIL (1649 6373 (Cache-Phone-Directory-Files 1659 . 2954) (Let-your-fingers-do-the-walking 2956 . 4251) (Phone-Directory-Kill-Proc 4253 . 4684) (Phone-Window-ButtonEventFn 4686 . 5362) ( Lookup-Person 5364 . 5976) (Phone-Window-WhenOpenedFn 5978 . 6371))))) STOP