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

[terminal] cast

This commit is contained in:
Witold Filipczyk 2022-01-26 17:58:29 +01:00
parent 20aea2ceaf
commit 0e2fdce434
4 changed files with 10 additions and 10 deletions

View File

@ -124,7 +124,7 @@ term_send_event(struct terminal *term, struct term_event *ev)
/* We need to send event to correct tab, not to the first one. --karpov */
/* ...if we want to send it to a tab at all. --pasky */
win = term->windows.next;
win = (struct window *)term->windows.next;
if (win->type == WINDOW_TAB) {
win = get_current_tab(term);
assertm(win != NULL, "No tab to send the event to!");

View File

@ -119,7 +119,7 @@ get_tab_by_number(struct terminal *term, int num)
* window. */
assertm((LIST_OF(struct window) *) win != &term->windows,
"tab number out of range");
if_assert_failed return term->windows.next;
if_assert_failed return (struct window *)term->windows.next;
return win;
}
@ -150,7 +150,7 @@ switch_to_tab(struct terminal *term, int tab, int tabs_count)
if (tabs_count > 1) {
if (get_opt_bool("ui.tabs.wraparound",
get_current_tab(term)->data)) {
(struct session *)get_current_tab(term)->data)) {
tab %= tabs_count;
if (tab < 0) tab += tabs_count;
} else
@ -183,7 +183,7 @@ switch_current_tab(struct session *ses, int direction)
static void
really_close_tab(void *ses_)
{
struct session *ses = ses_;
struct session *ses = (struct session *)ses_;
struct terminal *term = ses->tab->term;
struct window *current_tab = get_current_tab(term);
@ -223,7 +223,7 @@ close_tab(struct terminal *term, struct session *ses)
static void
really_close_tabs(void *ses_)
{
struct session *ses = ses_;
struct session *ses = (struct session *)ses_;
struct terminal *term = ses->tab->term;
struct window *current_tab = get_current_tab(term);
struct window *tab;
@ -278,7 +278,7 @@ open_uri_in_new_tab(struct session *ses, struct uri *uri, int in_background,
void
delayed_open(void *data)
{
struct delayed_open *deo = data;
struct delayed_open *deo = (struct delayed_open *)data;
assert(deo);
open_uri_in_new_tab(deo->ses, deo->uri, 0, 0);

View File

@ -84,7 +84,7 @@ get_default_terminal(void)
if (list_empty(terminals))
return NULL;
else
return terminals.next;
return (struct terminal *)terminals.next;
}
struct terminal *
@ -174,7 +174,7 @@ destroy_terminal(struct terminal *term)
term->current_tab = 0;
while (!list_empty(term->windows))
delete_window(term->windows.next);
delete_window((struct window *)term->windows.next);
/* mem_free_if(term->cwd); */
mem_free_if(term->title);
@ -212,7 +212,7 @@ void
destroy_all_terminals(void)
{
while (!list_empty(terminals))
destroy_terminal(terminals.next);
destroy_terminal((struct terminal *)terminals.next);
}
static void

View File

@ -135,7 +135,7 @@ static void
empty_window_handler(struct window *win, struct term_event *ev)
{
struct terminal *term = win->term;
struct ewd *ewd = win->data;
struct ewd *ewd = (struct ewd *)win->data;
void (*fn)(void *) = ewd->fn;
void *data = ewd->data;