1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-28 03:06:20 -04:00

Add free_textarea_data wrapper for done_textarea_data and use in destroy_terminal

Unexport done_textarea_data.
This commit is contained in:
Miciah Dashiel Butler Masters 2007-09-01 11:58:09 +00:00 committed by Miciah Dashiel Butler Masters
parent 6469344727
commit ac230ebc08
3 changed files with 12 additions and 6 deletions

View File

@ -119,10 +119,7 @@ destroy_terminal(struct terminal *term)
bookmark_auto_save_tabs(term);
#endif
if (term->textarea_data) {
done_textarea_data(term->textarea_data);
term->textarea_data = NULL;
}
free_textarea_data(term);
/* delete_window doesn't update term->current_tab, but it
calls redraw_terminal, which requires term->current_tab

View File

@ -599,13 +599,22 @@ init_textarea_data(struct terminal *term, struct form_state *fs,
return td;
}
void
static void
done_textarea_data(struct textarea_data *td)
{
mem_free(td->fn);
mem_free(td);
}
void
free_textarea_data(struct terminal *term)
{
assert(term);
if (term->textarea_data)
done_textarea_data(term->textarea_data);
}
void
textarea_edit(int op, struct terminal *term_, struct form_state *fs_,
struct document_view *doc_view_, struct link *link_)

View File

@ -21,7 +21,7 @@ int area_cursor(struct form_control *fc, struct form_state *fs);
void draw_textarea(struct terminal *term, struct form_state *fs, struct document_view *doc_view, struct link *link);
unsigned char *encode_textarea(struct submitted_value *sv);
void done_textarea_data(struct textarea_data *td);
void free_textarea_data(struct terminal *term);
void textarea_edit(int, struct terminal *, struct form_state *, struct document_view *, struct link *);
void menu_textarea_edit(struct terminal *term, void *xxx, void *ses_);