summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 003f905)
raw | patch | inline | side by side (parent: 003f905)
author | Max Kellermann <max@duempel.org> | |
Mon, 6 Oct 2008 14:03:24 +0000 (16:03 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Mon, 6 Oct 2008 14:03:24 +0000 (16:03 +0200) |
When compiling with libncursesw, include <ncursesw/ncurses.h> instead
of <ncurses.h> (if available).
of <ncurses.h> (if available).
15 files changed:
configure.ac | patch | blob | history | |
src/colors.h | patch | blob | history | |
src/command.h | patch | blob | history | |
src/list_window.h | patch | blob | history | |
src/ncu.c | patch | blob | history | |
src/screen.h | patch | blob | history | |
src/screen_artist.c | patch | blob | history | |
src/screen_file.c | patch | blob | history | |
src/screen_help.c | patch | blob | history | |
src/screen_keydef.c | patch | blob | history | |
src/screen_list.h | patch | blob | history | |
src/screen_lyrics.c | patch | blob | history | |
src/screen_play.c | patch | blob | history | |
src/screen_utils.h | patch | blob | history | |
src/wreadln.h | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index 4aa392e5008a1674d4f80840934e947ca2b29269..51faeee3eff24328772d11bd202ca5dfc8fb5f99 100644 (file)
--- a/configure.ac
+++ b/configure.ac
[LIBS="$LIBS -l$ncurses"],
[AC_MSG_ERROR($ncurses library is required)])
+if test "x$ncurses" = "xncursesw"; then
+ AC_CHECK_HEADER([ncursesw/ncurses.h],
+ AC_DEFINE([HAVE_NCURSESW_NCURSES_H], [1], [ncursesw/ncurses.h]),
+ ,)
+fi
dnl Check for glib-2.4
diff --git a/src/colors.h b/src/colors.h
index 051aa9e26b76b6e050aabaf270d1f2ba690b534d..dec3ecd28da5df481689c47ffbc65daef0e0c862 100644 (file)
--- a/src/colors.h
+++ b/src/colors.h
#include "config.h"
+#ifdef HAVE_NCURSESW_NCURSES_H
+#include <ncursesw/ncurses.h>
+#else
#include <ncurses.h>
+#endif
enum color {
COLOR_TITLE = 1,
diff --git a/src/command.h b/src/command.h
index 63d83b0a4b2a39c4f2719503960d4e6913862229..b48bf80f6b43584249a6e9644ba43849f5324917 100644 (file)
--- a/src/command.h
+++ b/src/command.h
#include <stddef.h>
#include <stdio.h>
-#include <ncurses.h>
#define MAX_COMMAND_KEYS 3
diff --git a/src/list_window.h b/src/list_window.h
index 1d93a363ef8d2634c037ce98c8a46af01966af4b..11c4cddaba6d5dc3d04e4ec3d8d4b05fd81280fd 100644 (file)
--- a/src/list_window.h
+++ b/src/list_window.h
#include "../config.h"
#include "command.h"
-#include <ncurses.h>
#include <glib.h>
+#ifdef HAVE_NCURSESW_NCURSES_H
+#include <ncursesw/ncurses.h>
+#else
+#include <ncurses.h>
+#endif
+
#define LW_HIDE_CURSOR 0x01
typedef const char *(*list_window_callback_fn_t)(unsigned index,
diff --git a/src/ncu.c b/src/ncu.c
index 1ade90b4078020f4a5be9db3f788a590c783be40..c31f97d6b4ed5abe2de0debe414564d174707100 100644 (file)
--- a/src/ncu.c
+++ b/src/ncu.c
#include "options.h"
#endif
+#ifdef HAVE_NCURSESW_NCURSES_H
+#include <ncursesw/ncurses.h>
+#else
#include <ncurses.h>
+#endif
void
ncu_init(void)
diff --git a/src/screen.h b/src/screen.h
index ef7940a31e45dfcda744f6d2633065b3c479d039..404d0a8d565ce49fed7142d4a56a35fac0d7f26f 100644 (file)
--- a/src/screen.h
+++ b/src/screen.h
#include "mpdclient.h"
#include "command.h"
-#include <ncurses.h>
#include <glib.h>
+#ifdef HAVE_NCURSESW_NCURSES_H
+#include <ncursesw/ncurses.h>
+#else
+#include <ncurses.h>
+#endif
+
#define IS_PLAYING(s) (s==MPD_STATUS_STATE_PLAY)
#define IS_PAUSED(s) (s==MPD_STATUS_STATE_PAUSE)
#define IS_STOPPED(s) (!(IS_PLAYING(s) | IS_PAUSED(s)))
diff --git a/src/screen_artist.c b/src/screen_artist.c
index 846902e0a4807d09cfcc0216be595887d359ec45..5fec3c04c980c178b2172e001694eb471dadb3ca 100644 (file)
--- a/src/screen_artist.c
+++ b/src/screen_artist.c
#include <stdlib.h>
#include <string.h>
#include <glib.h>
-#include <ncurses.h>
#define BUFSIZE 1024
diff --git a/src/screen_file.c b/src/screen_file.c
index bef155f5948e10669e9c728c56b54bc2c2efa979..b14b3b10495aac68bd14ad75792ffe45162f1bac 100644 (file)
--- a/src/screen_file.c
+++ b/src/screen_file.c
#include <stdlib.h>
#include <string.h>
#include <glib.h>
-#include <ncurses.h>
static struct screen_browser browser;
diff --git a/src/screen_help.c b/src/screen_help.c
index 3b66403d7c88202be2245ae69ed69e1781107e99..1f0043c094b719ba06deeb91ff95d52bf6770a0f 100644 (file)
--- a/src/screen_help.c
+++ b/src/screen_help.c
#include <stdlib.h>
#include <string.h>
#include <glib.h>
-#include <ncurses.h>
typedef struct {
signed char highlight;
diff --git a/src/screen_keydef.c b/src/screen_keydef.c
index 86faabaf403da448279f67e8f994095571e12604..4e42b386f2975d5002dddfa603572876a480c554 100644 (file)
--- a/src/screen_keydef.c
+++ b/src/screen_keydef.c
#include <stdlib.h>
#include <string.h>
#include <glib.h>
-#include <ncurses.h>
#define STATIC_ITEMS 0
#define STATIC_SUB_ITEMS 1
diff --git a/src/screen_list.h b/src/screen_list.h
index 27c034676d3c6742d2d0ee06f71ccf0f64d9c0ed..e208a8bfec9d946cdf14f8e807d5599da901ab40 100644 (file)
--- a/src/screen_list.h
+++ b/src/screen_list.h
#include "config.h"
+#ifdef HAVE_NCURSESW_NCURSES_H
+#include <ncursesw/ncurses.h>
+#else
#include <ncurses.h>
+#endif
extern const struct screen_functions screen_playlist;
extern const struct screen_functions screen_browse;
diff --git a/src/screen_lyrics.c b/src/screen_lyrics.c
index 2a8e10b67fad0f6bc4c180994bdc37d17492c006..6d9c6e4af03ab96a700c0dc647f9d8ed0d114423 100644 (file)
--- a/src/screen_lyrics.c
+++ b/src/screen_lyrics.c
#include <stdlib.h>
#include <string.h>
#include <glib.h>
-#include <ncurses.h>
#include <unistd.h>
#include <stdio.h>
diff --git a/src/screen_play.c b/src/screen_play.c
index 37705c559d4a8800df1903d575b93b4c2e19200a..90b06aa0eb730d3ef2ee8749a681e7e6dbd05db5 100644 (file)
--- a/src/screen_play.c
+++ b/src/screen_play.c
#include <string.h>
#include <time.h>
#include <glib.h>
-#include <ncurses.h>
#define MAX_SONG_LENGTH 512
diff --git a/src/screen_utils.h b/src/screen_utils.h
index a550f17428301d6864bcd6da274ff3ebbe9fbd0f..335faceb2b40b0183b6e0dd6e45245deff45a7cb 100644 (file)
--- a/src/screen_utils.h
+++ b/src/screen_utils.h
#ifndef SCREEN_UTILS_H
#define SCREEN_UTILS_H
+#include "config.h"
#include "list_window.h"
#include "command.h"
+#ifdef HAVE_NCURSESW_NCURSES_H
+#include <ncursesw/ncurses.h>
+#else
#include <ncurses.h>
+#endif
struct mpdclient;
diff --git a/src/wreadln.h b/src/wreadln.h
index e1efe1c501600e7dd0092c3870808b786c27bab5..e1ac67318cde15e724ba51ec94867c87f4d1e47d 100644 (file)
--- a/src/wreadln.h
+++ b/src/wreadln.h
#ifndef WREADLN_H
#define WREADLN_H
+#include "config.h"
+
#include <glib.h>
+
+#ifdef HAVE_NCURSESW_NCURSES_H
+#include <ncursesw/ncurses.h>
+#else
#include <ncurses.h>
+#endif
/* completion callback data */
extern void *wrln_completion_callback_data;