Lines Matching defs:dt
77 Void_t* dtrenew(Dt_t* dt, reg Void_t* obj)
79 Void_t* dtrenew(dt, obj)
80 Dt_t* dt;
87 reg Dtdisc_t* disc = dt->disc;
89 UNFLATTEN(dt);
91 if(!(e = dt->data->here) || OBJ(e,disc) != obj)
94 if(dt->data->type&DT_TREE)
96 dt->data->here = e->left;
101 dt->data->here = r;
104 else if(dt->data->type&DT_HASH)
105 { slot = dt->data->htab + HINDEX(dt->data->ntab,e->hash);
114 e->hash = HASH(dt,key,disc);
115 dt->data->here = NIL(Dtlink_t*);
117 else if(dt->data->type&DT_LIST)
120 for(t = dt->data->head->left; t != e->left; r = t, t = t->right->left)
123 if(e == (t = r ? r->right : dt->data->head) )
126 else dt->data->head = e->right;
135 { r = r ? r->right : dt->data->head;
140 dt->data->here = NIL(Dtlink_t*);
142 else /* if(dt->data->type&(DT_STACK|DT_QUEUE)) */
143 { dt->data->here = NIL(Dtlink_t*);
147 dt->data->size -= 1;
148 return (*dt->meth->searchf)(dt,(Void_t*)e,DT_RENEW) ? obj : NIL(Void_t*);