XEROX HASHDATUM 2 4 1 HASHDATUM 1 4 By: Christopher Lane (LANE@SUMEX-AIM.ARPA) 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 are defined in file using the two functions above: (GETHASHGRAPH KEY HASHFILE) [Function] (PUTHASHGRAPH KEY GRAPH HASHFILE) [Function] Use the GRAPHER functions READGRAPH and DUMPGRAPH to store GRAPH on HASHFILE under KEY. (GETHASHBITMAP KEY HASHFILE) [Function] (PUTHASHBITMAP KEY BITMAP HASHFILE) [Function] Use READBITMAP and PRINTBITMAP to store BITMAP on HASHFILE in a text format. (GETHASHBINARYBITMAP KEY HASHFILE) [Function] (PUTHASHBINARYBITMAP KEY BITMAP HASHFILE) [Function] Use READBM and WRITEBM from BITMAPFNS to store BITMAP on HASHFILE in a binary format. (GETHASHUGLY KEY HASHFILE) [Function] (PUTHASHUGLY KEY UGLYVAR HASHFILE) [Function] Use HREAD and HPRINT to store random Interlisp-D 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 (FOLIOINFO (ARABIC) STARTINGPAGE# 1) (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM) FORMATINFO (ARABIC)) (174 36 288 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL NIL (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM)) (282 42 72 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))) (PAGE NIL NIL (0 0 612 792) ((FOLIO NIL (PARALOOKS (QUAD CENTERED) CHARLOOKS (SUPERSCRIPT 0 SIZE 10 FAMILY MODERN OVERLINE OFF STRIKEOUT OFF UNDERLINE OFF SLOPE REGULAR WEIGHT MEDIUM)) (282 42 72 36) NIL) (HEADING NIL (HEADINGTYPE RUNNINGHEAD) (84 744 444 36) NIL) (TEXT NIL NIL (84 96 456 600) NIL))))) (1 (HH(((8( (8D PAGEHEADING RUNNINGHEADMODERN  HELVETICA MODERN MODERN MODERNMODERN LOGO    HRULE.GETFNMODERN  HRULE.GETFNMODERN  HRULE.GETFNMODERN   HRULE.GETFNMODERN  HRULE.GETFNMODERN , t  SH   X   M   W     #~z