From: havoc Date: Wed, 11 Sep 2002 13:49:07 +0000 (+0000) Subject: whitespace X-Git-Tag: RELEASE_0_2_0_RC1~249 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=94e95ccac92989819d20ea90c816dcc759694d78;p=xonotic%2Fdarkplaces.git whitespace git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2357 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/keys.c b/keys.c index 199d311f..afd0b70f 100644 --- a/keys.c +++ b/keys.c @@ -405,9 +405,9 @@ the given string. Single ascii characters return themselves, while the K_* names are matched up. =================== */ -int Key_StringToKeynum (char *str) +int Key_StringToKeynum (const char *str) { - keyname_t *kn; + keyname_t *kn; if (!str || !str[0]) return -1; @@ -415,10 +415,8 @@ int Key_StringToKeynum (char *str) return str[0]; for (kn=keynames ; kn->name ; kn++) - { if (!Q_strcasecmp(str,kn->name)) return kn->keynum; - } return -1; } @@ -433,8 +431,8 @@ FIXME: handle quote special (general escape sequence?) */ char *Key_KeynumToString (int keynum) { - keyname_t *kn; - static char tinystr[2]; + keyname_t *kn; + static char tinystr[2]; if (keynum == -1) return ""; @@ -444,7 +442,7 @@ char *Key_KeynumToString (int keynum) tinystr[1] = 0; return tinystr; } - + for (kn=keynames ; kn->name ; kn++) if (keynum == kn->keynum) return kn->name;