ucif/antlr3/src/antlr3collections.c
static void *
antlr3HashGet(pANTLR3_HASH_TABLE table, void * key)
{
    ANTLR3_UINT32           hash;
    pANTLR3_HASH_BUCKET     bucket;
    pANTLR3_HASH_ENTRY      entry;


    /* First we need to know the hash of the provided key
     */
    hash    = antlr3Hash(key, (ANTLR3_UINT32)strlen((const char *)key));

    /* Knowing the hash, we can find the bucket
     */
    bucket  = table->buckets + (hash % table->modulo);

    /* Now we can inspect the key at each entry in the bucket
     * and see if we have a match.
     */
    entry   = bucket->entries;

    while   (entry != NULL)
    {
        if  (strcmp((const char *)key, (const char *)entry->keybase.key.sKey) == 0)
        {
            /* Match was found, return the data pointer for this entry
             */
            return  entry->data;
        }
        entry = entry->nextEntry;
    }

    /* If we got here, then we did not find the key
     */
    return  NULL;
}
/** Return the element pointer in the hash table for a particular
 *  key value, or NULL if it don't exist (or was itself NULL).
 */
Return the element pointer in the hash table for a particular
key value, or NULL if it don't exist (or was itself NULL).
Return the element pointer in the hash table for a particular key value or NULL if it don ' t exist ( or was itself NULL ) .
static void *
antlr3HashGet(pANTLR3_HASH_TABLE table, void * key)
{
    ANTLR3_UINT32           hash;
    pANTLR3_HASH_BUCKET     bucket;
    pANTLR3_HASH_ENTRY      entry;
    hash    = antlr3Hash(key, (ANTLR3_UINT32)strlen((const char *)key));
    bucket  = table->buckets + (hash % table->modulo);
    entry   = bucket->entries;
    while   (entry != NULL)
    {
        if  (strcmp((const char *)key, (const char *)entry->keybase.key.sKey) == 0)
        {
            return  entry->data;
        }
        entry = entry->nextEntry;
    }
    return  NULL;
}
static void * antlr3HashGet ( pANTLR3_HASH_TABLE table , void * key ) { ANTLR3_UINT32 hash ; pANTLR3_HASH_BUCKET bucket ; pANTLR3_HASH_ENTRY entry ; hash = antlr3Hash ( key , ( ANTLR3_UINT32 ) strlen ( ( const char * ) key ) ) ; bucket = table -> buckets + ( hash % table -> modulo ) ; entry = bucket -> entries ; while ( entry != NULL ) { if ( strcmp ( ( const char * ) key , ( const char * ) entry -> keybase . key . sKey ) == 0 ) { return entry -> data ; } entry = entry -> nextEntry ; } return NULL ; }
Return the element pointer in the hash table for a particular
  key value, or NULL if it don't exist (or was itself NULL).
Return the element pointer in the hash table for a particular key value or NULL if it don ' t exist ( or was itself NULL ) .
/* First we need to know the hash of the provided key
     */ /* Knowing the hash, we can find the bucket
     */ /* Now we can inspect the key at each entry in the bucket
     * and see if we have a match.
     */ /* Match was found, return the data pointer for this entry
             */ /* If we got here, then we did not find the key
     */