All pastes #396761 Raw Edit

Mine

public text v1 · immutable
·published 2007-03-16 00:14 UTC
rendered paste body
bool has_hashset (hashset_ref hash, hashset_key_t key) {
   hashcode_t hashnum = strhash(key) % hash->header_dim;
   hashnode_ref curr;
   for (curr = hash->headers[hashnum];curr != NULL; curr->link){
	    int temphash = strhash (curr->key);
	    int ourhash = strhash (key);
            if (temphash == ourhash)return TRUE;
            if (temphash < ourhash)continue;
            if (temphash > ourhash)break;
   }
   return FALSE;
}