]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - macosx/osxctrls.m
Completely remove the privdata mechanism in dialog.h.
[PuTTY.git] / macosx / osxctrls.m
index 12e813c9058cb0e63a3a04440039b375e786d0fd..b4270f9d4c38a011a7212ccfea3509e210da0728 100644 (file)
@@ -243,8 +243,6 @@ struct fe_ctrl {
     NSTableView *tableview;
     NSScrollView *scrollview;
     int nradiobuttons;
-    void *privdata;
-    int privdata_needs_free;
 };
 
 static int fe_ctrl_cmp_by_ctrl(void *av, void *bv)
@@ -346,16 +344,12 @@ static struct fe_ctrl *fe_ctrl_new(union control *ctrl)
     c->scrollview = nil;
     c->radiobuttons = NULL;
     c->nradiobuttons = 0;
-    c->privdata = NULL;
-    c->privdata_needs_free = FALSE;
 
     return c;
 }
 
 static void fe_ctrl_free(struct fe_ctrl *c)
 {
-    if (c->privdata_needs_free)
-       sfree(c->privdata);
     sfree(c->radiobuttons);
     sfree(c);
 }
@@ -1785,31 +1779,3 @@ void dlg_refresh(union control *ctrl, void *dv)
        }
     }
 }
-
-void *dlg_get_privdata(union control *ctrl, void *dv)
-{
-    struct fe_dlg *d = (struct fe_dlg *)dv;
-    struct fe_ctrl *c = fe_ctrl_byctrl(d, ctrl);
-    return c->privdata;
-}
-
-void dlg_set_privdata(union control *ctrl, void *dv, void *ptr)
-{
-    struct fe_dlg *d = (struct fe_dlg *)dv;
-    struct fe_ctrl *c = fe_ctrl_byctrl(d, ctrl);
-    c->privdata = ptr;
-    c->privdata_needs_free = FALSE;
-}
-
-void *dlg_alloc_privdata(union control *ctrl, void *dv, size_t size)
-{
-    struct fe_dlg *d = (struct fe_dlg *)dv;
-    struct fe_ctrl *c = fe_ctrl_byctrl(d, ctrl);
-    /*
-     * This is an internal allocation routine, so it's allowed to
-     * use smalloc directly.
-     */
-    c->privdata = smalloc(size);
-    c->privdata_needs_free = TRUE;
-    return c->privdata;
-}