summaryrefslogtreecommitdiffstats
path: root/recipes-extended/mc
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-extended/mc')
-rw-r--r--recipes-extended/mc/mc/0001-disable-Ctrl-g-key-and-Ctrl-key.patch86
-rw-r--r--recipes-extended/mc/mc_4.7.5.2.bb1
2 files changed, 87 insertions, 0 deletions
diff --git a/recipes-extended/mc/mc/0001-disable-Ctrl-g-key-and-Ctrl-key.patch b/recipes-extended/mc/mc/0001-disable-Ctrl-g-key-and-Ctrl-key.patch
new file mode 100644
index 0000000..eddc12f
--- /dev/null
+++ b/recipes-extended/mc/mc/0001-disable-Ctrl-g-key-and-Ctrl-key.patch
@@ -0,0 +1,86 @@
1From 91a1068015a09232bacac9b86fc13b318860f44e Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Fri, 18 Aug 2017 17:05:42 +0800
4Subject: [PATCH] disable Ctrl-g key and Ctrl-\ key
5
6Since ncurses upgraded to 6.0+20170715, it compile failed
7...
8| ../../../mc-4.7.5.2/lib/tty/tty-ncurses.c: In function 'tty_init':
9| ../../../mc-4.7.5.2/lib/tty/tty-ncurses.c:163:13: error:
10dereferencing pointer to incomplete type 'TERMINAL {aka struct term}'
11| cur_term->Nttyb.c_cc[VINTR] = CTRL ('g'); /* ^g */
12...
13
14We could not backport fix from the latest master which introduce
15gplv3 contamination, but we could revert the following commits.
16...
17commit a20ebb38184e177f2ead8466f3ef1f131352aba7
18Author: Andrew Borodin <aborodin@vmail.ru>
19Date: Wed Dec 23 16:18:25 2009 +0000
20
21 Ticket #1876: use Ctrl-g key to generate SIGINT signal.
22
23commit 56bf77ae57ba493126a2d1a1e0dd56eb947ccca1
24Author: Andrew Borodin <aborodin@vmail.ru>
25Date: Sat Feb 6 13:07:35 2010 +0300
26
27 Ticket #1926: Ctrl-\ key behaviour in NCurses-based MC.
28...
29
30Upstream-Status: Inappropriate [gplv2 specific]
31https://github.com/MidnightCommander/mc.git
32
33Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
34---
35 lib/tty/tty-ncurses.c | 6 ------
36 lib/tty/tty-slang.c | 4 ++--
37 src/keybind-defaults.c | 1 -
38 3 files changed, 2 insertions(+), 9 deletions(-)
39
40diff --git a/lib/tty/tty-ncurses.c b/lib/tty/tty-ncurses.c
41index ab61891..6c614ac 100644
42--- a/lib/tty/tty-ncurses.c
43+++ b/lib/tty/tty-ncurses.c
44@@ -159,12 +159,6 @@ tty_init (gboolean slow, gboolean ugly_lines)
45 ESCDELAY = 200;
46 #endif /* HAVE_ESCDELAY */
47
48- /* use Ctrl-g to generate SIGINT */
49- cur_term->Nttyb.c_cc[VINTR] = CTRL ('g'); /* ^g */
50- /* disable SIGQUIT to allow use Ctrl-\ key */
51- cur_term->Nttyb.c_cc[VQUIT] = NULL_VALUE;
52- tcsetattr (cur_term->Filedes, TCSANOW, &cur_term->Nttyb);
53-
54 tty_start_interrupt_key ();
55
56 do_enter_ca_mode ();
57diff --git a/lib/tty/tty-slang.c b/lib/tty/tty-slang.c
58index f42fd4a..0e92c52 100644
59--- a/lib/tty/tty-slang.c
60+++ b/lib/tty/tty-slang.c
61@@ -268,8 +268,8 @@ tty_init (gboolean slow, gboolean ugly_lines)
62
63 tcgetattr (fileno (stdin), &boot_mode);
64 /* 255 = ignore abort char; XCTRL('g') for abort char = ^g */
65- SLang_init_tty (XCTRL ('g'), 1, 0);
66-
67+ /* SLang_init_tty (XCTRL ('c'), 1, 0); */
68+ SLang_init_tty (255, 1, 0);
69 if (ugly_lines)
70 SLtt_Has_Alt_Charset = 0;
71
72diff --git a/src/keybind-defaults.c b/src/keybind-defaults.c
73index 28e3613..075e6b6 100644
74--- a/src/keybind-defaults.c
75+++ b/src/keybind-defaults.c
76@@ -368,7 +368,6 @@ const global_keymap_t default_dialog_keymap[] = {
77 {'\n', CK_DialogOK, "Enter"},
78 {KEY_ENTER, CK_DialogOK, "Enter"},
79 {ESC_CHAR, CK_DialogCancel, "Esc"},
80- {XCTRL ('g'), CK_DialogCancel, "C-g"},
81 {KEY_F (10), CK_DialogCancel, "F10"},
82 {KEY_LEFT, CK_DialogPrevItem, "Left"},
83 {KEY_UP, CK_DialogPrevItem, "Up"},
84--
851.8.3.1
86
diff --git a/recipes-extended/mc/mc_4.7.5.2.bb b/recipes-extended/mc/mc_4.7.5.2.bb
index b38964d..ca84966 100644
--- a/recipes-extended/mc/mc_4.7.5.2.bb
+++ b/recipes-extended/mc/mc_4.7.5.2.bb
@@ -10,6 +10,7 @@ PR = "r3"
10 10
11SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \ 11SRC_URI = "http://www.midnight-commander.org/downloads/${BPN}-${PV}.tar.bz2 \
12 file://mc-CTRL.patch \ 12 file://mc-CTRL.patch \
13 file://0001-disable-Ctrl-g-key-and-Ctrl-key.patch \
13 " 14 "
14 15
15SRC_URI[md5sum] = "bdae966244496cd4f6d282d80c9cf3c6" 16SRC_URI[md5sum] = "bdae966244496cd4f6d282d80c9cf3c6"