From 74c285e090b875d1a1e4e32adc28dcf12469a8b4 Mon Sep 17 00:00:00 2001 From: cboesch Date: Mon, 3 Jan 2011 19:39:31 +0000 Subject: cleanup: define ROUND() macro in mpcommon.h git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32751 b3059339-0415-0410-9bf9-f77b7e298cf2 --- command.c | 2 -- m_property.c | 3 +-- mpcommon.h | 2 ++ mplayer.c | 2 -- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/command.c b/command.c index efe538f739..bc6aa3c818 100644 --- a/command.c +++ b/command.c @@ -70,8 +70,6 @@ #include "mp_fifo.h" #include "libavutil/avstring.h" -#define ROUND(x) ((int)((x)<0 ? (x)-0.5 : (x)+0.5)) - extern int use_menu; static void rescale_input_coordinates(struct MPContext *mpctx, int ix, int iy, diff --git a/m_property.c b/m_property.c index 363e042f1c..93fa8863fd 100644 --- a/m_property.c +++ b/m_property.c @@ -30,8 +30,7 @@ #include "m_option.h" #include "m_property.h" #include "mp_msg.h" - -#define ROUND(x) ((int)((x)<0 ? (x)-0.5 : (x)+0.5)) +#include "mpcommon.h" static int do_action(const m_option_t* prop_list, const char* name, int action, void* arg, void *ctx) { diff --git a/mpcommon.h b/mpcommon.h index 82b860bd87..891331293f 100644 --- a/mpcommon.h +++ b/mpcommon.h @@ -22,6 +22,8 @@ // both int64_t and double should be able to represent this exactly #define MP_NOPTS_VALUE (-1LL<<63) +#define ROUND(x) ((int)((x) < 0 ? (x) - 0.5 : (x) + 0.5)) + extern const char *mplayer_version; #endif /* MPLAYER_MPCOMMON_H */ diff --git a/mplayer.c b/mplayer.c index 03067ad9b0..e5eea0890c 100644 --- a/mplayer.c +++ b/mplayer.c @@ -112,8 +112,6 @@ float start_volume = -1; char *heartbeat_cmd; -#define ROUND(x) ((int)((x)<0 ? (x)-0.5 : (x)+0.5)) - #ifdef HAVE_RTC #ifdef __linux__ #include -- cgit v1.2.3