
Hashing
=======

This document contains details of changes made to the MessageTrans API in
version 0.36 and later of the MessageTrans module.

MessageTrans now has the capability to generate hash tables for each of the
messages file that it has opened in the RMA (or from ResourceFS) to speed up
lookups.  The format of the hash tables are documented in the source code.

An API change has occurred to enable applications which cache their own
message files to enable hash tables for their message files too.

SWI MessageTrans_OpenFile

On entry:
   R0 = 8-word data structure
   R1 = Filename
   R2 = Buffer for file data (0 to use RMA)
   R3 = "FAST" (&54534146)
   

If R3 was "FAST" on entry and R2 was not 0, then MessageTrans makes the
following assumptions:

1) the block pointed to by R0 is (at least) 32 bytes long
2) the caller will call MessageTrans_CloseFile to discard the message data
3) the block pointed to by R0 is in a "safe" place.

The definition of "safe" is "not on the SVC stack".


Callers who pass 0 in R2 will always get hashing and need not comply with the
restriction that the block be in a safe place.  The other restrictions still
apply.


--SBrodie, 2 May 2000
