mirror of
https://github.com/MidnightCommander/mc
synced 2025-03-01 13:45:29 +03:00
key.c (init_key): Fix crash if TERM is unset.
This commit is contained in:
parent
9d99466d6a
commit
c09c4f0ffc
@ -1,3 +1,7 @@
|
||||
2003-05-29 Andrew V. Samoilov <sav@bcs.zp.ua>
|
||||
|
||||
key.c (init_key): Fix crash if TERM is unset.
|
||||
|
||||
2003-05-29 Koblinger Egmont <egmont@uhulinux.hu>
|
||||
|
||||
* ext.c (regex_check_type): Recognize and skip "/dev/stdin:"
|
||||
|
@ -338,18 +338,19 @@ void init_key (void)
|
||||
/* This has to be the first define_sequence */
|
||||
/* So, we can assume that the first keys member has ESC */
|
||||
define_sequences (mc_default_keys);
|
||||
|
||||
|
||||
/* Terminfo on irix does not have some keys */
|
||||
if ((!strncmp (term, "iris-ansi", 9)) || (!strncmp (term, "xterm", 5)))
|
||||
if (term &&
|
||||
((!strncmp (term, "iris-ansi", 9)) || (!strncmp (term, "xterm", 5))))
|
||||
define_sequences (xterm_key_defines);
|
||||
|
||||
|
||||
define_sequences (mc_bindings);
|
||||
|
||||
/* load some additional keys (e.g. direct Alt-? support) */
|
||||
load_xtra_key_defines();
|
||||
|
||||
#ifdef __QNX__
|
||||
if (strncmp(term, "qnx", 3) == 0){
|
||||
if (term && strncmp (term, "qnx", 3) == 0) {
|
||||
/* Modify the default value of use_8th_bit_as_meta: we would
|
||||
* like to provide a working mc for a newbie who knows nothing
|
||||
* about [Options|Display bits|Full 8 bits input]...
|
||||
|
Loading…
x
Reference in New Issue
Block a user