diff options
author | Max Kellermann <max@duempel.org> | 2008-10-06 14:32:29 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-06 14:32:29 +0200 |
commit | 62e8aa21abca6ff635268aa8723443b973354a14 (patch) | |
tree | 344d724596fe195e05fceaa748207d7c1855e4e0 /src | |
parent | 07df83b7b074106ae391187feffba570748e990f (diff) | |
download | mpd-62e8aa21abca6ff635268aa8723443b973354a14.tar.gz mpd-62e8aa21abca6ff635268aa8723443b973354a14.tar.xz mpd-62e8aa21abca6ff635268aa8723443b973354a14.zip |
removed my_wgetch(), switch to wgetch()
There are no special cases left for my_wgetch() to handle. We can
remove it and use the original wgetch() instead.
Diffstat (limited to 'src')
-rw-r--r-- | src/command.c | 12 | ||||
-rw-r--r-- | src/command.h | 1 | ||||
-rw-r--r-- | src/screen.c | 2 | ||||
-rw-r--r-- | src/screen_utils.c | 2 | ||||
-rw-r--r-- | src/wreadln.c | 6 | ||||
-rw-r--r-- | src/wreadln.h | 4 |
6 files changed, 3 insertions, 24 deletions
diff --git a/src/command.c b/src/command.c index b18a98b14..fa7fe2e3a 100644 --- a/src/command.c +++ b/src/command.c @@ -391,22 +391,12 @@ get_key_command(int key) 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 4529da824..63d83b0a4 100644 --- a/src/command.h +++ b/src/command.h @@ -97,7 +97,6 @@ command_t get_key_command(int key); 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 7035ae0bb..aed9d9af9 100644 --- a/src/screen.c +++ b/src/screen.c @@ -25,7 +25,6 @@ #include "charset.h" #include "mpdclient.h" #include "utils.h" -#include "command.h" #include "options.h" #include "colors.h" #include "strfsong.h" @@ -525,7 +524,6 @@ screen_init(mpdclient_t *c) 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 e42de0b17..fc8fa90b3 100644 --- a/src/screen_utils.c +++ b/src/screen_utils.c @@ -54,7 +54,7 @@ screen_getch(WINDOW *w, const char *prompt) 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 42b5561c0..7f00ef3dd 100644 --- a/src/wreadln.c +++ b/src/wreadln.c @@ -44,7 +44,6 @@ 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; @@ -182,10 +181,7 @@ _wreadln(WINDOW *w, } 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 9ce6ae404..fa52d4986 100644 --- a/src/wreadln.h +++ b/src/wreadln.h @@ -10,10 +10,6 @@ extern guint wrln_max_line_size; /* 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; |