(FILECREATED "10-Oct-86 11:37:01" {QV}<NOTECARDS>1.3K>NEXT>RHTPATCH115.;5 4824 changes to: (FNS NC.GetCachedMap) previous date: " 9-Oct-86 18:03:33" {QV}<NOTECARDS>1.3K>NEXT>RHTPATCH115.;4) (* Copyright (c) 1986 by Xerox Corporation. All rights reserved.) (PRETTYCOMPRINT RHTPATCH115COMS) (RPAQQ RHTPATCH115COMS ((* * Stuff to make a fake SKETCHTYPE for MAP that autoloads real map stuff.) (* * This is new stuff for NCSKETCHCARD) (* * Be sure to put it BEFORE the call to NC.AddSketchCard!!) (FNS NC.FakeMapInputFn NC.FakeMapInsideFn) (P (NC.StoreAutoloadFnFile (FUNCTION SK.MAP.INPUTFN) (QUOTE NCMAPS) (QUOTE NOTECARDSDIRECTORIES)) (NC.StoreAutoloadFnFile (FUNCTION SK.MAP.INSIDEFN) (QUOTE NCMAPS) (QUOTE NOTECARDSDIRECTORIES)) (NC.StoreAutoloadFnFile (FUNCTION SetCachedBitMap) (QUOTE NCMAPS) (QUOTE NOTECARDSDIRECTORIES)) (OR (FMEMB (QUOTE MAP) SKETCH.ELEMENT.TYPE.NAMES) (CREATE.SKETCH.ELEMENT.TYPE (QUOTE MAP) "Map" "Forces autoload of MAP package." NIL NIL NIL NIL (FUNCTION NC.FakeMapInputFn) (FUNCTION NC.FakeMapInsideFn)))) (* * Changes for NCSKETCHCARD) (FNS NC.GetCachedMap) (* * New macro for NCUTILITIES. Put next to NC.AutoloadApply* in the COMS) (MACROS NC.AutoloadApply))) (* * Stuff to make a fake SKETCHTYPE for MAP that autoloads real map stuff.) (* * This is new stuff for NCSKETCHCARD) (* * Be sure to put it BEFORE the call to NC.AddSketchCard!!) (DEFINEQ (NC.FakeMapInputFn (LAMBDA (SketchWin) (* rht: " 9-Oct-86 14:55") (* * This just to force autoload of the NCMAPS library package.) (NC.AutoloadApply* (FUNCTION SK.MAP.INPUTFN) SketchWin))) (NC.FakeMapInsideFn (LAMBDA (Elem Region) (* rht: " 9-Oct-86 18:03") (* * This just to force autoload of the NCMAPS library package.) (NC.AutoloadApply* (FUNCTION SK.MAP.INSIDEFN) Elem Region))) ) (NC.StoreAutoloadFnFile (FUNCTION SK.MAP.INPUTFN) (QUOTE NCMAPS) (QUOTE NOTECARDSDIRECTORIES)) (NC.StoreAutoloadFnFile (FUNCTION SK.MAP.INSIDEFN) (QUOTE NCMAPS) (QUOTE NOTECARDSDIRECTORIES)) (NC.StoreAutoloadFnFile (FUNCTION SetCachedBitMap) (QUOTE NCMAPS) (QUOTE NOTECARDSDIRECTORIES)) (OR (FMEMB (QUOTE MAP) SKETCH.ELEMENT.TYPE.NAMES) (CREATE.SKETCH.ELEMENT.TYPE (QUOTE MAP) "Map" "Forces autoload of MAP package." NIL NIL NIL NIL (FUNCTION NC.FakeMapInputFn) (FUNCTION NC.FakeMapInsideFn))) (* * Changes for NCSKETCHCARD) (DEFINEQ (NC.GetCachedMap (LAMBDA (Stream) (* rht: "10-Oct-86 11:36") (* Read a bit map from the file and then put it onto the cached maps list) (* * FGH 9/28/85 Updated to handle new map changes. In particular, caching now done on the map resolution and noit on the x and y offsets.) (* * rht 10/10/86: Replaced APPLY of SetCachedBitMap with NC.AutoloadApply so that NCMAPS will get autoloaded.) (LET (CacheSpecs BitMap) (SETQ CacheSpecs (READ Stream)) (COND ((EQ (LENGTH CacheSpecs) 8) (* * Old Scheme for cahcing) (SETQ CacheSpecs (CONS (QUOTE HIGH) (CDDR CacheSpecs))))) (SETQ BitMap (HREAD Stream)) (AND CacheSpecs BitMap (NC.AutoloadApply (FUNCTION SetCachedBitMap) (CONS BitMap CacheSpecs)))))) ) (* * New macro for NCUTILITIES. Put next to NC.AutoloadApply* in the COMS) (DECLARE: EVAL@COMPILE (DEFMACRO NC.AutoloadApply (Fn Args) (* * Like NC.AutoloadApply* except takes single Args argument rather than spread.) (BQUOTE (if (GETD , Fn) then (APPLY , Fn , Args) else (LET ((AutoloadFnEntry (NC.LookupAutoloadFnFile , Fn)) FileName) (if AutoloadFnEntry then (NC.LoadFileFromDirectories (SETQ FileName (fetch (AutoloadFnEntry FileName) of AutoloadFnEntry)) (fetch (AutoloadFnEntry Directories) of AutoloadFnEntry)) (if (GETD , Fn) then (APPLY , Fn , Args) else (NC.ReportError "NC.AutoloadApply" (CONCAT "Loaded file " FileName ", but still no definition of " , Fn))) else (NC.ReportError "NC.AutoloadApply" (CONCAT "No definition of " , Fn " in table of autoloadable functions."))))) )) ) (PUTPROPS RHTPATCH115 COPYRIGHT ("Xerox Corporation" 1986)) (DECLARE: DONTCOPY (FILEMAP (NIL (1608 2168 (NC.FakeMapInputFn 1618 . 1889) (NC.FakeMapInsideFn 1891 . 2166)) (2738 3760 (NC.GetCachedMap 2748 . 3758))))) STOP