diff options
author | Max Kellermann <max@duempel.org> | 2008-09-15 12:09:29 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-09-15 12:09:29 +0200 |
commit | 1cd28efa96dbc3d49a43d9b12c5b65d493baf949 (patch) | |
tree | 067c067ebdae3b8f7b00283413fe6a3271ab18ca /src | |
parent | 85fb21cc2bb75cd207d770c6ee7567ddb8e09fd4 (diff) | |
download | mpd-1cd28efa96dbc3d49a43d9b12c5b65d493baf949.tar.gz mpd-1cd28efa96dbc3d49a43d9b12c5b65d493baf949.tar.xz mpd-1cd28efa96dbc3d49a43d9b12c5b65d493baf949.zip |
remove unused static functions
Also remove some commented code and unused function parameters.
Diffstat (limited to '')
-rw-r--r-- | src/libmpdclient.c | 5 | ||||
-rw-r--r-- | src/list_window.c | 13 | ||||
-rw-r--r-- | src/list_window.h | 3 | ||||
-rw-r--r-- | src/main.c | 7 | ||||
-rw-r--r-- | src/mpdclient.c | 11 | ||||
-rw-r--r-- | src/options.c | 6 | ||||
-rw-r--r-- | src/screen.c | 1 | ||||
-rw-r--r-- | src/screen_artist.c | 4 | ||||
-rw-r--r-- | src/screen_file.c | 2 | ||||
-rw-r--r-- | src/screen_help.c | 2 | ||||
-rw-r--r-- | src/screen_keydef.c | 2 | ||||
-rw-r--r-- | src/screen_lyrics.c | 2 | ||||
-rw-r--r-- | src/screen_play.c | 2 | ||||
-rw-r--r-- | src/screen_search.c | 2 | ||||
-rw-r--r-- | src/screen_utils.c | 8 | ||||
-rw-r--r-- | src/screen_utils.h | 1 | ||||
-rw-r--r-- | src/src_lyrics.c | 4 | ||||
-rw-r--r-- | src/wreadln.c | 14 |
18 files changed, 17 insertions, 72 deletions
diff --git a/src/libmpdclient.c b/src/libmpdclient.c index 27bd9ad52..65c2e447e 100644 --- a/src/libmpdclient.c +++ b/src/libmpdclient.c @@ -295,7 +295,7 @@ void mpd_setConnectionTimeout(mpd_Connection * connection, float timeout) { } static int mpd_parseWelcome(mpd_Connection * connection, const char * host, int port, - char * rt, char * output) { + char * output) { char * tmp; char * test; int i; @@ -398,7 +398,8 @@ mpd_Connection * mpd_newConnection(const char * host, int port, float timeout) { strcpy(connection->buffer,rt+1); connection->buflen = strlen(connection->buffer); - if(mpd_parseWelcome(connection,host,port,rt,output) == 0) connection->doneProcessing = 1; + if(mpd_parseWelcome(connection,host,port,output) == 0) + connection->doneProcessing = 1; free(output); diff --git a/src/list_window.c b/src/list_window.c index db14ff96f..2b5fe8c60 100644 --- a/src/list_window.c +++ b/src/list_window.c @@ -107,19 +107,6 @@ list_window_previous(list_window_t *lw, int length) } void -list_window_right(list_window_t *lw, int length) -{ - lw->xoffset++; -} - -void -list_window_left(list_window_t *lw) -{ - if( lw->xoffset > 0 ) - lw->xoffset--; -} - -void list_window_first(list_window_t *lw) { lw->xoffset = 0; diff --git a/src/list_window.h b/src/list_window.h index 79d2525e3..fe465bede 100644 --- a/src/list_window.h +++ b/src/list_window.h @@ -58,9 +58,6 @@ void list_window_last(list_window_t *lw, int length); void list_window_previous_page(list_window_t *lw); void list_window_next_page(list_window_t *lw, int length); void list_window_check_selected(list_window_t *lw, int length); -/* not implemented yet */ -void list_window_right(list_window_t *lw, int length); -void list_window_left(list_window_t *lw); /* find a string in a list window */ int list_window_find(list_window_t *lw, diff --git a/src/main.c b/src/main.c index 2f01cab04..f3cc155ed 100644 --- a/src/main.c +++ b/src/main.c @@ -137,13 +137,6 @@ catch_sigint( int sig ) } void -catch_sighup( int sig) -{ - printf("\n%s\n", _("Exiting...")); - exit(EXIT_SUCCESS); -} - -void catch_sigcont( int sig ) { D("catch_sigcont()\n"); diff --git a/src/mpdclient.c b/src/mpdclient.c index 98743a35d..b496a2d86 100644 --- a/src/mpdclient.c +++ b/src/mpdclient.c @@ -719,17 +719,6 @@ mpdclient_playlist_update(mpdclient_t *c) #ifdef ENABLE_PLCHANGES -gint -mpdclient_compare_songs(gconstpointer a, gconstpointer b) -{ - mpd_Song *song1 = (mpd_Song *) a; - mpd_Song *song2 = (mpd_Song *) b; - - return song1->pos - song2->pos; -} - - - /* update playlist (plchanges) */ gint mpdclient_playlist_update_changes(mpdclient_t *c) diff --git a/src/options.c b/src/options.c index 0d3c2a6d0..ab383a38f 100644 --- a/src/options.c +++ b/src/options.c @@ -236,12 +236,6 @@ handle_option(int c, char *arg) } options_t * -options_get(void) -{ - return &options; -} - -options_t * options_parse(int argc, const char *argv[]) { int i; diff --git a/src/screen.c b/src/screen.c index 93d305d78..4949e283f 100644 --- a/src/screen.c +++ b/src/screen.c @@ -322,7 +322,6 @@ paint_status_window(mpdclient_t *c) mpd_Song *song = c->song; int elapsedTime = 0; char *str = NULL; - char *timestr = NULL; int x = 0; if( time(NULL) - screen->status_timestamp <= SCREEN_STATUS_MESSAGE_TIME ) diff --git a/src/screen_artist.c b/src/screen_artist.c index 9f98fb631..b9acd3e96 100644 --- a/src/screen_artist.c +++ b/src/screen_artist.c @@ -446,11 +446,11 @@ artist_cmd(screen_t *screen, mpdclient_t *c, command_t cmd) case CMD_LIST_FIND_NEXT: case CMD_LIST_RFIND_NEXT: if( filelist ) - return screen_find(screen, c, + return screen_find(screen, lw, filelist->length, cmd, browse_lw_callback, (void *) filelist); else if ( metalist ) - return screen_find(screen, c, + return screen_find(screen, lw, metalist_length, cmd, artist_lw_callback, (void *) metalist); else diff --git a/src/screen_file.c b/src/screen_file.c index 75de5b389..31b34608a 100644 --- a/src/screen_file.c +++ b/src/screen_file.c @@ -781,7 +781,7 @@ browse_cmd(screen_t *screen, mpdclient_t *c, command_t cmd) case CMD_LIST_RFIND: case CMD_LIST_FIND_NEXT: case CMD_LIST_RFIND_NEXT: - return screen_find(screen, c, + return screen_find(screen, lw, filelist->length, cmd, browse_lw_callback, (void *) filelist); case CMD_MOUSE_EVENT: diff --git a/src/screen_help.c b/src/screen_help.c index 515e69bc1..4a7961427 100644 --- a/src/screen_help.c +++ b/src/screen_help.c @@ -283,7 +283,7 @@ help_cmd(screen_t *screen, mpdclient_t *c, command_t cmd) } lw->selected = lw->start+lw->rows; - if( screen_find(screen, c, + if( screen_find(screen, lw, help_text_rows, cmd, list_callback, NULL) ) { diff --git a/src/screen_keydef.c b/src/screen_keydef.c index 081b6ec39..5014b294f 100644 --- a/src/screen_keydef.c +++ b/src/screen_keydef.c @@ -367,7 +367,7 @@ keydef_cmd(screen_t *screen, mpdclient_t *c, command_t cmd) case CMD_LIST_RFIND: case CMD_LIST_FIND_NEXT: case CMD_LIST_RFIND_NEXT: - return screen_find(screen, c, + return screen_find(screen, lw, length, cmd, list_callback, NULL); diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c index c5876f30a..4cdc8f03a 100644 --- a/src/screen_lyrics.c +++ b/src/screen_lyrics.c @@ -332,7 +332,7 @@ lyrics_cmd(screen_t *screen, mpdclient_t *c, command_t cmd) } lw->selected = lw->start+lw->rows; - if( screen_find(screen, c, + if( screen_find(screen, lw, lyrics_text_rows, cmd, list_callback, NULL) ) { diff --git a/src/screen_play.c b/src/screen_play.c index 718bb13ff..c9bc84e19 100644 --- a/src/screen_play.c +++ b/src/screen_play.c @@ -502,7 +502,7 @@ play_cmd(screen_t *screen, mpdclient_t *c, command_t cmd) case CMD_LIST_RFIND: case CMD_LIST_FIND_NEXT: case CMD_LIST_RFIND_NEXT: - return screen_find(screen, c, + return screen_find(screen, lw, c->playlist.length, cmd, list_callback, (void *) c); case CMD_MOUSE_EVENT: diff --git a/src/screen_search.c b/src/screen_search.c index 76398e478..f163ef7a2 100644 --- a/src/screen_search.c +++ b/src/screen_search.c @@ -529,7 +529,7 @@ search_cmd(screen_t *screen, mpdclient_t *c, command_t cmd) case CMD_LIST_FIND_NEXT: case CMD_LIST_RFIND_NEXT: if( filelist ) - return screen_find(screen, c, + return screen_find(screen, lw, filelist->length, cmd, browse_lw_callback, (void *) filelist); else diff --git a/src/screen_utils.c b/src/screen_utils.c index 43d57e142..40f73e63b 100644 --- a/src/screen_utils.c +++ b/src/screen_utils.c @@ -103,13 +103,6 @@ screen_getstr(WINDOW *w, char *prompt) } char * -screen_getstr_masked(WINDOW *w, char *prompt) -{ - return screen_readln(w, prompt, NULL, NULL, NULL); -} - - -char * screen_read_password(WINDOW *w, char *prompt) { if(w == NULL) @@ -154,7 +147,6 @@ screen_auth(mpdclient_t *c) /* query user for a string and find it in a list window */ int screen_find(screen_t *screen, - mpdclient_t *c, list_window_t *lw, int rows, command_t findcmd, diff --git a/src/screen_utils.h b/src/screen_utils.h index 27ff0eb8c..8040b105d 100644 --- a/src/screen_utils.h +++ b/src/screen_utils.h @@ -15,7 +15,6 @@ char *screen_readln_masked(WINDOW *w, char *prompt); char *screen_read_pasword(WINDOW *w, char *prompt); /* query user for a string and find it in a list window */ int screen_find(screen_t *screen, - mpdclient_t *c, list_window_t *lw, int rows, command_t findcmd, diff --git a/src/src_lyrics.c b/src/src_lyrics.c index 395a24b16..935fded16 100644 --- a/src/src_lyrics.c +++ b/src/src_lyrics.c @@ -146,10 +146,7 @@ int src_lyr_init () int get_lyr_by_src (int priority, char *artist, char *title) { if(src_lyr_stack->len == 0) return -1; - //if (g_array_index (src_lyr_stack, src_lyr*, priority)->check_lyr() == 0) - //{ g_array_index (src_lyr_stack, src_lyr*, priority)->get_lyr (artist, title); - //} return 0; } @@ -163,7 +160,6 @@ int src_lyr_load_plugin_file (const char *file) src_lyr_plugin_register register_func; src_lyr *new_src = malloc (sizeof (src_lyr)); new_src->module = g_module_open (path->str, G_MODULE_BIND_LAZY); - //if (new_src->module == NULL) for (;;) fprintf (stderr, g_module_error()); if (!g_module_symbol (new_src->module, "register_me", (gpointer*) ®ister_func)) return -1; new_src->register_src_lyr = register_func; diff --git a/src/wreadln.c b/src/wreadln.c index fd653329b..f4a7ec3e2 100644 --- a/src/wreadln.c +++ b/src/wreadln.c @@ -104,7 +104,6 @@ static inline void drawline(gint cursor, gint start, gint width, gint x0, - gint x1, gint y, gboolean masked, gchar *line, @@ -182,14 +181,14 @@ _wreadln(WINDOW *w, g_strlcpy(line, hlist->data, wrln_max_line_size); } cursor_move_to_eol(&cursor, &start, width, x0, x1, line); - drawline(cursor, start, width, x0, x1, y, masked, line, w); + drawline(cursor, start, width, x0, y, masked, line, w); } else if( initial_value ) { /* copy the initial value to the line buffer */ g_strlcpy(line, initial_value, wrln_max_line_size); cursor_move_to_eol(&cursor, &start, width, x0, x1, line); - drawline(cursor, start, width, x0, x1, y, masked, line, w); + drawline(cursor, start, width, x0, y, masked, line, w); } while( key!=13 && key!='\n' ) @@ -363,7 +362,7 @@ _wreadln(WINDOW *w, } } - drawline(cursor, start, width, x0, x1, y, masked, line, w); + drawline(cursor, start, width, x0, y, masked, line, w); } /* update history */ @@ -479,7 +478,6 @@ static inline void drawline(gint cursor, gint start, gint width, gint x0, - gint x1, gint y, gboolean masked, wchar_t *line, @@ -568,14 +566,14 @@ _wreadln(WINDOW *w, mbstowcs(wline, hlist->data, wrln_max_line_size); } cursor_move_to_eol(&cursor, &start, width, x0, x1, wline); - drawline(cursor, start, width, x0, x1, y, masked, wline, w); + drawline(cursor, start, width, x0, y, masked, wline, w); } else if( initial_value ) { /* copy the initial value to the line buffer */ mbstowcs(wline, initial_value, wrln_max_line_size); cursor_move_to_eol(&cursor, &start, width, x0, x1, wline); - drawline(cursor, start, width, x0, x1, y, masked, wline, w); + drawline(cursor, start, width, x0, y, masked, wline, w); } wch=0; @@ -749,7 +747,7 @@ _wreadln(WINDOW *w, } } } - drawline(cursor, start, width, x0, x1, y, masked, wline, w); + drawline(cursor, start, width, x0, y, masked, wline, w); } i = wcstombs(NULL,wline,0)+1; mbline = g_malloc0(i); |