From dba084f3d6a65ff8299c79b3867e28b57e50f1be Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Mon, 17 Dec 2007 17:07:08 +0100 Subject: New backlog option in logger plugin, added variable names in .h files, replaced "void *" pointers by structures --- src/gui/gui-keyboard.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/gui/gui-keyboard.c') diff --git a/src/gui/gui-keyboard.c b/src/gui/gui-keyboard.c index edc519042..3c52f729e 100644 --- a/src/gui/gui-keyboard.c +++ b/src/gui/gui-keyboard.c @@ -34,6 +34,7 @@ #include "../plugins/plugin.h" #include "gui-keyboard.h" #include "gui-action.h" +#include "gui-buffer.h" #include "gui-completion.h" #include "gui-input.h" #include "gui-window.h" @@ -244,7 +245,7 @@ gui_keyboard_get_internal_code (char *key) { char *result; - if ((result = (char *) malloc (strlen (key) + 1))) + if ((result = (char *)malloc (strlen (key) + 1))) { result[0] = '\0'; while (key[0]) @@ -287,7 +288,7 @@ gui_keyboard_get_expanded_name (char *key) { char *result; - if ((result = (char *) malloc ((strlen (key) * 5) + 1))) + if ((result = (char *)malloc ((strlen (key) * 5) + 1))) { result[0] = '\0'; while (key[0]) @@ -390,7 +391,7 @@ gui_keyboard_new (char *key, char *command, t_gui_key_func *function, char *args char *internal_code; int length; - if ((new_key = (t_gui_key *) malloc (sizeof (t_gui_key)))) + if ((new_key = (t_gui_key *)malloc (sizeof (t_gui_key)))) { internal_code = gui_keyboard_get_internal_code (key); new_key->key = (internal_code) ? strdup (internal_code) : strdup (key); @@ -750,7 +751,7 @@ gui_keyboard_buffer_reset () { gui_keyboard_buffer_alloc = GUI_KEYBOARD_BUFFER_BLOCK_SIZE; gui_keyboard_buffer_size = 0; - gui_keyboard_buffer = (int *) malloc (gui_keyboard_buffer_alloc); + gui_keyboard_buffer = (int *)malloc (gui_keyboard_buffer_alloc); } else { -- cgit v1.2.3