From a3f209be26e588397f7b96de73fb86625c6d2bb8 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 2 Oct 2008 19:00:28 +0200 Subject: [PATCH] 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. --- src/main.c | 3 +++ src/ncmpc.h | 19 ------------------- src/screen.c | 11 ++++++++++- 3 files changed, 13 insertions(+), 20 deletions(-) diff --git a/src/main.c b/src/main.c index 641b12e..6d83dac 100644 --- a/src/main.c +++ b/src/main.c @@ -41,6 +41,9 @@ #include #include +/* 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 ca4af16..6748c77 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 ac4a63e..5239b82 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 #include +/** 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; -- 2.30.2