mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
[viewer] cast
This commit is contained in:
parent
af29b2a93f
commit
4837d4eb92
@ -660,7 +660,7 @@ dump_next(LIST_OF(struct string_list_item) *url_list)
|
||||
if (url_list) {
|
||||
/* Steal all them nice list items but keep the same order */
|
||||
while (!list_empty(*url_list)) {
|
||||
item = url_list->next;
|
||||
item = (struct string_list_item *)url_list->next;
|
||||
del_from_list(item);
|
||||
add_to_list_end(todo_list, item);
|
||||
}
|
||||
@ -672,7 +672,7 @@ dump_next(LIST_OF(struct string_list_item) *url_list)
|
||||
|
||||
program.terminate = 0;
|
||||
|
||||
item = todo_list.next;
|
||||
item = (struct string_list_item *)todo_list.next;
|
||||
del_from_list(item);
|
||||
add_to_list(done_list, item);
|
||||
|
||||
|
@ -135,7 +135,7 @@ fixup_select_state(struct el_form_control *fc, struct form_state *fs)
|
||||
void
|
||||
selected_item(struct terminal *term, void *item_, void *ses_)
|
||||
{
|
||||
struct session *ses = ses_;
|
||||
struct session *ses = (struct session *)ses_;
|
||||
int item = (long) item_;
|
||||
struct document_view *doc_view;
|
||||
struct link *link;
|
||||
@ -1436,7 +1436,7 @@ auto_submit_form(struct session *ses)
|
||||
struct document *document = ses->doc_view->document;
|
||||
|
||||
if (!list_empty(document->forms))
|
||||
submit_given_form(ses, ses->doc_view, document->forms.next, 0);
|
||||
submit_given_form(ses, ses->doc_view, (struct form *)document->forms.next, 0);
|
||||
}
|
||||
|
||||
|
||||
@ -1444,8 +1444,8 @@ auto_submit_form(struct session *ses)
|
||||
static void
|
||||
set_file_form_state(struct terminal *term, void *filename_, void *fs_)
|
||||
{
|
||||
char *filename = filename_;
|
||||
struct form_state *fs = fs_;
|
||||
char *filename = (char *)filename_;
|
||||
struct form_state *fs = (struct form_state *)fs_;
|
||||
|
||||
/* The menu code doesn't free the filename data */
|
||||
mem_free_set(&fs->value, filename);
|
||||
@ -1457,8 +1457,8 @@ set_file_form_state(struct terminal *term, void *filename_, void *fs_)
|
||||
static void
|
||||
file_form_menu(struct terminal *term, void *path_, void *fs_)
|
||||
{
|
||||
char *path = path_;
|
||||
struct form_state *fs = fs_;
|
||||
char *path = (char *)path_;
|
||||
struct form_state *fs = (struct form_state *)fs_;
|
||||
|
||||
/* FIXME: It doesn't work for ../../ */
|
||||
#if 0
|
||||
@ -1754,7 +1754,7 @@ field_op(struct session *ses, struct document_view *doc_view,
|
||||
break;
|
||||
}
|
||||
|
||||
text = memrchr(fs->value, ASCII_LF, fs->state);
|
||||
text = (char *)memrchr(fs->value, ASCII_LF, fs->state);
|
||||
if (text) {
|
||||
/* Leave the new-line character if it does not
|
||||
* immediately precede the cursor. */
|
||||
@ -2091,7 +2091,7 @@ get_form_info(struct session *ses, struct document_view *doc_view)
|
||||
static void
|
||||
link_form_menu_func(struct terminal *term, void *link_number_, void *ses_)
|
||||
{
|
||||
struct session *ses = ses_;
|
||||
struct session *ses = (struct session *)ses_;
|
||||
struct document_view *doc_view;
|
||||
int link_number = *(int *) link_number_;
|
||||
|
||||
|
@ -1309,7 +1309,7 @@ try_document_key(struct session *ses, struct document_view *doc_view,
|
||||
void
|
||||
link_menu(struct terminal *term, void *xxx, void *ses_)
|
||||
{
|
||||
struct session *ses = ses_;
|
||||
struct session *ses = (struct session *)ses_;
|
||||
struct document_view *doc_view;
|
||||
struct link *link;
|
||||
struct menu_item *mi;
|
||||
|
@ -1883,8 +1883,8 @@ struct search_dlg_hop {
|
||||
static widget_handler_status_T
|
||||
search_dlg_cancel(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
||||
{
|
||||
void (*fn)(void *) = widget_data->widget->data;
|
||||
struct search_dlg_hop *hop = dlg_data->dlg->udata2;
|
||||
void (*fn)(void *) = (void (*)(void *))widget_data->widget->data;
|
||||
struct search_dlg_hop *hop = (struct search_dlg_hop *)dlg_data->dlg->udata2;
|
||||
void *data = hop->data;
|
||||
|
||||
if (fn) fn(data);
|
||||
@ -1894,8 +1894,8 @@ search_dlg_cancel(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
||||
static widget_handler_status_T
|
||||
search_dlg_ok(struct dialog_data *dlg_data, struct widget_data *widget_data)
|
||||
{
|
||||
void (*fn)(void *, char *) = widget_data->widget->data;
|
||||
struct search_dlg_hop *hop = dlg_data->dlg->udata2;
|
||||
void (*fn)(void *, char *) = (void (*)(void *, char *))widget_data->widget->data;
|
||||
struct search_dlg_hop *hop = (struct search_dlg_hop *)dlg_data->dlg->udata2;
|
||||
void *data = hop->data;
|
||||
char *text = dlg_data->widgets_data->cdata;
|
||||
|
||||
@ -1997,7 +1997,7 @@ search_dlg(struct session *ses, struct document_view *doc_view, int direction)
|
||||
search_dlg_do(ses->tab->term, NULL,
|
||||
title, ses,
|
||||
&search_history,
|
||||
search_function);
|
||||
(void (*)(void *, char *))search_function);
|
||||
|
||||
return FRAME_EVENT_OK;
|
||||
}
|
||||
|
@ -176,7 +176,7 @@ format_text(char *text, int width, enum form_wrap wrap, int format)
|
||||
char *wrappos;
|
||||
|
||||
/* Find a place to wrap the text */
|
||||
wrappos = memrchr(&text[begin], ' ', pos - begin);
|
||||
wrappos = (char *)memrchr(&text[begin], ' ', pos - begin);
|
||||
if (wrappos) {
|
||||
/* When formatting text for form submitting we
|
||||
* have to apply the wrapping mode. */
|
||||
@ -611,7 +611,7 @@ free_textarea_data(struct terminal *term)
|
||||
assert(term);
|
||||
|
||||
if (term->textarea_data)
|
||||
done_textarea_data(term->textarea_data);
|
||||
done_textarea_data((struct textarea_data *)term->textarea_data);
|
||||
|
||||
term->textarea_data = NULL;
|
||||
}
|
||||
@ -666,7 +666,7 @@ textarea_edit(int op, struct terminal *term_, struct form_state *fs_,
|
||||
} else if (op == 1) {
|
||||
struct string file;
|
||||
|
||||
td = term_->textarea_data;
|
||||
td = (struct textarea_data *)term_->textarea_data;
|
||||
term_->textarea_data = NULL;
|
||||
assert(td);
|
||||
|
||||
@ -713,7 +713,7 @@ textarea_edit(int op, struct terminal *term_, struct form_state *fs_,
|
||||
void
|
||||
menu_textarea_edit(struct terminal *term, void *xxx, void *ses_)
|
||||
{
|
||||
struct session *ses = ses_;
|
||||
struct session *ses = (struct session *)ses_;
|
||||
struct document_view *doc_view;
|
||||
struct link *link;
|
||||
struct form_state *fs;
|
||||
|
@ -1559,7 +1559,7 @@ send_mouse_event(struct session *ses, struct document_view *doc_view,
|
||||
struct window *m;
|
||||
|
||||
activate_bfu_technology(ses, -1);
|
||||
m = term->windows.next;
|
||||
m = (struct window *)term->windows.next;
|
||||
m->handler(m, ev);
|
||||
|
||||
return ses;
|
||||
@ -1576,7 +1576,7 @@ send_mouse_event(struct session *ses, struct document_view *doc_view,
|
||||
&& mouse->y == term->prev_mouse_event.y) {
|
||||
if (current_tab->data == ses) ses = NULL;
|
||||
|
||||
close_tab(term, current_tab->data);
|
||||
close_tab(term, (struct session *)current_tab->data);
|
||||
}
|
||||
|
||||
return ses;
|
||||
@ -1594,7 +1594,7 @@ send_mouse_event(struct session *ses, struct document_view *doc_view,
|
||||
if (check_mouse_button(ev, B_MIDDLE)) {
|
||||
do_not_ignore_next_mouse_event(term);
|
||||
} else if (check_mouse_button(ev, B_RIGHT)) {
|
||||
tab_menu(current_tab->data, mouse->x, mouse->y, 1);
|
||||
tab_menu((struct session *)current_tab->data, mouse->x, mouse->y, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1653,10 +1653,10 @@ try_menu(struct session *ses, struct term_event *ev)
|
||||
|
||||
get_kbd_modifier(ev) &= ~KBD_MOD_ALT;
|
||||
activate_bfu_technology(ses, -1);
|
||||
win = ses->tab->term->windows.next;
|
||||
win = (struct window *)ses->tab->term->windows.next;
|
||||
win->handler(win, ev);
|
||||
if (ses->tab->term->windows.next == win) {
|
||||
deselect_mainmenu(win->term, win->data);
|
||||
deselect_mainmenu(win->term, (struct menu *)win->data);
|
||||
print_screen_status(ses);
|
||||
}
|
||||
if (!tabs_are_on_top(ses->tab->term)) {
|
||||
@ -1835,7 +1835,7 @@ static void
|
||||
save_formatted_finish(struct terminal *term, int h,
|
||||
void *data, enum download_flags flags)
|
||||
{
|
||||
struct document *document = data;
|
||||
struct document *document = (struct document *)data;
|
||||
|
||||
assert(term && document);
|
||||
if_assert_failed return;
|
||||
@ -1851,7 +1851,7 @@ save_formatted_finish(struct terminal *term, int h,
|
||||
static void
|
||||
save_formatted(void *data, char *file)
|
||||
{
|
||||
struct session *ses = data;
|
||||
struct session *ses = (struct session *)data;
|
||||
struct document_view *doc_view;
|
||||
|
||||
assert(ses && ses->tab && ses->tab->term && file);
|
||||
|
Loading…
Reference in New Issue
Block a user