XEROX HASHDATUM 2 4 1 HASHDATUM 1 4 By: Christopher Lane (Lane@Sumex-Aaim.Stanford.Edu) Requires: HASH HASHDATUM facilitates storing random Interlisp-D datatypes on hash files using the hashed text feature of the HASH package. The package defines two functions which store an item in a hash file as a stream of bytes using user supplied input and output functions. (GETHASHDATUM KEY HASHFILE READFN) [Function] (PUTHASHDATUM KEY DATUM HASHFILE PRINTFN) [Function] Use READFN and PRINTFN to store and retrive DATUM on HASHFILE. The READFN takes a stream as its argument, the PRINTFN takes the DATUM and a stream. The put function returns the hash File text pointer record which contains two byte pointer where the datum begins and ends on the file. The get function returns the result of the READFN. The following macros and functions are also defined using the above functions: (GETHASHGRAPH KEY HASHFILE) [Macro] (PUTHASHGRAPH KEY GRAPH HASHFILE) [Macro] Use the GRAPHER functions READGRAPH and DUMPGRAPH to store GRAPH on HASHFILE under KEY. (GETHASHBITMAP KEY HASHFILE) [Macro] (PUTHASHBITMAP KEY BITMAP HASHFILE) [Macro] Use READBITMAP and PRINTBITMAP to store BITMAP on HASHFILE in a text format. (GETHASHBINARYBITMAP KEY HASHFILE) [Macro] (PUTHASHBINARYBITMAP KEY BITMAP HASHFILE) [Macro] Use READBM and WRITEBM from BITMAPFNS to store BITMAP on HASHFILE in a binary format. (GETHASHTEDIT KEY HASHFILE [WINDOW]) [Function] (PUTHASHTEDIT KEY TEXTOBJ HASHFILE) [Macro] Use OPENTEXTSTREAM and TEDIT.PUT.PCTB from TEDIT to store TEXTOBJ on HASHFILE, preserving both the text and formatting information. The WINDOW argument is optional and is passed to OPENTEXTSTREAM. If the WINDOW argument is not supplied, the result of the get function can be passed to OPENTEXTSTREAM along with a window in order to display the text. (GETHASHUGLY KEY HASHFILE) [Macro] (PUTHASHUGLY KEY UGLYVAR HASHFILE) [Macro] Use HREAD and HPRINT to store random datums on HASHFILE. Items such as menu datums can be stored on hash files using these macros. Since the items are put on the file using the text hashing feature of the HASH package, when rehashing or copying of the file occurs, the data portion of the file will be copied over correctly. (LIST ((PAGE NIL (PAPERSIZE LETTER STARTINGPAGE# 114) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO NIL) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE NIL . LETTER) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO NIL) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL (PAPERSIZE NIL . LETTER) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 INVISIBLE OFF SELECTPOINT OFF PROTECTED OFF SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF EXPANSION REGULAR SLOPE REGULAR WEIGHT MEDIUM INVERTED OFF USERINFO NIL STYLE NIL) FORMATINFO NIL) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 528 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL)))))1ÈÈ(È(È (È(ŠŠ8(ŠŠ8DÈÈ PAGEHEADING RUNNINGHEADTERMINAL MODERN  HELVETICA MODERN MODERN MODERNMODERN LOGO  HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN   HRULE.GETFNMODERN  HRULE.GETFNMODERN 5 5 5Š  % ‡$O           <' -3   M¾zº