mirror of
https://github.com/rkd77/elinks.git
synced 2025-01-03 14:57:44 -05:00
Add free_textarea_data wrapper for done_textarea_data and use in destroy_terminal
Unexport done_textarea_data.
This commit is contained in:
parent
6469344727
commit
ac230ebc08
@ -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
|
||||
|
@ -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_)
|
||||
|
@ -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_);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user