- char *savedsession;
-
- /*
- * The first time we're called in a new dialog, we must
- * allocate space to store the current contents of the saved
- * session edit box (since it must persist even when we switch
- * panels, but is not part of the Conf).
- *
- * FIXME: this is disgusting, and we'd do much better to have
- * the persistent storage be dynamically allocated and get rid
- * of the arbitrary limit SAVEDSESSION_LEN. To do that would
- * require a means of making sure the memory gets freed at the
- * appropriate moment.
- */
- if (!ssd->editbox) {
- savedsession = NULL;
- } else if (!dlg_get_privdata(ssd->editbox, dlg)) {
- savedsession = (char *)
- dlg_alloc_privdata(ssd->editbox, dlg, SAVEDSESSION_LEN);
- savedsession[0] = '\0';
- } else {
- savedsession = dlg_get_privdata(ssd->editbox, dlg);
- }