1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Bug 1004: Use c_toupper in a few more places.

src/config/kbdbind.c (parse_keystroke): If the user types "Ctrl-i",
it should mean "Ctrl-I" rather than "Ctrl-İ", because the Ctrl-
combinations are only well known for ASCII characters.  This does not
matter in practice though, because src/terminal/kbd.c converts 0x09
to (KBD_MOD_NONE, KBD_TAB) and not to (KBD_MOD_CTRL, 'I').

src/osdep/beos/beos.c (get_system_env): Changing the locale does not
affect the TERM environment variable, I think, so it should not affect
the interpretation either.
This commit is contained in:
Kalle Olavi Niemitalo 2008-10-26 19:47:53 +02:00 committed by Kalle Olavi Niemitalo
parent aaf6be8a36
commit 1ba7d5a260
2 changed files with 2 additions and 2 deletions

View File

@ -427,7 +427,7 @@ parse_keystroke(const unsigned char *s, struct term_event_keyboard *kbd)
* and instead make kbd_ev_lookup() or its callers
* search for different variants of the keystroke if
* the original one is not bound to any action. */
kbd->key = toupper(kbd->key);
kbd->key = c_toupper(kbd->key);
}
return (kbd->key == KBD_UNDEF) ? -1 : 0;

View File

@ -41,7 +41,7 @@ get_system_env(void)
int env = get_common_env();
unsigned char *term = getenv("TERM");
if (!term || (toupper(term[0]) == 'B' && toupper(term[1]) == 'E'))
if (!term || (c_toupper(term[0]) == 'B' && c_toupper(term[1]) == 'E'))
env |= ENV_BE;
return env;