All pastes #396749 Raw Edit

Something

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