summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 07df83b)
raw | patch | inline | side by side (parent: 07df83b)
author | Max Kellermann <max@duempel.org> | |
Mon, 6 Oct 2008 12:32:29 +0000 (14:32 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Mon, 6 Oct 2008 12:32:29 +0000 (14:32 +0200) |
There are no special cases left for my_wgetch() to handle. We can
remove it and use the original wgetch() instead.
remove it and use the original wgetch() instead.
src/command.c | patch | blob | history | |
src/command.h | patch | blob | history | |
src/screen.c | patch | blob | history | |
src/screen_utils.c | patch | blob | history | |
src/wreadln.c | patch | blob | history | |
src/wreadln.h | patch | blob | history |
diff --git a/src/command.c b/src/command.c
index b18a98b1446ab5c2799030086038199a60a24623..fa7fe2e3afb79e6a45575091552d9e064a33468b 100644 (file)
--- a/src/command.c
+++ b/src/command.c
return find_key_command(key, cmds);
}
-int
-my_wgetch(WINDOW *w)
-{
- int c;
-
- c = wgetch(w);
-
- return c;
-}
-
command_t
get_keyboard_command(void)
{
int key;
- key = my_wgetch(stdscr);
+ key = wgetch(stdscr);
if (key == ERR)
return CMD_NONE;
diff --git a/src/command.h b/src/command.h
index 4529da824e66b580faacf0427dd869210cb3d257..63d83b0a4b2a39c4f2719503960d4e6913862229 100644 (file)
--- a/src/command.h
+++ b/src/command.h
command_t get_key_command_from_name(char *name);
int assign_keys(command_t command, int keys[MAX_COMMAND_KEYS]);
-int my_wgetch(WINDOW *w);
command_t get_keyboard_command(void);
#endif
diff --git a/src/screen.c b/src/screen.c
index 7035ae0bb8d9a1cdd00eb886840805565cb108fe..aed9d9af9ab2890b68d80a9a8ed38759a7eda11a 100644 (file)
--- a/src/screen.c
+++ b/src/screen.c
#include "charset.h"
#include "mpdclient.h"
#include "utils.h"
-#include "command.h"
#include "options.h"
#include "colors.h"
#include "strfsong.h"
mode_fn->open(c);
/* initialize wreadln */
- wrln_wgetch = my_wgetch;
wrln_max_history_length = 16;
}
diff --git a/src/screen_utils.c b/src/screen_utils.c
index e42de0b175a2bdfa22cb7262487bdc03318fb652..fc8fa90b323303ba0b9a0d20ff73ce9953417f5c 100644 (file)
--- a/src/screen_utils.c
+++ b/src/screen_utils.c
echo();
curs_set(1);
- while ((key=my_wgetch(w)) == ERR)
+ while ((key = wgetch(w)) == ERR)
;
#ifdef HAVE_GETMOUSE
diff --git a/src/wreadln.c b/src/wreadln.c
index 42b5561c0eca0c1ea45d5d8f7a62a82a1a8b13ba..7f00ef3ddd63ea5aa45624aefc1b3d364cfe4081 100644 (file)
--- a/src/wreadln.c
+++ b/src/wreadln.c
guint wrln_max_line_size = WRLN_MAX_LINE_SIZE;
guint wrln_max_history_length = WRLN_MAX_HISTORY_LENGTH;
-wrln_wgetch_fn_t wrln_wgetch = NULL;
void *wrln_completion_callback_data = NULL;
wrln_gcmp_pre_cb_t wrln_pre_completion_callback = NULL;
wrln_gcmp_post_cb_t wrln_post_completion_callback = NULL;
}
while( key!=13 && key!='\n' ) {
- if( wrln_wgetch )
- key = wrln_wgetch(w);
- else
- key = wgetch(w);
+ key = wgetch(w);
/* check if key is a function key */
for(i=0; i<63; i++)
diff --git a/src/wreadln.h b/src/wreadln.h
index 9ce6ae4043390aeec2c7a5c71ba2b3c32cea5c09..fa52d4986dbd61ff29d9b00dc3691625e0c6722b 100644 (file)
--- a/src/wreadln.h
+++ b/src/wreadln.h
/* max items stored in the history list */
extern guint wrln_max_history_length;
-/* custom wgetch function */
-typedef int (*wrln_wgetch_fn_t) (WINDOW *w);
-extern wrln_wgetch_fn_t wrln_wgetch;
-
/* completion callback data */
extern void *wrln_completion_callback_data;