summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 45ff315)
raw | patch | inline | side by side (parent: 45ff315)
author | Max Kellermann <max@duempel.org> | |
Thu, 2 Oct 2008 17:00:28 +0000 (19:00 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Thu, 2 Oct 2008 17:00:28 +0000 (19:00 +0200) |
Moved constants which are only used in one source file. Remove
several unused macros.
several unused macros.
src/main.c | patch | blob | history | |
src/ncmpc.h | patch | blob | history | |
src/screen.c | patch | blob | history |
diff --git a/src/main.c b/src/main.c
index 641b12e35f8d8a1a63eb2701eaa52e381d44fae3..6d83dac6ca50c7311660664a675fbdec4b5f049a 100644 (file)
--- a/src/main.c
+++ b/src/main.c
#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 ca4af160df546a3d96be341841b87d4a14987728..6748c779b822f78fb8000e77637cdbe6a699cdfd 100644 (file)
--- a/src/ncmpc.h
+++ b/src/ncmpc.h
#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 ac4a63ee1d47ed5a3bc875de03f006b076a85acf..5239b82d8161bd7126cd94926fb31f6cd61c9af4 100644 (file)
--- a/src/screen.c
+++ b/src/screen.c
#include "screen_list.h"
#include "screen_utils.h"
#include "config.h"
-#include "ncmpc.h"
#include "i18n.h"
#include "support.h"
#include "mpdclient.h"
#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;