mirror of https://github.com/MidnightCommander/mc
* main.c (OS_Setup) [!HAVE_X]: Exit immediately if TERM
environment variable is unset or empty.
This commit is contained in:
parent
926aa5ac6b
commit
af11550b22
|
@ -1,3 +1,8 @@
|
|||
2001-05-27 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* main.c (OS_Setup) [!HAVE_X]: Exit immediately if TERM
|
||||
environment variable is unset or empty.
|
||||
|
||||
2001-05-25 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* cmd.c: Clean up useless preprocessor directives.
|
||||
|
|
10
src/main.c
10
src/main.c
|
@ -2368,17 +2368,15 @@ char control_file [sizeof (CONTROL_FILE) + 8];
|
|||
static void
|
||||
OS_Setup ()
|
||||
{
|
||||
char *termvalue;
|
||||
char *mc_libdir;
|
||||
#ifndef HAVE_X
|
||||
char *termvalue;
|
||||
|
||||
termvalue = getenv ("TERM");
|
||||
if (!termvalue){
|
||||
#ifndef HAVE_X
|
||||
if (!termvalue || !(*termvalue)){
|
||||
fprintf (stderr, _("The TERM environment variable is unset!\n"));
|
||||
#endif
|
||||
termvalue = "";
|
||||
exit (1);
|
||||
}
|
||||
#ifndef HAVE_X
|
||||
if (force_xterm || (strncmp (termvalue, "xterm", 5) == 0 || strcmp (termvalue, "dtterm") == 0)){
|
||||
use_mouse_p = XTERM_MOUSE;
|
||||
xterm_flag = 1;
|
||||
|
|
Loading…
Reference in New Issue