mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 10:04:32 +03:00
* slint.c (getch): Return -1, not SLANG_GETKEY_ERROR, otherwise
get_key_code() crashes when calling isalpha().
This commit is contained in:
parent
e9067abfaf
commit
935b5f8bc7
@ -1,5 +1,8 @@
|
|||||||
2002-11-28 Pavel Roskin <proski@gnu.org>
|
2002-11-28 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
* slint.c (getch): Return -1, not SLANG_GETKEY_ERROR, otherwise
|
||||||
|
get_key_code() crashes when calling isalpha().
|
||||||
|
|
||||||
* color.c (mc_init_pair) [HAVE_SLANG]: Pass "default", not NULL
|
* color.c (mc_init_pair) [HAVE_SLANG]: Pass "default", not NULL
|
||||||
to SLtt_set_color() - it fixes transparency with the latest
|
to SLtt_set_color() - it fixes transparency with the latest
|
||||||
versions of S-Lang. Treat foreground like background.
|
versions of S-Lang. Treat foreground like background.
|
||||||
|
2
src/TODO
2
src/TODO
@ -1,8 +1,6 @@
|
|||||||
Before 4.6.0-pre2
|
Before 4.6.0-pre2
|
||||||
=================
|
=================
|
||||||
|
|
||||||
Crash in isalpha() in key.c is c=0xFFFF.
|
|
||||||
|
|
||||||
get_byte() in view.c produces warnings in Valgrind.
|
get_byte() in view.c produces warnings in Valgrind.
|
||||||
|
|
||||||
Don't allow stdout and stderr from extfs scripts pollute the screen.
|
Don't allow stdout and stderr from extfs scripts pollute the screen.
|
||||||
|
11
src/slint.c
11
src/slint.c
@ -493,7 +493,8 @@ load_terminfo_keys (void)
|
|||||||
do_define_key (key_table [i].key_code, key_table [i].key_name);
|
do_define_key (key_table [i].key_code, key_table [i].key_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
int getch (void)
|
int
|
||||||
|
getch (void)
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
if (no_slang_delay)
|
if (no_slang_delay)
|
||||||
@ -502,11 +503,13 @@ int getch (void)
|
|||||||
|
|
||||||
c = SLang_getkey2 ();
|
c = SLang_getkey2 ();
|
||||||
if (c == SLANG_GETKEY_ERROR) {
|
if (c == SLANG_GETKEY_ERROR) {
|
||||||
fprintf (stderr, "SLang_getkey returned SLANG_GETKEY_ERROR\n"
|
fprintf (stderr,
|
||||||
"Assuming EOF on stdin and exiting\n");
|
"SLang_getkey returned SLANG_GETKEY_ERROR\n"
|
||||||
|
"Assuming EOF on stdin and exiting\n");
|
||||||
quiet_quit_cmd ();
|
quiet_quit_cmd ();
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
return (c);
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user