Artifact [9a2a26a7f3]

Artifact 9a2a26a7f308d03892fa2d2edb6f70525ec36d44:


/* Hash module definitions used by both the encoder and the decoder. */

#define HASH_SIZE  1024       /* Size of hash table; */

typedef struct 
{ /* hash list record */
    unsigned int Hnumber; /* The hashed number */
    unsigned int Hnext;   /* The next number in this list */
} hashList;

typedef struct 
{ /* the hash table */
    unsigned int hashFree; /* Next unused hashList record */
    unsigned int hashSize; /* Current size of hashLists array */
    unsigned int hashVersion; /* Version number for this table */
    unsigned int hashIndex [HASH_SIZE]; /* The hash entries. */
    unsigned int hashVerno [HASH_SIZE]; /* The hash version numbers. */
    hashList *hashLists; /* For storing lists of hash records */
} hashTable;

hashTable *
createHash(hashTable *H);
void
addHash (hashTable *H, unsigned int n);
int
foundHash (hashTable *H, unsigned int n);
void
dumpHash (FILE *fp, hashTable *H);