]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - keys.c
SOLID_NOT is now linked into the areagrid, which fixed the bugs with corpses not...
[xonotic/darkplaces.git] / keys.c
diff --git a/keys.c b/keys.c
index 2b0017a05551057ec59f8c50e7ffe6a3584ff9b4..b908343918ffcc5929b5a49b86e4d0c1bbd4f98a 100644 (file)
--- a/keys.c
+++ b/keys.c
@@ -37,12 +37,14 @@ int                 key_consoleactive;
 char           *keybindings[MAX_BINDMAPS][MAX_KEYS];
 
 static int     key_bmap, key_bmap2;
-static qbyte keydown[MAX_KEYS];        // 0 = up, 1 = down, 2 = repeating
+static unsigned char keydown[MAX_KEYS];        // 0 = up, 1 = down, 2 = repeating
 
-typedef struct {
+typedef struct keyname_s
+{
        const char      *name;
        int                     keynum;
-} keyname_t;
+}
+keyname_t;
 
 static const keyname_t   keynames[] = {
        {"TAB", K_TAB},
@@ -553,7 +555,7 @@ Key_KeynumToString (int keynum)
 void
 Key_SetBinding (int keynum, int bindmap, const char *binding)
 {
-       char *new;
+       char *newbinding;
        size_t l;
 
        if (keynum == -1)
@@ -566,10 +568,10 @@ Key_SetBinding (int keynum, int bindmap, const char *binding)
        }
 // allocate memory for new binding
        l = strlen (binding);
-       new = Z_Malloc (l + 1);
-       strcpy (new, binding);
-       new[l] = 0;
-       keybindings[bindmap][keynum] = new;
+       newbinding = (char *)Z_Malloc (l + 1);
+       strcpy (newbinding, binding);
+       newbinding[l] = 0;
+       keybindings[bindmap][keynum] = newbinding;
 }
 
 static void
@@ -601,7 +603,7 @@ static void
 Key_In_Bind_f (void)
 {
        int         i, c, b, m;
-       char        cmd[1024];
+       char        cmd[MAX_INPUTLINE];
 
        c = Cmd_Argc ();
 
@@ -703,7 +705,7 @@ static void
 Key_Bind_f (void)
 {
        int         i, c, b;
-       char        cmd[1024];
+       char        cmd[MAX_INPUTLINE];
 
        c = Cmd_Argc ();
 
@@ -859,7 +861,7 @@ Key_Event (int key, char ascii, qboolean down)
                                if(UI_Callback_IsSlotUsed(key_dest - 3))
                                        UI_Callback_KeyDown (key, ascii);
                                else
-                                       Con_Printf ("Key_Event: Bad key_dest");
+                                       Con_Printf ("Key_Event: Bad key_dest\n");
                }
                return;
        }
@@ -924,7 +926,7 @@ Key_Event (int key, char ascii, qboolean down)
                        if(UI_Callback_IsSlotUsed(key_dest - 3))
                                UI_Callback_KeyDown (key, ascii);
                        else
-                               Con_Printf ("Key_Event: Bad key_dest");
+                               Con_Printf ("Key_Event: Bad key_dest\n");
        }
 }