summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b543b98)
raw | patch | inline | side by side (parent: b543b98)
author | Max Kellermann <max@duempel.org> | |
Thu, 2 Oct 2008 14:52:25 +0000 (16:52 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Thu, 2 Oct 2008 14:52:25 +0000 (16:52 +0200) |
These macros are only used by options.c and conf.c. Move them to a
common internal header.
common internal header.
src/Makefile.am | patch | blob | history | |
src/conf.c | patch | blob | history | |
src/defaults.h | [new file with mode: 0644] | patch | blob |
src/ncmpc.h | patch | blob | history | |
src/options.c | patch | blob | history |
diff --git a/src/Makefile.am b/src/Makefile.am
index 8007996134d0c4b2868bce16530fea5d368d8805..4cc501c107acae64e94c7332f3010b8e52d966b3 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
strfsong.h\
utils.h\
ncmpc.h\
+ defaults.h \
screen_browser.h \
lyrics.h \
str_pool.h \
diff --git a/src/conf.c b/src/conf.c
index 79bbfd3a15effaa1c122a4bde89d0d29e0b0f0b5..e0214ce9d58a8bfa56cd39e973cfcc70e5d36aec 100644 (file)
--- a/src/conf.c
+++ b/src/conf.c
#define NO_GLOBAL_OPTIONS
#include "conf.h"
#include "config.h"
+#include "defaults.h"
#include "ncmpc.h"
#include "support.h"
#include "command.h"
diff --git a/src/defaults.h b/src/defaults.h
--- /dev/null
+++ b/src/defaults.h
@@ -0,0 +1,39 @@
+/* ncmpc
+ * Copyright (C) 2008 Max Kellermann <max@duempel.org>
+ * This project's homepage is: http://www.musicpd.org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef DEFAULTS_H
+#define DEFAULTS_H
+
+/* mpd crossfade time [s] */
+#define DEFAULT_CROSSFADE_TIME 10
+
+/* screen list */
+#define DEFAULT_SCREEN_LIST "playlist browse"
+
+/* song format - list window */
+#define DEFAULT_LIST_FORMAT "%name%|[%artist% - ]%title%|%shortfile%"
+
+/* song format - status window */
+#define DEFAULT_STATUS_FORMAT "[%artist% - ]%title%|%shortfile%"
+
+#define DEFAULT_LYRICS_TIMEOUT 100
+
+#define DEFAULT_SCROLL TRUE
+#define DEFAULT_SCROLL_SEP " *** "
+
+#endif
diff --git a/src/ncmpc.h b/src/ncmpc.h
index 746bc8beb7cb7d6b37ca8106ce398d28609f19e7..e7da71778d81006e2a1143b5b36fab3fed5b7443 100644 (file)
--- a/src/ncmpc.h
+++ b/src/ncmpc.h
#define YES _("y")
#define NO _("n")
-/* mpd crossfade time [s] */
-#define DEFAULT_CROSSFADE_TIME 10
-
/* welcome message time [s] */
#define SCREEN_WELCOME_TIME 10
-/* screen list */
-#define DEFAULT_SCREEN_LIST "playlist browse"
-
/* status message time [s] */
#define SCREEN_STATUS_MESSAGE_TIME 3
/* time before trying to reconnect [ms] */
#define MPD_RECONNECT_TIME 1500
-/* song format - list window */
-#define DEFAULT_LIST_FORMAT "%name%|[%artist% - ]%title%|%shortfile%"
#define LIST_FORMAT options.list_format
-/* song format - status window */
-#define DEFAULT_STATUS_FORMAT "[%artist% - ]%title%|%shortfile%"
#define STATUS_FORMAT options.status_format
-#define DEFAULT_LYRICS_TIMEOUT 100
-
-#define DEFAULT_SCROLL TRUE
-#define DEFAULT_SCROLL_SEP " *** "
-
void
sigstop(void);
diff --git a/src/options.c b/src/options.c
index f6e206aeabf82225a7493bb0d776b0660bc94d4f..2a02dca74254fa5f3094c1ac5dcf5575e77e7591 100644 (file)
--- a/src/options.c
+++ b/src/options.c
#include "options.h"
#include "config.h"
-#include "ncmpc.h"
+#include "defaults.h"
#include "support.h"
#include "command.h"
#include "conf.h"