#include "ficl.h"
/*
* h a s h F o r g e t
* Unlink all words in the hash that have addresses greater than or
* equal to the address supplied. Implementation factor for FORGET
* and MARKER.
*/
void
{
unsigned i;
}
}
}
/*
* h a s h H a s h C o d e
*
* Generate a 16 bit hashcode from a character string using a rolling
* shift and add stolen from PJ Weinberger of Bell Labs fame. Case folds
* the name before hashing it...
* N O T E : If string has zero length, returns zero.
*/
{
/* hashPJW */
if (s.length == 0)
return (0);
/* changed to run without errors under Purify -- lch */
if (shift) {
}
}
return ((ficlUnsigned16)code);
}
/*
* h a s h I n s e r t W o r d
* Put a word into the hash table using the word's hashcode as
* an index (modulo the table size).
*/
void
{
} else {
}
}
/*
* h a s h L o o k u p
* Find a name in the hash table given the hashcode and text of the name.
* Returns the address of the corresponding ficlWord if found,
* otherwise NULL.
* Note: outer loop on link field supports inheritance in wordlists.
* It's not part of ANS Forth - Ficl only. hashReset creates wordlists
* with NULL link fields.
*/
ficlWord *
{
if (nCmp > FICL_NAME_LENGTH)
else /* avoid the modulo op for single threaded lists */
hashIdx = 0;
return (word);
#if FICL_ROBUST
#endif
}
}
return (NULL);
}
/*
* h a s h R e s e t
* Initialize a ficlHash to empty state.
*/
void
{
unsigned i;
}
}