From a98dbb67b93e0d2b62dea73a599db0e549f1267c Mon Sep 17 00:00:00 2001 From: Tiago Cunha Date: Sat, 25 Jul 2009 08:53:48 +0000 Subject: [PATCH] Sync OpenBSD patchset 176: Accept lowercase c- and m- prefix as well as C- and M-. --- key-string.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/key-string.c b/key-string.c index c83b9236..bf2d9b15 100644 --- a/key-string.c +++ b/key-string.c @@ -1,4 +1,4 @@ -/* $Id: key-string.c,v 1.19 2009-07-22 16:24:59 tcunha Exp $ */ +/* $Id: key-string.c,v 1.20 2009-07-25 08:53:48 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -108,7 +108,7 @@ key_string_lookup_string(const char *string) return (string[0]); ptr = NULL; - if (string[0] == 'C' && string[1] == '-') + if ((string[0] == 'C' || string[0] == 'c') && string[1] == '-') ptr = string + 2; else if (string[0] == '^') ptr = string + 1; @@ -129,8 +129,8 @@ key_string_lookup_string(const char *string) return (key | KEYC_CTRL); return (KEYC_NONE); } - - if (string[0] == 'M' && string[1] == '-') { + + if ((string[0] == 'M' || string[0] == 'm') && string[1] == '-') { ptr = string + 2; if (ptr[0] == '\0') return (KEYC_NONE);