summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 85fb21c)
raw | patch | inline | side by side (parent: 85fb21c)
author | Max Kellermann <max@duempel.org> | |
Mon, 15 Sep 2008 10:09:29 +0000 (12:09 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Mon, 15 Sep 2008 10:09:29 +0000 (12:09 +0200) |
Also remove some commented code and unused function parameters.
18 files changed:
diff --git a/src/libmpdclient.c b/src/libmpdclient.c
index 27bd9ad525fec8849c3d9469fcf538df317f0a2d..65c2e447e8b8232974f3ac6d7b423773bf0e5db5 100644 (file)
--- a/src/libmpdclient.c
+++ b/src/libmpdclient.c
}
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 db14ff96fb919a65d4405a2c985b401a37f23ebc..2b5fe8c607918bbdf3d4e4d3fdabd2f467f101e5 100644 (file)
--- a/src/list_window.c
+++ b/src/list_window.c
lw->selected = length-1;
}
-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)
{
diff --git a/src/list_window.h b/src/list_window.h
index 79d2525e39696d58373b990466882719214452fa..fe465bede4bbed1def5ab0225c75bb86eecba1c9 100644 (file)
--- a/src/list_window.h
+++ b/src/list_window.h
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 2f01cab04a65415be483494e9f1a01adfd82cb67..f3cc155ed5edf0fb81e29f875d73bb43f036340a 100644 (file)
--- a/src/main.c
+++ b/src/main.c
exit(EXIT_SUCCESS);
}
-void
-catch_sighup( int sig)
-{
- printf("\n%s\n", _("Exiting..."));
- exit(EXIT_SUCCESS);
-}
-
void
catch_sigcont( int sig )
{
diff --git a/src/mpdclient.c b/src/mpdclient.c
index 98743a35d818a76c03cd4ebd9633bb28744ee743..b496a2d86a830792adbc38878e33e3de2e89a359 100644 (file)
--- a/src/mpdclient.c
+++ b/src/mpdclient.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 0d3c2a6d06b52e169c6c97e00e827679dd1c10d6..ab383a38f60778fd283f5bcde24afb649080757c 100644 (file)
--- a/src/options.c
+++ b/src/options.c
}
}
-options_t *
-options_get(void)
-{
- return &options;
-}
-
options_t *
options_parse(int argc, const char *argv[])
{
diff --git a/src/screen.c b/src/screen.c
index 93d305d78b448a473efac4e20daa2976c68920a6..4949e283fdc738580c8b1e729c1a8ece4cccb00d 100644 (file)
--- a/src/screen.c
+++ b/src/screen.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 9f98fb6318754aeed4fa729da938d6d7ceafa11f..b9acd3e96d3133539d3b862dca9d4f60d80c35f1 100644 (file)
--- a/src/screen_artist.c
+++ b/src/screen_artist.c
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 75de5b389893d80e956d3cbcda7b008bbe82e484..31b34608a700482d2c3136f3e436c2f1096104df 100644 (file)
--- a/src/screen_file.c
+++ b/src/screen_file.c
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 515e69bc11c6addb7d059f9c3806fbb32f921ffe..4a79614278b3041a7c54607d2421253d2abfd5f6 100644 (file)
--- a/src/screen_help.c
+++ b/src/screen_help.c
}
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 081b6ec39bd52aef228175ad4e90e38230ec93e0..5014b294f2ec059357b085ae3e56f71a1d2ebe78 100644 (file)
--- a/src/screen_keydef.c
+++ b/src/screen_keydef.c
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 c5876f30a921217d94980533edef33384ba311f2..4cdc8f03a39cbcf507060be66012271c5c87a6cb 100644 (file)
--- a/src/screen_lyrics.c
+++ b/src/screen_lyrics.c
}
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 718bb13ff96f0b7ce7b12e237f623b9b451c3767..c9bc84e197fd3f02eadd08e74dc042618358e47e 100644 (file)
--- a/src/screen_play.c
+++ b/src/screen_play.c
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 76398e478c0bb7635898b458f239f1ab1841ab0e..f163ef7a28018476e3e12a3c6c159030009b3d05 100644 (file)
--- a/src/screen_search.c
+++ b/src/screen_search.c
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 43d57e142d8a5633d20954603d0ab79d1a7c3b7e..40f73e63be96f548aa2d2559ceb39f7adf2f8ede 100644 (file)
--- a/src/screen_utils.c
+++ b/src/screen_utils.c
return screen_readln(w, prompt, NULL, NULL, NULL);
}
-char *
-screen_getstr_masked(WINDOW *w, char *prompt)
-{
- return screen_readln(w, prompt, NULL, NULL, NULL);
-}
-
-
char *
screen_read_password(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/screen_utils.h b/src/screen_utils.h
index 27ff0eb8ccbbf70d81aa639fcef3e2668584fff3..8040b105d1572ecccbbb647b5b13ec94ce617488 100644 (file)
--- a/src/screen_utils.h
+++ b/src/screen_utils.h
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 395a24b160054d5f0d69704f1fcd7009c201c0c4..935fded169c4f21d7a48e37d142ef38b7039084e 100644 (file)
--- a/src/src_lyrics.c
+++ b/src/src_lyrics.c
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;
}
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 fd653329b06f1d1f4210df4b804c969ba6da57bb..f4a7ec3e2749661c98ea397e394233576b204bd6 100644 (file)
--- a/src/wreadln.c
+++ b/src/wreadln.c
gint start,
gint width,
gint x0,
- gint x1,
gint y,
gboolean masked,
gchar *line,
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' )
}
}
- drawline(cursor, start, width, x0, x1, y, masked, line, w);
+ drawline(cursor, start, width, x0, y, masked, line, w);
}
/* update history */
gint start,
gint width,
gint x0,
- gint x1,
gint y,
gboolean masked,
wchar_t *line,
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;
}
}
}
- 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);