summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5d852bd)
raw | patch | inline | side by side (parent: 5d852bd)
author | Max Kellermann <max@duempel.org> | |
Thu, 2 Oct 2008 12:57:42 +0000 (14:57 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Thu, 2 Oct 2008 12:57:42 +0000 (14:57 +0200) |
Everybody who uses the ENABLE_ macros has to include ncmpc.h. We're
better off defining those in config.h via configure.ac.
better off defining those in config.h via configure.ac.
configure.ac | patch | blob | history | |
src/ncmpc.h | patch | blob | history | |
src/playlist.c | patch | blob | history | |
src/screen_list.h | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index 4637c2555f87ad0f3a93dec7bc7a15ab3849004a..8ea3461c8b28c6f2cf8d2324bd88904fd3a27044 100644 (file)
--- a/configure.ac
+++ b/configure.ac
[artist_screen="$enableval"],
[artist_screen=no])
AC_MSG_RESULT([$artist_screen])
-if test "x$artist_screen" != "xyes" ; then
- AC_DEFINE(DISABLE_ARTIST_SCREEN, 1, [Disable artist screen])
+if test "x$artist_screen" = "xyes" ; then
+ AC_DEFINE(ENABLE_ARTIST_SCREEN, 1, [Enable artist screen])
fi
AM_CONDITIONAL(ENABLE_ARTIST_SCREEN, test x$artist_screen = xyes)
[search_screen="$enableval"],
[search_screen=yes])
AC_MSG_RESULT([$search_screen])
-if test "x$search_screen" != "xyes" ; then
- AC_DEFINE(DISABLE_SEARCH_SCREEN, 1, [Disable search screen])
+if test "x$search_screen" = "xyes" ; then
+ AC_DEFINE(ENABLE_SEARCH_SCREEN, 1, [Enable search screen])
fi
AM_CONDITIONAL(ENABLE_SEARCH_SCREEN, test x$search_screen = xyes)
[keydef_screen="$enableval"],
[keydef_screen=yes])
AC_MSG_RESULT([$keydef_screen])
-if test "x$keydef_screen" != "xyes" ; then
- AC_DEFINE(DISABLE_KEYDEF_SCREEN, 1, [Disable key editor screen])
+if test "x$keydef_screen" = "xyes" ; then
+ AC_DEFINE(ENABLE_KEYDEF_SCREEN, 1, [Enable key editor screen])
fi
AM_CONDITIONAL(ENABLE_KEYDEF_SCREEN, test x$keydef_screen = xyes)
[Enable lyrics screen @<:@default=no@:>@]),
[lyrics_screen="$enableval"],
[lyrics_screen=no])
-if test "x$lyrics_screen" != "xyes" ; then
- AC_DEFINE(DISABLE_LYRICS_SCREEN, 1, [Disable lyrics screen])
- lyrics_screen=no
+if test "x$lyrics_screen" = "xyes" ; then
+ AC_DEFINE(ENABLE_LYRICS_SCREEN, 1, [Enable lyrics screen])
fi
AM_CONDITIONAL(ENABLE_LYRICS_SCREEN, test x$lyrics_screen = xyes)
diff --git a/src/ncmpc.h b/src/ncmpc.h
index c87c84d88fe270777abde35b538854c15f2e3f48..5d4ca8425e586eec77454cc3f913df096bcf5550 100644 (file)
--- a/src/ncmpc.h
+++ b/src/ncmpc.h
#include "config.h"
#endif
-#ifndef DISABLE_ARTIST_SCREEN
-#define ENABLE_ARTIST_SCREEN 1
-#endif
-#ifndef DISABLE_SEARCH_SCREEN
-#define ENABLE_SEARCH_SCREEN 1
-#endif
-#ifndef DISABLE_KEYDEF_SCREEN
-#define ENABLE_KEYDEF_SCREEN 1
-#endif
-#ifndef DISABLE_LYRICS_SCREEN
-#define ENABLE_LYRICS_SCREEN 1
-#endif
-
#ifndef NDEBUG
void D(const char *format, ...);
#else
diff --git a/src/playlist.c b/src/playlist.c
index 919b4c34f8e045b2e9994f2cb1f8102a81662f8f..108c4f51a343039b624c8ddf2476f4566784546e 100644 (file)
--- a/src/playlist.c
+++ b/src/playlist.c
#include "playlist.h"
#include "mpdclient.h"
-#include "ncmpc.h"
#include <string.h>
diff --git a/src/screen_list.h b/src/screen_list.h
index 1293b74d95347cef489fe208bae3589bea6f7aec..27c034676d3c6742d2d0ee06f71ccf0f64d9c0ed 100644 (file)
--- a/src/screen_list.h
+++ b/src/screen_list.h
#ifndef SCREEN_LIST_H
#define SCREEN_LIST_H
-#include "ncmpc.h"
+#include "config.h"
#include <ncurses.h>