hh 124 src/dps8/uthash.h # define HASH_FIND(hh,head,keyptr,keylen,out) \ hh 129 src/dps8/uthash.h HASH_FCN(keyptr,keylen, (head)->hh.tbl->num_buckets, _hf_hashv, _hf_bkt); \ hh 130 src/dps8/uthash.h if (HASH_BLOOM_TEST((head)->hh.tbl, _hf_hashv)) { \ hh 131 src/dps8/uthash.h HASH_FIND_IN_BKT((head)->hh.tbl, hh, (head)->hh.tbl->buckets[ _hf_bkt ], \ hh 171 src/dps8/uthash.h # define HASH_MAKE_TABLE(hh,head) \ hh 173 src/dps8/uthash.h (head)->hh.tbl = (UT_hash_table*)uthash_malloc( \ hh 175 src/dps8/uthash.h if (!((head)->hh.tbl)) { uthash_fatal( "out of memory"); } \ hh 176 src/dps8/uthash.h memset((head)->hh.tbl, 0, sizeof(UT_hash_table)); \ hh 177 src/dps8/uthash.h (head)->hh.tbl->tail = &((head)->hh); \ hh 178 src/dps8/uthash.h (head)->hh.tbl->num_buckets = HASH_INITIAL_NUM_BUCKETS; \ hh 179 src/dps8/uthash.h (head)->hh.tbl->log2_num_buckets = HASH_INITIAL_NUM_BUCKETS_LOG2; \ hh 180 src/dps8/uthash.h (head)->hh.tbl->hho = (char*)(&(head)->hh) - (char*)(head); \ hh 181 src/dps8/uthash.h (head)->hh.tbl->buckets = (UT_hash_bucket*)uthash_malloc( \ hh 183 src/dps8/uthash.h if (! (head)->hh.tbl->buckets) { uthash_fatal( "out of memory"); } \ hh 184 src/dps8/uthash.h memset((head)->hh.tbl->buckets, 0, \ hh 186 src/dps8/uthash.h HASH_BLOOM_MAKE((head)->hh.tbl); \ hh 187 src/dps8/uthash.h (head)->hh.tbl->signature = HASH_SIGNATURE; \ hh 190 src/dps8/uthash.h # define HASH_ADD(hh,head,fieldname,keylen_in,add) \ hh 191 src/dps8/uthash.h HASH_ADD_KEYPTR(hh,head,&((add)->fieldname),keylen_in,add) hh 193 src/dps8/uthash.h # define HASH_REPLACE(hh,head,fieldname,keylen_in,add,replaced) \ hh 196 src/dps8/uthash.h HASH_FIND(hh,head,&((add)->fieldname),keylen_in,replaced); \ hh 198 src/dps8/uthash.h HASH_DELETE(hh,head,replaced); \ hh 200 src/dps8/uthash.h HASH_ADD(hh,head,fieldname,keylen_in,add); \ hh 203 src/dps8/uthash.h # define HASH_ADD_KEYPTR(hh,head,keyptr,keylen_in,add) \ hh 206 src/dps8/uthash.h (add)->hh.next = NULL; \ hh 207 src/dps8/uthash.h (add)->hh.key = (const void*)keyptr; \ hh 208 src/dps8/uthash.h (add)->hh.keylen = (unsigned)keylen_in; \ hh 211 src/dps8/uthash.h (head)->hh.prev = NULL; \ hh 212 src/dps8/uthash.h HASH_MAKE_TABLE(hh,head); \ hh 214 src/dps8/uthash.h (head)->hh.tbl->tail->next = (add); \ hh 215 src/dps8/uthash.h (add)->hh.prev = ELMT_FROM_HH((head)->hh.tbl, (head)->hh.tbl->tail); \ hh 216 src/dps8/uthash.h (head)->hh.tbl->tail = &((add)->hh); \ hh 218 src/dps8/uthash.h (head)->hh.tbl->num_items++; \ hh 219 src/dps8/uthash.h (add)->hh.tbl = (head)->hh.tbl; \ hh 220 src/dps8/uthash.h HASH_FCN(keyptr,keylen_in, (head)->hh.tbl->num_buckets, \ hh 221 src/dps8/uthash.h (add)->hh.hashv, _ha_bkt); \ hh 222 src/dps8/uthash.h HASH_ADD_TO_BKT((head)->hh.tbl->buckets[_ha_bkt],&(add)->hh); \ hh 223 src/dps8/uthash.h HASH_BLOOM_ADD((head)->hh.tbl,(add)->hh.hashv); \ hh 224 src/dps8/uthash.h HASH_EMIT_KEY(hh,head,keyptr,keylen_in); \ hh 225 src/dps8/uthash.h HASH_FSCK(hh,head); \ hh 247 src/dps8/uthash.h # define HASH_DELETE(hh,head,delptr) \ hh 251 src/dps8/uthash.h if ( ((delptr)->hh.prev == NULL) && ((delptr)->hh.next == NULL) ) { \ hh 252 src/dps8/uthash.h uthash_free((head)->hh.tbl->buckets, \ hh 253 src/dps8/uthash.h (head)->hh.tbl->num_buckets*sizeof(struct UT_hash_bucket) ); \ hh 254 src/dps8/uthash.h HASH_BLOOM_FREE((head)->hh.tbl); \ hh 255 src/dps8/uthash.h uthash_free((head)->hh.tbl, sizeof(UT_hash_table)); \ hh 258 src/dps8/uthash.h _hd_hh_del = &((delptr)->hh); \ hh 259 src/dps8/uthash.h if ((delptr) == ELMT_FROM_HH((head)->hh.tbl,(head)->hh.tbl->tail)) { \ hh 260 src/dps8/uthash.h (head)->hh.tbl->tail = \ hh 261 src/dps8/uthash.h (UT_hash_handle*)((ptrdiff_t)((delptr)->hh.prev) + \ hh 262 src/dps8/uthash.h (head)->hh.tbl->hho); \ hh 264 src/dps8/uthash.h if ((delptr)->hh.prev) { \ hh 265 src/dps8/uthash.h ((UT_hash_handle*)((ptrdiff_t)((delptr)->hh.prev) + \ hh 266 src/dps8/uthash.h (head)->hh.tbl->hho))->next = (delptr)->hh.next; \ hh 268 src/dps8/uthash.h DECLTYPE_ASSIGN(head,(delptr)->hh.next); \ hh 272 src/dps8/uthash.h (head)->hh.tbl->hho))->prev = \ hh 275 src/dps8/uthash.h HASH_TO_BKT( _hd_hh_del->hashv, (head)->hh.tbl->num_buckets, _hd_bkt); \ hh 276 src/dps8/uthash.h HASH_DEL_IN_BKT(hh,(head)->hh.tbl->buckets[_hd_bkt], _hd_hh_del); \ hh 277 src/dps8/uthash.h (head)->hh.tbl->num_items--; \ hh 279 src/dps8/uthash.h HASH_FSCK(hh,head); \ hh 288 src/dps8/uthash.h HASH_FIND(hh,head,findstr,strlen(findstr),out) hh 290 src/dps8/uthash.h HASH_ADD(hh,head,strfield,strlen(add->strfield),add) hh 292 src/dps8/uthash.h HASH_REPLACE(hh,head,strfield,strlen(add->strfield),add,replaced) hh 294 src/dps8/uthash.h HASH_FIND(hh,head,findint,sizeof(int),out) hh 296 src/dps8/uthash.h HASH_ADD(hh,head,intfield,sizeof(int),add) hh 298 src/dps8/uthash.h HASH_REPLACE(hh,head,intfield,sizeof(int),add,replaced) hh 300 src/dps8/uthash.h HASH_FIND(hh,head,findptr,sizeof(void *),out) hh 302 src/dps8/uthash.h HASH_ADD(hh,head,ptrfield,sizeof(void *),add) hh 304 src/dps8/uthash.h HASH_REPLACE(hh,head,ptrfield,sizeof(void *),add,replaced) hh 306 src/dps8/uthash.h HASH_DELETE(hh,head,delptr) hh 318 src/dps8/uthash.h # define HASH_FSCK(hh,head) \ hh 326 src/dps8/uthash.h for( _bkt_i = 0; _bkt_i < (head)->hh.tbl->num_buckets; _bkt_i++) { \ hh 328 src/dps8/uthash.h _thh = (head)->hh.tbl->buckets[_bkt_i].hh_head; \ hh 340 src/dps8/uthash.h if ((head)->hh.tbl->buckets[_bkt_i].count != _bkt_count) { \ hh 342 src/dps8/uthash.h (head)->hh.tbl->buckets[_bkt_i].count, _bkt_count); \ hh 345 src/dps8/uthash.h if (_count != (head)->hh.tbl->num_items) { \ hh 347 src/dps8/uthash.h (head)->hh.tbl->num_items, _count ); \ hh 352 src/dps8/uthash.h _thh = &(head)->hh; \ hh 359 src/dps8/uthash.h _prev = (char*)ELMT_FROM_HH((head)->hh.tbl, _thh); \ hh 361 src/dps8/uthash.h (head)->hh.tbl->hho) : NULL ); \ hh 363 src/dps8/uthash.h if (_count != (head)->hh.tbl->num_items) { \ hh 365 src/dps8/uthash.h (head)->hh.tbl->num_items, _count ); \ hh 370 src/dps8/uthash.h # define HASH_FSCK(hh,head) hh 383 src/dps8/uthash.h # define HASH_EMIT_KEY(hh,head,keyptr,fieldlen) \ hh 390 src/dps8/uthash.h # define HASH_EMIT_KEY(hh,head,keyptr,fieldlen) hh 667 src/dps8/uthash.h # define HASH_FIND_IN_BKT(tbl,hh,head,keyptr,keylen_in,out) \ hh 672 src/dps8/uthash.h if ((out)->hh.keylen == keylen_in) { \ hh 673 src/dps8/uthash.h if ((HASH_KEYCMP((out)->hh.key,keyptr,keylen_in)) == 0) break; \ hh 675 src/dps8/uthash.h if ((out)->hh.hh_next) \ hh 676 src/dps8/uthash.h DECLTYPE_ASSIGN(out,ELMT_FROM_HH(tbl,(out)->hh.hh_next)); \ hh 704 src/dps8/uthash.h # define HASH_DEL_IN_BKT(hh,head,hh_del) \ hh 807 src/dps8/uthash.h # define HASH_SORT(head,cmpfcn) HASH_SRT(hh,head,cmpfcn) hh 808 src/dps8/uthash.h # define HASH_SRT(hh,head,cmpfcn) \ hh 816 src/dps8/uthash.h _hs_list = &((head)->hh); \ hh 830 src/dps8/uthash.h (head)->hh.tbl->hho)) : NULL); \ hh 839 src/dps8/uthash.h (head)->hh.tbl->hho)) : NULL); \ hh 845 src/dps8/uthash.h (head)->hh.tbl->hho)) : NULL); \ hh 848 src/dps8/uthash.h cmpfcn(DECLTYPE(head)(ELMT_FROM_HH((head)->hh.tbl,_hs_p)), \ hh 849 src/dps8/uthash.h DECLTYPE(head)(ELMT_FROM_HH((head)->hh.tbl,_hs_q))) \ hh 854 src/dps8/uthash.h (head)->hh.tbl->hho)) : NULL); \ hh 860 src/dps8/uthash.h (head)->hh.tbl->hho)) : NULL); \ hh 865 src/dps8/uthash.h ELMT_FROM_HH((head)->hh.tbl,_hs_e) : NULL); \ hh 870 src/dps8/uthash.h ELMT_FROM_HH((head)->hh.tbl,_hs_tail) : NULL); \ hh 878 src/dps8/uthash.h (head)->hh.tbl->tail = _hs_tail; \ hh 879 src/dps8/uthash.h DECLTYPE_ASSIGN(head,ELMT_FROM_HH((head)->hh.tbl, _hs_list)); \ hh 883 src/dps8/uthash.h HASH_FSCK(hh,head); \ hh 933 src/dps8/uthash.h # define HASH_CLEAR(hh,head) \ hh 936 src/dps8/uthash.h uthash_free((head)->hh.tbl->buckets, \ hh 937 src/dps8/uthash.h (head)->hh.tbl->num_buckets*sizeof(struct UT_hash_bucket)); \ hh 938 src/dps8/uthash.h HASH_BLOOM_FREE((head)->hh.tbl); \ hh 939 src/dps8/uthash.h uthash_free((head)->hh.tbl, sizeof(UT_hash_table)); \ hh 944 src/dps8/uthash.h # define HASH_OVERHEAD(hh,head) \ hh 945 src/dps8/uthash.h (size_t)((((head)->hh.tbl->num_items * sizeof(UT_hash_handle)) + \ hh 946 src/dps8/uthash.h ((head)->hh.tbl->num_buckets * sizeof(UT_hash_bucket)) + \ hh 951 src/dps8/uthash.h # define HASH_ITER(hh,head,el,tmp) \ hh 952 src/dps8/uthash.h for((el)=(head), (*(char**)(&(tmp)))=(char*)((head)?(head)->hh.next:NULL); \ hh 953 src/dps8/uthash.h el; (el)=(tmp),(*(char**)(&(tmp)))=(char*)((tmp)?(tmp)->hh.next:NULL)) hh 955 src/dps8/uthash.h # define HASH_ITER(hh,head,el,tmp) \ hh 956 src/dps8/uthash.h for((el)=(head),(tmp)=DECLTYPE(el)((head)?(head)->hh.next:NULL); \ hh 957 src/dps8/uthash.h el; (el)=(tmp),(tmp)=DECLTYPE(el)((tmp)?(tmp)->hh.next:NULL)) hh 961 src/dps8/uthash.h # define HASH_COUNT(head) HASH_CNT(hh,head) hh 962 src/dps8/uthash.h # define HASH_CNT(hh,head) ((head)?((head)->hh.tbl->num_items):0)