aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-02 17:48:01 +0200
committerMax Kellermann <max@duempel.org>2008-10-02 17:48:01 +0200
commit45ff31548dc68c27e1af6fdf37945de97579f5f9 (patch)
tree3b33e41d5a47ed04f6c184f6613d9c30e4d6233f /src
parent994ffdbde3b12429578a33dcf18204b9d813311f (diff)
downloadmpd-45ff31548dc68c27e1af6fdf37945de97579f5f9.tar.gz
mpd-45ff31548dc68c27e1af6fdf37945de97579f5f9.tar.xz
mpd-45ff31548dc68c27e1af6fdf37945de97579f5f9.zip
removed LIST_FORMAT, STATUS_FORMAT
Use options.list_format and options.status_format directly instead of these two macros.
Diffstat (limited to 'src')
-rw-r--r--src/mpdclient.c5
-rw-r--r--src/ncmpc.h4
-rw-r--r--src/screen.c3
-rw-r--r--src/screen_browser.c7
-rw-r--r--src/screen_play.c3
5 files changed, 8 insertions, 14 deletions
diff --git a/src/mpdclient.c b/src/mpdclient.c
index dbf285e07..9beac9ee7 100644
--- a/src/mpdclient.c
+++ b/src/mpdclient.c
@@ -19,7 +19,6 @@
#include "mpdclient.h"
#include "screen_utils.h"
#include "config.h"
-#include "ncmpc.h"
#include "support.h"
#include "options.h"
#include "strfsong.h"
@@ -83,8 +82,8 @@ compare_filelistentry_format(gconstpointer filelist_entry1,
if (e1 && e2 &&
e1->type == MPD_INFO_ENTITY_TYPE_SONG &&
e2->type == MPD_INFO_ENTITY_TYPE_SONG) {
- strfsong(key1, BUFSIZE, LIST_FORMAT, e1->info.song);
- strfsong(key2, BUFSIZE, LIST_FORMAT, e2->info.song);
+ strfsong(key1, BUFSIZE, options.list_format, e1->info.song);
+ strfsong(key2, BUFSIZE, options.list_format, e2->info.song);
n = strcmp(key1,key2);
}
diff --git a/src/ncmpc.h b/src/ncmpc.h
index a1cd9f9fd..ca4af160d 100644
--- a/src/ncmpc.h
+++ b/src/ncmpc.h
@@ -20,10 +20,6 @@
/* time before trying to reconnect [ms] */
#define MPD_RECONNECT_TIME 1500
-#define LIST_FORMAT options.list_format
-
-#define STATUS_FORMAT options.status_format
-
void
sigstop(void);
diff --git a/src/screen.c b/src/screen.c
index da758b10d..ac4a63ee1 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -322,7 +322,8 @@ paint_status_window(mpdclient_t *c)
int width = COLS-x-my_strlen(screen.buf);
if (song)
- strfsong(songname, MAX_SONGNAME_LENGTH, STATUS_FORMAT, song);
+ strfsong(songname, MAX_SONGNAME_LENGTH,
+ options.status_format, song);
else
songname[0] = '\0';
diff --git a/src/screen_browser.c b/src/screen_browser.c
index ab10299c6..52285152b 100644
--- a/src/screen_browser.c
+++ b/src/screen_browser.c
@@ -18,7 +18,6 @@
*/
#include "screen_browser.h"
-#include "ncmpc.h"
#include "i18n.h"
#include "options.h"
#include "support.h"
@@ -143,7 +142,7 @@ browser_lw_callback(unsigned idx, int *highlight, void *data)
} else if( entity->type==MPD_INFO_ENTITY_TYPE_SONG ) {
mpd_Song *song = entity->info.song;
- strfsong(buf, BUFSIZE, LIST_FORMAT, song);
+ strfsong(buf, BUFSIZE, options.list_format, song);
return buf;
} else if( entity->type==MPD_INFO_ENTITY_TYPE_PLAYLISTFILE ) {
mpd_PlaylistFile *plf = entity->info.playlistFile;
@@ -233,7 +232,7 @@ enqueue_and_play(mpdclient_t *c, filelist_entry_t *entry)
char buf[BUFSIZE];
entry->flags |= HIGHLIGHT;
- strfsong(buf, BUFSIZE, LIST_FORMAT, song);
+ strfsong(buf, BUFSIZE, options.list_format, song);
screen_status_printf(_("Adding \'%s\' to playlist\n"), buf);
mpdclient_update(c); /* get song id */
} else
@@ -363,7 +362,7 @@ browser_select_entry(mpdclient_t *c, filelist_entry_t *entry,
if (mpdclient_cmd_add(c, song) == 0) {
char buf[BUFSIZE];
- strfsong(buf, BUFSIZE, LIST_FORMAT, song);
+ strfsong(buf, BUFSIZE, options.list_format, song);
screen_status_printf(_("Adding \'%s\' to playlist\n"), buf);
}
} else {
diff --git a/src/screen_play.c b/src/screen_play.c
index 309b9a54e..adc46a511 100644
--- a/src/screen_play.c
+++ b/src/screen_play.c
@@ -17,7 +17,6 @@
*/
#include "config.h"
-#include "ncmpc.h"
#include "i18n.h"
#include "options.h"
#include "support.h"
@@ -104,7 +103,7 @@ list_callback(unsigned idx, int *highlight, void *data)
c->status != NULL && !IS_STOPPED(c->status->state))
*highlight = 1;
- strfsong(songname, MAX_SONG_LENGTH, LIST_FORMAT, song);
+ strfsong(songname, MAX_SONG_LENGTH, options.list_format, song);
return songname;
}