1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[formhist] cast

This commit is contained in:
Witold Filipczyk 2022-01-24 20:39:32 +01:00
parent d822b6af9c
commit 0029ed4c54
2 changed files with 9 additions and 9 deletions

View File

@ -45,7 +45,7 @@ is_formhist_data_used(struct listbox_item *item)
static char * static char *
get_formhist_data_text(struct listbox_item *item, struct terminal *term) get_formhist_data_text(struct listbox_item *item, struct terminal *term)
{ {
struct formhist_data *formhist_data = item->udata; struct formhist_data *formhist_data = (struct formhist_data *)item->udata;
return stracpy(formhist_data->url); return stracpy(formhist_data->url);
} }
@ -53,7 +53,7 @@ get_formhist_data_text(struct listbox_item *item, struct terminal *term)
static char * static char *
get_formhist_data_info(struct listbox_item *item, struct terminal *term) get_formhist_data_info(struct listbox_item *item, struct terminal *term)
{ {
struct formhist_data *formhist_data = item->udata; struct formhist_data *formhist_data = (struct formhist_data *)item->udata;
struct string info; struct string info;
struct submitted_value *sv; struct submitted_value *sv;
@ -88,7 +88,7 @@ get_formhist_data_info(struct listbox_item *item, struct terminal *term)
static struct uri * static struct uri *
get_formhist_data_uri(struct listbox_item *item) get_formhist_data_uri(struct listbox_item *item)
{ {
struct formhist_data *formhist_data = item->udata; struct formhist_data *formhist_data = (struct formhist_data *)item->udata;
return get_uri(formhist_data->url, URI_NONE); return get_uri(formhist_data->url, URI_NONE);
} }
@ -108,7 +108,7 @@ can_delete_formhist_data(struct listbox_item *item)
static void static void
delete_formhist_data(struct listbox_item *item, int last) delete_formhist_data(struct listbox_item *item, int last)
{ {
struct formhist_data *formhist_data = item->udata; struct formhist_data *formhist_data = (struct formhist_data *)item->udata;
assert(!is_object_used(formhist_data)); assert(!is_object_used(formhist_data));
@ -167,7 +167,7 @@ push_login_button(struct dialog_data *dlg_data,
if (!box->sel || !box->sel->udata) return EVENT_PROCESSED; if (!box->sel || !box->sel->udata) return EVENT_PROCESSED;
formhist_data = box->sel->udata; formhist_data = (struct formhist_data *)box->sel->udata;
if (formhist_data->dontsave) { if (formhist_data->dontsave) {
info_box(term, 0, N_("Form not saved"), ALIGN_CENTER, info_box(term, 0, N_("Form not saved"), ALIGN_CENTER,
@ -191,7 +191,7 @@ push_toggle_dontsave_button(struct dialog_data *dlg_data,
if (!box->sel || !box->sel->udata) return EVENT_PROCESSED; if (!box->sel || !box->sel->udata) return EVENT_PROCESSED;
formhist_data = box->sel->udata; formhist_data = (struct formhist_data *)box->sel->udata;
formhist_data->dontsave = !formhist_data->dontsave; formhist_data->dontsave = !formhist_data->dontsave;
return EVENT_PROCESSED; return EVENT_PROCESSED;

View File

@ -336,7 +336,7 @@ forget_forms_with_url(char *url)
static void static void
remember_form(void *form_) remember_form(void *form_)
{ {
struct formhist_data *form = form_; struct formhist_data *form = (struct formhist_data *)form_;
forget_forms_with_url(form->url); forget_forms_with_url(form->url);
add_to_list(saved_forms, form); add_to_list(saved_forms, form);
@ -347,7 +347,7 @@ remember_form(void *form_)
static void static void
dont_remember_form(void *form_) dont_remember_form(void *form_)
{ {
struct formhist_data *form = form_; struct formhist_data *form = (struct formhist_data *)form_;
done_formhist_item(form); done_formhist_item(form);
} }
@ -355,7 +355,7 @@ dont_remember_form(void *form_)
static void static void
never_for_this_site(void *form_) never_for_this_site(void *form_)
{ {
struct formhist_data *form = form_; struct formhist_data *form = (struct formhist_data *)form_;
form->dontsave = 1; form->dontsave = 1;
remember_form(form); remember_form(form);