Commit: 41cdb5d241647f60e608f08c5785a60171206128
Parent: 30fd1c900c6650d3a9629c27680bb27913f4fa53
Author: Randy Palamar
Date: Thu, 26 Aug 2021 18:17:18 -0600
menu.c: remove os_shell menu option
Diffstat:
4 files changed, 1 insertion(+), 30 deletions(-)
diff --git a/links.h b/links.h
@@ -309,8 +309,6 @@ int os_get_system_name(unsigned char *buffer);
unsigned char *os_conv_to_external_path(unsigned char *, unsigned char *);
unsigned char *os_fixup_external_program(unsigned char *);
int exe(char *, int);
-int can_open_os_shell(int);
-unsigned char *links_xterm(void);
struct open_in_new *get_open_in_new(int);
void os_free_clipboard(void);
diff --git a/menu.c b/menu.c
@@ -1391,13 +1391,6 @@ static void cache_opt(struct terminal *term, void *xxx, void *yyy)
do_dialog(term, d, getml(d, NULL));
}
-static void menu_shell(struct terminal *term, void *xxx, void *yyy)
-{
- unsigned char *sh;
- if (!(sh = cast_uchar GETSHELL)) sh = cast_uchar DEFAULT_SHELL;
- exec_on_terminal(term, sh, cast_uchar "", 1);
-}
-
static void menu_kill_background_connections(struct terminal *term, void *xxx, void *yyy)
{
abort_background_connections();
@@ -1819,20 +1812,7 @@ static void do_file_menu(struct terminal *term, void *xxx, void *ses_)
}
memcpy(e, file_menu22, sizeof(file_menu22));
e += sizeof(file_menu22) / sizeof(struct menu_item);
- /*cast_uchar "", cast_uchar "", M_BAR, NULL, NULL, 0, 0,
- TEXT_(T_OS_SHELL), cast_uchar "", TEXT_(T_HK_OS_SHELL), menu_shell, NULL, 0, 0,*/
x = 1;
- if (!anonymous && can_open_os_shell(term->environment)) {
- e->text = TEXT_(T_OS_SHELL);
- e->rtext = cast_uchar "";
- e->hotkey = TEXT_(T_HK_OS_SHELL);
- e->func = menu_shell;
- e->data = NULL;
- e->in_m = 0;
- e->free_i = 0;
- e++;
- x = 0;
- }
memcpy(e, file_menu3 + x, sizeof(file_menu3) - x * sizeof(struct menu_item));
do_menu(term, file_menu, ses);
}
diff --git a/os_dep.c b/os_dep.c
@@ -447,7 +447,7 @@ static void exec_new_links(struct terminal *term, unsigned char *xterm, unsigned
free(str);
}
-unsigned char *links_xterm(void)
+static unsigned char *links_xterm(void)
{
unsigned char *xterm;
if (!(xterm = cast_uchar getenv("LINKS_XTERM"))) {
@@ -501,11 +501,6 @@ struct open_in_new *get_open_in_new(int environment)
return oin;
}
-int can_open_os_shell(int environment)
-{
- return 1;
-}
-
void os_detach_console(void)
{
#if !defined(NO_FORK_ON_EXIT)
diff --git a/os_dep.h b/os_dep.h
@@ -6,6 +6,4 @@
static inline int dir_sep(unsigned char x) { return x == '/'; }
#define SYSTEM_ID 1
#define SYSTEM_NAME "Unix"
-#define DEFAULT_SHELL "/bin/sh"
-#define GETSHELL getenv("SHELL")
#define SHARED_CONFIG_DIR "/etc/"