X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=macosx%2Fosxctrls.m;h=27c2c52bac6da661b235135586185c4d0cc12aaf;hb=9dd9860cc84f82309de64c33e2813c6e9dc60749;hp=12e813c9058cb0e63a3a04440039b375e786d0fd;hpb=34f747421d33c977e079481e24cfc0000ab0cf33;p=PuTTY.git diff --git a/macosx/osxctrls.m b/macosx/osxctrls.m index 12e813c9..27c2c52b 100644 --- a/macosx/osxctrls.m +++ b/macosx/osxctrls.m @@ -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); } @@ -1742,7 +1736,7 @@ void dlg_beep(void *dv) NSBeep(); } -void dlg_error_msg(void *dv, char *msg) +void dlg_error_msg(void *dv, const char *msg) { /* FIXME */ } @@ -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; -}