diff --git a/src/dialogs/menu.c b/src/dialogs/menu.c index 57aaceccd..1a5680f6b 100644 --- a/src/dialogs/menu.c +++ b/src/dialogs/menu.c @@ -630,7 +630,7 @@ add_cmdline_bool_option(struct string *string, char *name) void open_uri_in_new_window(struct session *ses, struct uri *uri, struct uri *referrer, - enum term_env_type env, cache_mode_T cache_mode, + term_env_type_T env, cache_mode_T cache_mode, enum task_type task) { int ring = get_cmd_opt_int("session-ring"); diff --git a/src/dialogs/menu.h b/src/dialogs/menu.h index 7d7f51ab7..9906f243d 100644 --- a/src/dialogs/menu.h +++ b/src/dialogs/menu.h @@ -35,7 +35,7 @@ void save_url_as(struct session *ses); void open_uri_in_new_window(struct session *ses, struct uri *uri, struct uri *referrer, - enum term_env_type env, cache_mode_T cache_mode, + term_env_type_T env, cache_mode_T cache_mode, enum task_type task); void send_open_new_window(struct terminal *term, const struct open_in_new *open, struct session *ses); diff --git a/src/osdep/newwin.c b/src/osdep/newwin.c index f2d75dbb1..16f2a7ac7 100644 --- a/src/osdep/newwin.c +++ b/src/osdep/newwin.c @@ -61,7 +61,7 @@ can_open_in_new(struct terminal *term) void open_new_window(struct terminal *term, char *exe_name, - enum term_env_type environment, char *param) + term_env_type_T environment, char *param) { char *command = NULL; int i; diff --git a/src/osdep/newwin.h b/src/osdep/newwin.h index 4baa195ce..350dc08af 100644 --- a/src/osdep/newwin.h +++ b/src/osdep/newwin.h @@ -10,7 +10,7 @@ extern "C" { /* {struct open_in_new} and @open_in_new is used for setting up menues * of how new windows can be opened. */ struct open_in_new { - enum term_env_type env; /* The term->environment the entry covers */ + term_env_type_T env; /* The term->environment the entry covers */ char *command; /* The default command for openning a window */ char *text; /* The menu text */ }; @@ -33,7 +33,7 @@ int can_open_in_new(struct terminal *term); * For the ENV_XWIN environment, @exe_name being 'elinks' and @param empty the * window will be opened using: 'xterm -e elinks' */ void open_new_window(struct terminal *term, char *exe_name, - enum term_env_type environment, char *param); + term_env_type_T environment, char *param); #ifdef __cplusplus } diff --git a/src/session/task.c b/src/session/task.c index 47d5dcf84..f32a93b45 100644 --- a/src/session/task.c +++ b/src/session/task.c @@ -615,7 +615,7 @@ do_follow_url(struct session *ses, struct uri *uri, char *target, && can_open_in_new(ses->tab->term) && !get_cmd_opt_bool("no-connect") && !get_cmd_opt_bool("no-home")) { - enum term_env_type env = ses->tab->term->environment; + term_env_type_T env = ses->tab->term->environment; open_uri_in_new_window(ses, uri, referrer, env, cache_mode, task); diff --git a/src/terminal/terminal.h b/src/terminal/terminal.h index 9ced4e1b2..8ddb744dc 100644 --- a/src/terminal/terminal.h +++ b/src/terminal/terminal.h @@ -48,6 +48,8 @@ enum term_env_type { ENV_ANY = ~0, }; +typedef int term_env_type_T; + enum term_redrawing_state { TREDRAW_READY = 0, /**< Can redraw */ TREDRAW_BUSY = 1, /**< Redrawing already in progress */ @@ -157,7 +159,7 @@ struct terminal { #endif /** The type of environment this terminal lives in. */ - enum term_env_type environment; + term_env_type_T environment; /** The current working directory for this terminal / ELinks instance. */ char cwd[MAX_CWD_LEN];