-void *dlg_get_privdata(union control *ctrl, void *dlg)
-{
- struct dlgparam *dp = (struct dlgparam *)dlg;
- struct uctrl *uc = dlg_find_byctrl(dp, ctrl);
- return uc->privdata;
-}
-
-void dlg_set_privdata(union control *ctrl, void *dlg, void *ptr)
-{
- struct dlgparam *dp = (struct dlgparam *)dlg;
- struct uctrl *uc = dlg_find_byctrl(dp, ctrl);
- uc->privdata = ptr;
- uc->privdata_needs_free = FALSE;
-}
-
-void *dlg_alloc_privdata(union control *ctrl, void *dlg, size_t size)
-{
- struct dlgparam *dp = (struct dlgparam *)dlg;
- struct uctrl *uc = dlg_find_byctrl(dp, ctrl);
- /*
- * This is an internal allocation routine, so it's allowed to
- * use smalloc directly.
- */
- uc->privdata = smalloc(size);
- uc->privdata_needs_free = FALSE;
- return uc->privdata;
-}
-