(DEFINE-FILE-INFO READTABLE "INTERLISP" PACKAGE "INTERLISP")
(FILECREATED " 1-Oct-87 13:40:16" {ERINYES}<LISPUSERS>LYRIC>HELPSYS.;4 16138  

      changes to%:  (FUNCTIONS IRM.LOAD-GRAPH)

      previous date%: "14-Aug-87 17:39:39" {ERINYES}<LISPUSERS>LYRIC>HELPSYS.;3)


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

(PRETTYCOMPRINT HELPSYSCOMS)

(RPAQQ HELPSYSCOMS ((FILES DINFO HASH) (RECORDS IRMREFERENCE) (DECLARE%: EVAL@COMPILE DONTCOPY (FILES (LOADCOMP) DINFO HASH)) (COMS (COMMANDS "man") (FNS HELPSYS IRM.LOOKUP IRM.SMART.LOOKUP IRM.RESET) (INITVARS (IRM.HOST&DIR) (IRM.HASHFILE.NAME)) (GLOBALVARS IRM.HOST&DIR IRM.HASHFILE.NAME) (DECLARE%: DONTEVAL@LOAD DOCOPY (P (MOVD (QUOTE HELPSYS) (QUOTE XHELPSYS) NIL T)))) (COMS (* ;;; "Interface to DInfo") (FNS IRM.GET.DINFOGRAPH IRM.DISPLAY.REF) (FUNCTIONS IRM.LOAD-GRAPH) (ADDVARS (DINFO.GRAPHS ("Interlisp-D Reference Manual" (IRM.GET.DINFOGRAPH T)))) (INITVARS (IRM.DINFOGRAPH)) (GLOBALVARS IRM.DINFOGRAPH) (DECLARE%: DONTEVAL@LOAD DOCOPY (P (COND (IRM.HOST&DIR (SETQ IRM.DINFOGRAPH (IRM.LOAD-GRAPH)))))) (* ;;; "Cross reference imageobj") (FNS IRM.DISPLAY.CREF IRM.CREF.BOX IRM.PUT.CREF IRM.GET.CREF IRM.CREF.BUTTONEVENTFN) (INITVARS (IRM.CREF.FONT (FONTCREATE (QUOTE MODERN) 8 (QUOTE MRR))) (\IRM.CREF.IMAGEFNS (IMAGEFNSCREATE (FUNCTION IRM.DISPLAY.CREF) (FUNCTION IRM.CREF.BOX) (FUNCTION IRM.PUT.CREF) (FUNCTION IRM.GET.CREF) (FUNCTION NILL) (FUNCTION IRM.CREF.BUTTONEVENTFN)))) (GLOBALVARS IRM.CREF.FONT \IRM.CREF.IMAGEFNS)) (COMS (* ;;; "Internal functions and variables") (FNS \IRM.GET.REF \IRM.SMART.REF \IRM.CHOOSE.REF \IRM.WILD.REF \IRM.WILDCARD \IRM.WILD.MATCH \IRM.GET.HASHFILE \IRM.GET.KEYWORDS) (INITVARS (\IRM.HASHFILE) (\IRM.KEYWORDS)) (GLOBALVARS \IRM.HASHFILE \IRM.KEYWORDS) (FUNCTIONS \IRM.AROUND-EXIT) (ADDVARS (AROUNDEXITFNS \IRM.AROUND-EXIT))))
)
(FILESLOAD DINFO HASH)
(DECLARE%: EVAL@COMPILE

(RECORD IRMREFERENCE (* ;; "A reference to something in the IRM.  There is a list of these for each entry in the index of the IRM.  Each element of the list corresponds to one of the page references.  These lists are stored under the ITEM in a hash file. ")
 (TYPE (* ; "The type of index entry -- typically a capitalized symbol in IL, eg. il:|Functions|.  Yes, it's ugly.") ITEM (* ; "The name indexed") PRIMARYFLG (* ; "True iff this is the primary reference for this name/type") NODE (* ; "The ID of the node in the IRM DInfo graph containing this reference") CH# (* ; "The character number of the beginning of the reference.  If unspecified we search for the first existence of NAME in the text of the node."))
 (SYSTEM))
)
(DECLARE%: EVAL@COMPILE DONTCOPY 
(FILESLOAD (LOADCOMP) DINFO HASH)
)
(DEFCOMMAND "man" (ENTRY) "Lookup ENTRY in the IRM." (IRM.SMART.LOOKUP ENTRY))
(DEFINEQ

(HELPSYS
(LAMBDA (FN PROPS) (* drc%: "20-Jan-86 18:05") (if (NOT IRM.HOST&DIR) then (PROMPTPRINT "HELPSYS is unavailable.  Set IRM.HOST&DIR.") NIL else (SELECTQ PROPS (ARGS (* HELPSYS is called by SMARTARGLIST to get args, but this implementation does not support that.) NIL) (FromDEdit (* from ? under EditCom) (IRM.LOOKUP (if (LISTP FN) then (CAR FN) else FN)) NIL) (NIL (* called by TTYIN <actually XHELPSYS is...> when FN...? <CR> is typed.) (if (FGETD FN) then (IRM.LOOKUP FN (QUOTE Function)) elseif (for MACRO.TYPE in MACROPROPS thereis (GETPROP FN MACRO.TYPE)) then (IRM.LOOKUP FN (QUOTE Macro) IRMWINDOW) elseif (SELECTQ (CAR (GETPROP FN (QUOTE CLISPWORD))) (NIL) (FORWORD (IRM.LOOKUP FN (QUOTE I.S.Operator))) (RECORDTRAN (IRM.LOOKUP FN (QUOTE RecordOperator))) (PROGN (IRM.LOOKUP FN NIL))) else (BEEP))) NIL)))
)

(IRM.LOOKUP
(LAMBDA (KEYWORD TYPE GRAPH SMARTFLG) (* drc%: "17-Jan-86 14:09") (* * Does a lookup in the IRM index for KEYWORD (optionally of TYPE) and visits the DInfo node in GRAPH containing the reference. If SMARTFLG is non-NIL, wildcards will be enabled. GRAPH defaults to IRM.DINFOGRAPH.) (LET* ((GRAPH (if (type? DINFOGRAPH GRAPH) then GRAPH else (IRM.GET.DINFOGRAPH))) (KEYWORD (MKATOM (U-CASE KEYWORD))) (TYPE (MKATOM TYPE)) (WINDOW (fetch (DINFOGRAPH WINDOW) of GRAPH)) (MONITORLOCK (DINFOGRAPHPROP GRAPH (QUOTE MONITORLOCK)))) (OPENW WINDOW) (if (OBTAIN.MONITORLOCK MONITORLOCK T) then (RESETLST (RESETSAVE (TTYDISPLAYSTREAM (GETPROMPTWINDOW WINDOW))) (RESETSAVE NIL (LIST (QUOTE RELEASE.MONITORLOCK) MONITORLOCK)) (LET ((REF (if SMARTFLG then (\IRM.SMART.REF KEYWORD WINDOW) else (\IRM.GET.REF KEYWORD TYPE WINDOW)))) (AND REF (IRM.DISPLAY.REF REF GRAPH)))) else (FLASHWINDOW WINDOW))))
)

(IRM.SMART.LOOKUP
(LAMBDA (KEYWORD GRAPH) (* drc%: " 6-Jan-86 14:50") (IRM.LOOKUP KEYWORD NIL GRAPH T)))

(IRM.RESET
(LAMBDA NIL (* drc%: "27-Jan-86 11:19") (if (type? DINFOGRAPH IRM.DINFOGRAPH) then (LET ((W (fetch (DINFOGRAPH WINDOW) of IRM.DINFOGRAPH))) (OPENW W) (CLOSEW W))) (SETQ IRM.DINFOGRAPH) (CLOSEHASHFILE \IRM.HASHFILE) (SETQ \IRM.HASHFILE) (SETQ \IRM.KEYWORDS))
)
)

(RPAQ? IRM.HOST&DIR )

(RPAQ? IRM.HASHFILE.NAME )
(DECLARE%: DOEVAL@COMPILE DONTCOPY

(GLOBALVARS IRM.HOST&DIR IRM.HASHFILE.NAME)
)
(DECLARE%: DONTEVAL@LOAD DOCOPY 
(MOVD (QUOTE HELPSYS) (QUOTE XHELPSYS) NIL T)
)



(* ;;; "Interface to DInfo")

(DEFINEQ

(IRM.GET.DINFOGRAPH
(LAMBDA (FROM.BACKGROUND?) (* ; "Edited 14-Aug-87 17:31 by drc:") (* ;; "returns the DInfo graph for the IRM, ensuring that it has been setup.") (CL:UNLESS (TYPEP IRM.DINFOGRAPH (QUOTE DINFOGRAPH)) (* ;; "graph has not been loaded -- load it") (RESETFORM (TTYDISPLAYSTREAM PROMPTWINDOW) (SETQ IRM.DINFOGRAPH (IRM.LOAD-GRAPH)))) (CL:UNLESS (WINDOWP (fetch (DINFOGRAPH WINDOW) of IRM.DINFOGRAPH)) (* ;; "graph has not been set up -- set it up") (DINFO IRM.DINFOGRAPH (CREATEW (GETBOXREGION 540 400 NIL NIL NIL "Specify region for IRM DInfo window") "IRM DInfo Graph") T (NOT FROM.BACKGROUND?))) IRM.DINFOGRAPH)
)

(IRM.DISPLAY.REF
(LAMBDA (REF GRAPH) (* drc%: "18-Jan-86 17:17") (* * visit the DInfo node of GRAPH containing REF) (LET ((NODE (FASSOC (fetch (IRMREFERENCE NODE) of REF) (fetch (DINFOGRAPH NODELST) of GRAPH)))) (if NODE then (DINFO.UPDATE GRAPH NODE (LIST (fetch (IRMREFERENCE ITEM) of REF) (fetch (IRMREFERENCE CH#) of REF))) else (PRINTOUT (GETPROMPTWINDOW WINDOW) T "Node not found!"))))
)
)
(CL:DEFUN IRM.LOAD-GRAPH NIL (LET ((FILE (INFILEP (PACKFILENAME (QUOTE NAME) (QUOTE IRM) (QUOTE EXTENSION) (QUOTE DINFOGRAPH) (QUOTE BODY) IRM.HOST&DIR)))) (CL:IF FILE (DINFO.READ.GRAPH FILE) (PROG1 NIL (CL:WARN "IRM.DINFOGRAPH not found on ~S~%%Perhaps IL:IRM.HOST&DIR is set incorrectly" IRM.HOST&DIR)))))

(ADDTOVAR DINFO.GRAPHS ("Interlisp-D Reference Manual" (IRM.GET.DINFOGRAPH T)))

(RPAQ? IRM.DINFOGRAPH )
(DECLARE%: DOEVAL@COMPILE DONTCOPY

(GLOBALVARS IRM.DINFOGRAPH)
)
(DECLARE%: DONTEVAL@LOAD DOCOPY 
(COND (IRM.HOST&DIR (SETQ IRM.DINFOGRAPH (IRM.LOAD-GRAPH))))
)



(* ;;; "Cross reference imageobj")

(DEFINEQ

(IRM.DISPLAY.CREF
(LAMBDA (IMAGEOBJ STREAM) (* drc%: " 7-Jan-86 13:41") (if (EQ (IMAGESTREAMTYPE STREAM) (QUOTE DISPLAY)) then (DSPFONT IRM.CREF.FONT STREAM) (LET* ((STRING (IMAGEOBJPROP IMAGEOBJ (QUOTE ITEM))) (STRINGREGION (STRINGREGION STRING STREAM)) (LEFT (ADD1 (fetch (REGION LEFT) of STRINGREGION))) (BOTTOM (fetch (REGION BOTTOM) of STRINGREGION)) (REGION (create REGION LEFT ← LEFT BOTTOM ← BOTTOM HEIGHT ← (IPLUS (fetch (REGION HEIGHT) of STRINGREGION) 2) WIDTH ← (IPLUS (fetch (REGION WIDTH) of STRINGREGION) 6))) (TOP (fetch (REGION TOP) of REGION)) (RIGHT (fetch (REGION RIGHT) of REGION))) (IMAGEOBJPROP IMAGEOBJ (QUOTE REGION) REGION) (CENTERPRINTINREGION STRING REGION STREAM) (DRAWLINE LEFT BOTTOM LEFT (SUB1 TOP) 1 (QUOTE INVERT) STREAM) (DRAWLINE LEFT TOP (SUB1 RIGHT) TOP 1 (QUOTE INVERT) STREAM) (DRAWLINE RIGHT TOP RIGHT (ADD1 BOTTOM) 1 (QUOTE INVERT) STREAM) (DRAWLINE RIGHT BOTTOM (ADD1 LEFT) BOTTOM 1 (QUOTE INVERT) STREAM)) else (PRIN1 "page X.XX" STREAM)))
)

(IRM.CREF.BOX
(LAMBDA (IMAGEOBJ STREAM CURRENTX RIGHTMARGIN) (* drc%: " 7-Jan-86 13:42") (LET ((TYPE (IMAGESTREAMTYPE STREAM))) (create IMAGEBOX XSIZE ← (SELECTQ TYPE (DISPLAY (IPLUS (STRINGWIDTH (IMAGEOBJPROP IMAGEOBJ (QUOTE ITEM)) IRM.CREF.FONT) 8)) (STRINGWIDTH "page X.XX" STREAM)) YSIZE ← (SELECTQ TYPE (DISPLAY (IPLUS (FONTHEIGHT IRM.CREF.FONT) 4)) (FONTHEIGHT STREAM)) YDESC ← (SELECTQ TYPE (DISPLAY 4) 0) XKERN ← 0)))
)

(IRM.PUT.CREF
(LAMBDA (IMAGEOBJ STREAM) (* drc%: " 7-Jan-86 22:09") (PRIN2 (CONS (IMAGEOBJPROP IMAGEOBJ (QUOTE ITEM)) (IMAGEOBJPROP IMAGEOBJ (QUOTE TYPE))) STREAM))
)

(IRM.GET.CREF
(LAMBDA (FILE TEXTSTREAM) (* drc%: " 2-Jan-86 17:45") (DECLARE (GLOBALVARS \IRM.CREF.IMAGEFNS)) (LET ((DATA (READ FILE)) (IMAGEOBJ (IMAGEOBJCREATE NIL \IRM.CREF.IMAGEFNS))) (IMAGEOBJPROP IMAGEOBJ (QUOTE ITEM) (CAR DATA)) (IMAGEOBJPROP IMAGEOBJ (QUOTE TYPE) (CDR DATA)) IMAGEOBJ))
)

(IRM.CREF.BUTTONEVENTFN
(LAMBDA (IMAGEOBJ WSTREAM SELECTION RELX RELY WINDOW TEXTSTREAM BUTTON) (* drc%: " 8-Jan-86 15:34") (* (INSPECT IMAGEOBJ)) (LET* ((BOUNDBOX (IMAGEOBJPROP IMAGEOBJ (QUOTE BOUNDBOX))) (WIDTH (fetch (IMAGEBOX XSIZE) of BOUNDBOX)) (HEIGHT (fetch (IMAGEBOX YSIZE) of BOUNDBOX)) (REGION (create REGION HEIGHT ← HEIGHT WIDTH ← WIDTH LEFT ← 0 BOTTOM ← 0))) (RESETFORM (TTYDISPLAYSTREAM (GETPROMPTWINDOW WINDOW)) (BLTSHADE BLACKSHADE WSTREAM 0 0 WIDTH HEIGHT (QUOTE INVERT)) (bind (N ← 0) (ITEM ← (IMAGEOBJPROP IMAGEOBJ (QUOTE ITEM))) (TYPE ← (IMAGEOBJPROP IMAGEOBJ (QUOTE TYPE))) until (OR (NOT (MOUSESTATE (OR LEFT MIDDLE))) (NOT (INSIDEP REGION (CURSORPOSITION NIL WSTREAM)))) do (BLOCK 100) (if (EQ (SETQ N (ADD1 N)) 10) then (printout T T "Will lookup " (IMAGEOBJPROP IMAGEOBJ (QUOTE ITEM)) (if TYPE then (CONCAT " as a " TYPE ".") else "."))) (GETMOUSESTATE) finally (CLEARW T) (if (INSIDEP REGION (CURSORPOSITION NIL WSTREAM)) then (ADD.PROCESS (LIST (QUOTE IRM.LOOKUP) (KWOTE ITEM) (KWOTE TYPE) (WINDOWPROP WINDOW (QUOTE DINFOGRAPH))) (QUOTE NAME) "IRM Cross Reference")) (BLTSHADE BLACKSHADE WSTREAM 0 0 WIDTH HEIGHT (QUOTE INVERT)) NIL))))
)
)

(RPAQ? IRM.CREF.FONT (FONTCREATE (QUOTE MODERN) 8 (QUOTE MRR)))

(RPAQ? \IRM.CREF.IMAGEFNS (IMAGEFNSCREATE (FUNCTION IRM.DISPLAY.CREF) (FUNCTION IRM.CREF.BOX) (FUNCTION IRM.PUT.CREF) (FUNCTION IRM.GET.CREF) (FUNCTION NILL) (FUNCTION IRM.CREF.BUTTONEVENTFN))
)
(DECLARE%: DOEVAL@COMPILE DONTCOPY

(GLOBALVARS IRM.CREF.FONT \IRM.CREF.IMAGEFNS)
)



(* ;;; "Internal functions and variables")

(DEFINEQ

(\IRM.GET.REF
(LAMBDA (KEYWORD TYPE WINDOW) (* drc%: "18-Jan-86 17:13") (* * Returns an IRMREFERENCE for KEYWORD of optionally specified TYPE.) (\IRM.GET.HASHFILE) (* keywords in hashfile are all uppercased -- make's lookup case insensitive) (SETQ KEYWORD (MKATOM (U-CASE KEYWORD))) (LET (SAMEFLG REFS) (SETQ REFS (if (EQ KEYWORD (WINDOWPROP WINDOW (QUOTE PREVIOUS.KEYWORD))) then (* same keyword as last time, so fetch cached refs) (SETQ SAMEFLG T) (WINDOWPROP WINDOW (QUOTE IRM.REFS)) else (CLEARW T) (PRINTOUT T "Fetching reference(s) for " KEYWORD "...") (* hashfile contains a list of IRMREFERENCES for each keyword) (GETHASHFILE KEYWORD \IRM.HASHFILE))) (WINDOWPROP WINDOW (QUOTE PREVIOUS.KEYWORD) KEYWORD) (WINDOWPROP WINDOW (QUOTE IRM.REFS) REFS) (COND ((NULL REFS) (PRINTOUT T "None found.") NIL) ((NULL TYPE) (PRINTOUT T "OK.") (\IRM.CHOOSE.REF REFS KEYWORD)) ((for REF in REFS thereis (if (AND (EQ (fetch (IRMREFERENCE TYPE) of REF) TYPE) (fetch (IRMREFERENCE PRIMARYFLG) of REF)) then (PRINTOUT T "OK.") REF))) ((SETQ REFS (for REF in REFS join (if (EQ (fetch (IRMREFERENCE TYPE) of REF) TYPE) then (LIST REF) else NIL))) (PRINTOUT T "OK.") (\IRM.CHOOSE.REF REFS KEYWORD)) (T (PRINTOUT T "none found of type " TYPE ".") NIL))))
)

(\IRM.SMART.REF
(LAMBDA (KEYWORD WINDOW) (* drc%: "18-Jan-86 17:40") (* * Returns IRMREFERENCE for KEYWORD. Allows wildcards in KEYWORD, and will try spelling correction.) (if (while (SETQ POS (STRPOS "*" KEYWORD (AND POS (ADD1 POS)))) bind POS when (NEQ (NTHCHAR KEYWORD (SUB1 POS)) (QUOTE %')) do (RETURN T) finally (* if not doing wildcarding then remove quotes when preceding asterisks) (SETQ KEYWORD (PACK (for TAIL on (UNPACK KEYWORD) when (NOT (AND (EQ (CAR TAIL) (QUOTE %')) (EQ (CADR TAIL) (QUOTE *)))) collect (CAR TAIL)))) (RETURN NIL)) then (* there's an unquoted asterisk -- it's wildcardin' time!) (\IRM.WILD.REF KEYWORD WINDOW) elseif \IRM.KEYWORDS then (* we've got possible matches loaded, so try spelling correction) (RESETFORM (TTY.PROCESS (THIS.PROCESS)) (LET ((CORRECTED (MISSPELLED? KEYWORD 50 \IRM.KEYWORDS T))) (if CORRECTED then (\IRM.GET.REF CORRECTED NIL WINDOW) else (PRINTOUT T T KEYWORD " Not in IRM") NIL))) else (* default to normal lookup) (\IRM.GET.REF KEYWORD NIL WINDOW)))
)

(\IRM.CHOOSE.REF
(LAMBDA (REFS KEYWORD) (* drc%: " 8-Jan-86 15:23") (if (NULL (CDR REFS)) then (CAR REFS) else (MENU (create MENU CENTERFLG ← T TITLE ← (MKSTRING KEYWORD) ITEMS ← (for REF in REFS collect (LIST (LET ((TYPE (fetch (IRMREFERENCE TYPE) of REF))) (if (fetch (IRMREFERENCE PRIMARYFLG) of REF) then (PACK* "* " TYPE " *") else TYPE)) (KWOTE REF) (CONCAT "Lookup " KEYWORD " as " (fetch (IRMREFERENCE TYPE) of REF))))))))
)

(\IRM.WILD.REF
(LAMBDA (KEYWORD WINDOW) (* drc%: "18-Jan-86 17:04") (* * Return IRMREFERENCE matching wildcarded KEYWORD.) (OPENW WINDOW) (LET* (SAMEFLG (MATCHES (if (EQ KEYWORD (WINDOWPROP WINDOW (QUOTE IRM.WILD.KEYWORD))) then (* same as last time we wildcarded -- used cached matches.) (SETQ SAMEFLG T) (WINDOWPROP WINDOW (QUOTE IRM.MATCHES)) else (PROG2 (PRINTOUT (GETPROMPTWINDOW WINDOW) "...Matching wildcard(s)...") (\IRM.WILDCARD KEYWORD (\IRM.GET.KEYWORDS WINDOW)) (PRINTOUT (GETPROMPTWINDOW WINDOW) "OK"))))) (WINDOWPROP WINDOW (QUOTE IRM.WILD.KEYWORD) KEYWORD) (WINDOWPROP WINDOW (QUOTE IRM.MATCHES) MATCHES) (if MATCHES then (if (NULL (CDR MATCHES)) then (\IRM.GET.REF (CAR MATCHES) NIL WINDOW) else (OR SAMEFLG (WINDOWPROP WINDOW (QUOTE WILD.MENU) (create MENU ITEMS ← (for MATCH in MATCHES collect (LIST MATCH (KWOTE MATCH) (CONCAT "Will lookup " MATCH " in IRM if selected."))) CENTERFLG ← T TITLE ← KEYWORD))) (LET ((CHOICE (MENU (WINDOWPROP WINDOW (QUOTE WILD.MENU))))) (AND CHOICE (\IRM.GET.REF CHOICE NIL WINDOW)))) else (PRINTOUT (GETPROMPTWINDOW WINDOW) T "No matches found for " KEYWORD) NIL)))
)

(\IRM.WILDCARD
(LAMBDA (WILDATOM LIST) (* drc%: "18-Jan-86 17:00") (* * Returns those atoms in LIST which match WILDATOM.) (LET ((SCRATCH (CONS)) (WILDLIST (UNPACK WILDATOM))) (for ATOM in LIST when (\IRM.WILD.MATCH WILDLIST (DUNPACK ATOM SCRATCH)) collect ATOM)))
)

(\IRM.WILD.MATCH
(LAMBDA (WILDLIST LIST) (* drc%: "18-Jan-86 16:59") (* * predicate for whether wildcard containing WILDLIST matches LIST.) (COND ((AND (NULL WILDLIST) (NULL LIST))) ((AND (EQ (CAR WILDLIST) (QUOTE %')) (EQ (CADR WILDLIST) (QUOTE *))) (* found a quoted asterisk) (if (EQ (QUOTE *) (CAR LIST)) then (* and it matches) (\IRM.WILD.MATCH (CDDR WILDLIST) (CDR LIST)))) ((EQ (CAR WILDLIST) (QUOTE *)) (* found a real wildcard) (OR (NULL (CDR WILDLIST)) (for TAIL on LIST thereis (\IRM.WILD.MATCH (CDR WILDLIST) TAIL)))) ((EQ (CAR WILDLIST) (CAR LIST)) (* first chars match -- keep checking) (\IRM.WILD.MATCH (CDR WILDLIST) (CDR LIST))) (T NIL)))
)

(\IRM.GET.HASHFILE
(LAMBDA NIL (* drc%: "16-Dec-85 12:09") (OR (ARRAYP \IRM.HASHFILE) (SETQ \IRM.HASHFILE (OPENHASHFILE (OR IRM.HASHFILE.NAME (PACKFILENAME (QUOTE NAME) (QUOTE IRM) (QUOTE EXTENSION) (QUOTE HASHFILE) (QUOTE BODY) IRM.HOST&DIR)) (QUOTE INPUT)))))
)

(\IRM.GET.KEYWORDS
(LAMBDA (WINDOW QUIETFLG) (* drc%: "18-Jan-86 17:14") (* * keyword list is hidden in hashfile as its key is in lower case) (OR \IRM.KEYWORDS (PROGN (PRINTOUT (GETPROMPTWINDOW WINDOW) "Loading keyword list...") (\IRM.GET.HASHFILE) (SETQ \IRM.KEYWORDS (GETHASHFILE (QUOTE irm.keywords) (\IRM.GET.HASHFILE))))))
)
)

(RPAQ? \IRM.HASHFILE )

(RPAQ? \IRM.KEYWORDS )
(DECLARE%: DOEVAL@COMPILE DONTCOPY

(GLOBALVARS \IRM.HASHFILE \IRM.KEYWORDS)
)
(CL:DEFUN \IRM.AROUND-EXIT (EVENT) (CASE EVENT ((BEFORELOGOUT BEFOREMAKESYS BEFORESYSOUT) (AND \IRM.HASHFILE (CLOSEHASHFILE \IRM.HASHFILE)))))

(ADDTOVAR AROUNDEXITFNS \IRM.AROUND-EXIT)
(PUTPROPS HELPSYS COPYRIGHT ("Xerox Corporation" 1985 1986 1987))
(DECLARE%: DONTCOPY
  (FILEMAP (NIL (2803 4933 (HELPSYS 2813 . 3640) (IRM.LOOKUP 3642 . 4545) (IRM.SMART.LOOKUP 4547 . 4655)
 (IRM.RESET 4657 . 4931)) (5193 6238 (IRM.GET.DINFOGRAPH 5203 . 5837) (IRM.DISPLAY.REF 5839 . 6236)) (
6866 9945 (IRM.DISPLAY.CREF 6876 . 7865) (IRM.CREF.BOX 7867 . 8298) (IRM.PUT.CREF 8300 . 8470) (
IRM.GET.CREF 8472 . 8771) (IRM.CREF.BUTTONEVENTFN 8773 . 9943)) (10350 15724 (\IRM.GET.REF 10360 . 
11605) (\IRM.SMART.REF 11607 . 12621) (\IRM.CHOOSE.REF 12623 . 13059) (\IRM.WILD.REF 13061 . 14183) (
\IRM.WILDCARD 14185 . 14455) (\IRM.WILD.MATCH 14457 . 15118) (\IRM.GET.HASHFILE 15120 . 15387) (
\IRM.GET.KEYWORDS 15389 . 15722)))))
STOP