From b076d858cc0faf8e0d23f8331feaafafbbdaff70 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Thu, 5 Apr 2012 17:34:13 +0200 Subject: [PATCH] Formatting. --- src/x11_init.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/x11_init.c b/src/x11_init.c index 12b61eef..48e48a2c 100644 --- a/src/x11_init.c +++ b/src/x11_init.c @@ -261,10 +261,8 @@ static void updateKeyCodeLUT(void) int keyCode; // Clear the LUT - for (keyCode = 0; keyCode < 256; ++keyCode) - { + for (keyCode = 0; keyCode < 256; keyCode++) _glfwLibrary.X11.keyCodeLUT[keyCode] = -1; - } #if defined(_GLFW_HAS_XKB) // If the Xkb extension is available, use it to determine physical key @@ -272,7 +270,7 @@ static void updateKeyCodeLUT(void) if (_glfwLibrary.X11.Xkb.available) { int i, keyCodeGLFW; - char name[XkbKeyNameLength+1]; + char name[XkbKeyNameLength + 1]; XkbDescPtr descr; // Get keyboard description @@ -284,10 +282,9 @@ static void updateKeyCodeLUT(void) for (keyCode = descr->min_key_code; keyCode <= descr->max_key_code; ++keyCode) { // Get the key name - for (i = 0; i < XkbKeyNameLength; ++i) - { + for (i = 0; i < XkbKeyNameLength; i++) name[i] = descr->names->keys[keyCode].name[i]; - } + name[XkbKeyNameLength] = 0; // Map the key name to a GLFW key code. Note: We only map printable @@ -346,9 +343,7 @@ static void updateKeyCodeLUT(void) // Update the key code LUT if ((keyCode >= 0) && (keyCode < 256)) - { _glfwLibrary.X11.keyCodeLUT[keyCode] = keyCodeGLFW; - } } // Free the keyboard description @@ -358,7 +353,7 @@ static void updateKeyCodeLUT(void) // Translate the un-translated key codes using traditional X11 KeySym // lookups - for (keyCode = 0; keyCode < 256; ++keyCode) + for (keyCode = 0; keyCode < 256; keyCode++) { if (_glfwLibrary.X11.keyCodeLUT[keyCode] < 0) {