summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 994ffdb)
raw | patch | inline | side by side (parent: 994ffdb)
author | Max Kellermann <max@duempel.org> | |
Thu, 2 Oct 2008 15:48:01 +0000 (17:48 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Thu, 2 Oct 2008 15:48:01 +0000 (17:48 +0200) |
Use options.list_format and options.status_format directly instead of
these two macros.
these two macros.
src/mpdclient.c | patch | blob | history | |
src/ncmpc.h | patch | blob | history | |
src/screen.c | patch | blob | history | |
src/screen_browser.c | patch | blob | history | |
src/screen_play.c | patch | blob | history |
diff --git a/src/mpdclient.c b/src/mpdclient.c
index dbf285e0727bf60f941852102c308ab2984f758a..9beac9ee7e1bcdd7cb39f859bb914a3cf9a7f4ad 100644 (file)
--- a/src/mpdclient.c
+++ b/src/mpdclient.c
#include "mpdclient.h"
#include "screen_utils.h"
#include "config.h"
-#include "ncmpc.h"
#include "support.h"
#include "options.h"
#include "strfsong.h"
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 a1cd9f9fdb302125e8edb25f5ff6b758e4045ab3..ca4af160df546a3d96be341841b87d4a14987728 100644 (file)
--- a/src/ncmpc.h
+++ b/src/ncmpc.h
/* 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 da758b10dbc9c199d4d3031fd195f005cac9cc61..ac4a63ee1d47ed5a3bc875de03f006b076a85acf 100644 (file)
--- a/src/screen.c
+++ b/src/screen.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 ab10299c6f6d6947d22e324d8e4b40fc84f5e22c..52285152b57dd679d13ee1a2fd865606f0c969c5 100644 (file)
--- a/src/screen_browser.c
+++ b/src/screen_browser.c
*/
#include "screen_browser.h"
-#include "ncmpc.h"
#include "i18n.h"
#include "options.h"
#include "support.h"
} 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;
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
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 309b9a54ed656c7ebf7b80b2b6a8bcfddcdaf06e..adc46a511f6dee091a46d005a0c6846adba30286 100644 (file)
--- a/src/screen_play.c
+++ b/src/screen_play.c
*/
#include "config.h"
-#include "ncmpc.h"
#include "i18n.h"
#include "options.h"
#include "support.h"
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;
}