aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-02 19:00:28 +0200
committerMax Kellermann <max@duempel.org>2008-10-02 19:00:28 +0200
commita3f209be26e588397f7b96de73fb86625c6d2bb8 (patch)
tree32d64785eff9456e2ad3b21f6c03822a444e076f /src
parent45ff31548dc68c27e1af6fdf37945de97579f5f9 (diff)
downloadmpd-a3f209be26e588397f7b96de73fb86625c6d2bb8.tar.gz
mpd-a3f209be26e588397f7b96de73fb86625c6d2bb8.tar.xz
mpd-a3f209be26e588397f7b96de73fb86625c6d2bb8.zip
moved macros from ncmpc.h to main.c and screen.c
Moved constants which are only used in one source file. Remove several unused macros.
Diffstat (limited to '')
-rw-r--r--src/main.c3
-rw-r--r--src/ncmpc.h19
-rw-r--r--src/screen.c11
3 files changed, 13 insertions, 20 deletions
diff --git a/src/main.c b/src/main.c
index 641b12e35..6d83dac6c 100644
--- a/src/main.c
+++ b/src/main.c
@@ -41,6 +41,9 @@
#include <signal.h>
#include <string.h>
+/* time between mpd updates [s] */
+static const float MPD_UPDATE_TIME = 0.5;
+
#define BUFSIZE 1024
static const guint idle_interval = 500;
diff --git a/src/ncmpc.h b/src/ncmpc.h
index ca4af160d..6748c779b 100644
--- a/src/ncmpc.h
+++ b/src/ncmpc.h
@@ -1,25 +1,6 @@
#ifndef NCMPC_H
#define NCMPC_H
-/* welcome message time [s] */
-#define SCREEN_WELCOME_TIME 10
-
-/* status message time [s] */
-#define SCREEN_STATUS_MESSAGE_TIME 3
-
-/* getch() timeout for non blocking read [ms] */
-#define SCREEN_TIMEOUT 500
-
-/* minumum window size */
-#define SCREEN_MIN_COLS 14
-#define SCREEN_MIN_ROWS 5
-
-/* time between mpd updates [s] */
-#define MPD_UPDATE_TIME 0.5
-
-/* time before trying to reconnect [ms] */
-#define MPD_RECONNECT_TIME 1500
-
void
sigstop(void);
diff --git a/src/screen.c b/src/screen.c
index ac4a63ee1..5239b82d8 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -22,7 +22,6 @@
#include "screen_list.h"
#include "screen_utils.h"
#include "config.h"
-#include "ncmpc.h"
#include "i18n.h"
#include "support.h"
#include "mpdclient.h"
@@ -40,6 +39,16 @@
#include <time.h>
#include <locale.h>
+/** welcome message time [s] */
+static const unsigned SCREEN_WELCOME_TIME = 10;
+
+/** status message time [s] */
+static const unsigned SCREEN_STATUS_MESSAGE_TIME = 3;
+
+/* minumum window size */
+static const int SCREEN_MIN_COLS = 14;
+static const int SCREEN_MIN_ROWS = 5;
+
/* screens */
static gboolean welcome = TRUE;