Lines Matching defs:dt
29 int dtclose(reg Dt_t* dt)
31 int dtclose(dt)
32 reg Dt_t* dt;
38 if(!dt || dt->nview > 0 ) /* can't close if being viewed */
42 disc = dt->disc;
44 (ev = (*disc->eventf)(dt,DT_CLOSE,NIL(Void_t*),disc)) < 0)
47 if(dt->view) /* turn off viewing */
48 dtview(dt,NIL(Dt_t*));
51 { (void)(*(dt->meth->searchf))(dt,NIL(Void_t*),DT_CLEAR);
52 if(dtsize(dt) > 0)
55 if(dt->data->ntab > 0)
56 (*dt->memoryf)(dt,(Void_t*)dt->data->htab,0,disc);
57 (*dt->memoryf)(dt,(Void_t*)dt->data,0,disc);
60 if(dt->type == DT_MALLOC)
61 free((Void_t*)dt);
62 else if(ev == 0 && dt->type == DT_MEMORYF)
63 (*dt->memoryf)(dt, (Void_t*)dt, 0, disc);
66 (void)(*disc->eventf)(dt, DT_ENDCLOSE, NIL(Void_t*), disc);