From 1ba7d5a260fc4d5f696b68018426e2017144ce97 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Sun, 26 Oct 2008 19:47:53 +0200 Subject: [PATCH] Bug 1004: Use c_toupper in a few more places. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/config/kbdbind.c | 2 +- src/osdep/beos/beos.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config/kbdbind.c b/src/config/kbdbind.c index e7e5f6de6..da04cf65c 100644 --- a/src/config/kbdbind.c +++ b/src/config/kbdbind.c @@ -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; diff --git a/src/osdep/beos/beos.c b/src/osdep/beos/beos.c index 79edef6ad..1011013f2 100644 --- a/src/osdep/beos/beos.c +++ b/src/osdep/beos/beos.c @@ -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;