Lines Matching defs:dt
30 Dtmethod_t* dtmethod(Dt_t* dt, Dtmethod_t* meth)
32 Dtmethod_t* dtmethod(dt, meth)
33 Dt_t* dt;
38 reg Dtdisc_t* disc = dt->disc;
39 reg Dtmethod_t* oldmeth = dt->meth;
45 (*disc->eventf)(dt,DT_METH,(Void_t*)meth,disc) < 0)
48 dt->data->minp = 0;
51 list = dtflatten(dt);
53 if(dt->data->type&(DT_LIST|DT_STACK|DT_QUEUE) )
54 dt->data->head = NIL(Dtlink_t*);
55 else if(dt->data->type&(DT_SET|DT_BAG) )
56 { if(dt->data->ntab > 0)
57 (*dt->memoryf)(dt,(Void_t*)dt->data->htab,0,disc);
58 dt->data->ntab = 0;
59 dt->data->htab = NIL(Dtlink_t**);
62 dt->data->here = NIL(Dtlink_t*);
63 dt->data->type = (dt->data->type&~(DT_METHODS|DT_FLATTEN)) | meth->type;
64 dt->meth = meth;
65 if(dt->searchf == oldmeth->searchf)
66 dt->searchf = meth->searchf;
77 dt->data->head = list;
80 { dt->data->size = 0;
83 (*meth->searchf)(dt,(Void_t*)list,DT_RENEW);
93 dt->data->size = dt->data->loop = 0;
99 list->hash = _DTHSH(dt,key,disc,disc->size);
101 (void)(*meth->searchf)(dt,(Void_t*)list,DT_RENEW);