efl: everyone should now rely on Eina MIN/MAX redefinition.

This commit is contained in:
Cedric BAIL 2016-05-09 16:58:31 -07:00
parent d00643fcc4
commit 0c4880e99d
16 changed files with 11 additions and 75 deletions

View File

@ -1,6 +1,3 @@
#define MAX(x, y) (((x) > (y)) ? (x) : (y))
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
#define FOG_COLOR 0.5, 0.5, 0.5
#define FOG_FACTOR 0.01
#define WIDTH 1920

View File

@ -69,14 +69,6 @@ extern int _ecore_log_dom;
# define PATH_MAX 4096
#endif
#ifndef MIN
# define MIN(x, y) (((x) > (y)) ? (y) : (x))
#endif
#ifndef MAX
# define MAX(x, y) (((x) > (y)) ? (x) : (y))
#endif
#ifndef ABS
# define ABS(x) ((x) < 0 ? -(x) : (x))
#endif

View File

@ -6,16 +6,6 @@
extern "C" {
#endif
#ifdef MIN
# undef MIN
#endif
#define MIN(a,b) (((a) < (b)) ? (a) : (b))
#ifdef MAX
# undef MAX
#endif
#define MAX(a,b) (((a) < (b)) ? (b) : (a))
/* logging messages macros */
extern int _ecore_win32_log_dom_global;

View File

@ -1,9 +1,5 @@
#include "ecore_xcb_private.h"
#ifndef MIN
# define MIN(a, b) (((a) < (b)) ? (a) : (b))
#endif
/* local structures */
typedef struct _Version_Cache_Item
{

View File

@ -73,14 +73,6 @@ extern int _ecore_xcb_log_dom;
# define MAXHOSTNAMELEN 256
# endif
# ifndef MIN
# define MIN(x, y) (((x) > (y)) ? (y) : (x))
# endif
# ifndef MAX
# define MAX(a, b) ((a < b) ? b : a)
# endif
#define CHECK_XCB_CONN \
{ \
if (xcb_connection_has_error(_ecore_xcb_conn)) \

View File

@ -130,10 +130,6 @@ EAPI extern int _edje_default_log_dom ;
#define CLAMP(x, min, max) (((x) > (max)) ? (max) : (((x) < (min)) ? (min) : (x)))
#endif
#ifndef MIN
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#endif
#ifdef BUILD_EDJE_FP

View File

@ -54,12 +54,6 @@
#define OFFSET_HEIGHT 12
#define OFFSET_BLOCKS 16
#undef MIN
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
#undef MAX
#define MAX(x, y) (((x) > (y)) ? (x) : (y))
/*---*/
typedef struct _JPEG_error_mgr *emptr;

View File

@ -25,14 +25,6 @@
#include "eina_iterator.h"
#include "eina_accessor.h"
#ifndef MIN
# define MIN(x, y) (((x) > (y)) ? (y) : (x))
#endif
#ifndef MAX
# define MAX(x, y) (((x) > (y)) ? (x) : (y))
#endif
#ifndef ABS
# define ABS(x) ((x) < 0 ? -(x) : (x))
#endif

View File

@ -35,7 +35,7 @@
#include "eina_private.h"
#include "eina_str.h"
#include "eina_cpu.h"
/*============================================================================*
* Local *

View File

@ -33,6 +33,7 @@
#include "eina_config.h"
#include "eina_private.h"
#include "eina_tiler.h"
#include "eina_cpu.h"
/*============================================================================*
* Local *

View File

@ -169,10 +169,6 @@ extern const char *_elm_engines[];
#define ELM_ATSPI_MODE_ON EINA_TRUE
/* convenience macro to compress code and avoid typos */
#undef MIN
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
#undef MAX
#define MAX(x, y) (((x) > (y)) ? (x) : (y))
#undef CEIL
#define CEIL(a) (((a) % 2 != 0) ? ((a) / 2 + 1) : ((a) / 2))
#undef IS_INSIDE

View File

@ -84,13 +84,6 @@ struct _Region
#define PIXREGION_END(reg) PIXREGION_BOX(reg, (reg)->data->num - 1)
#define PIXREGION_SZOF(n) (sizeof(Region_Data) + ((n) * sizeof(Box)))
#ifndef MIN
# define MIN(a, b) ((a) < (b) ? (a) : (b))
#endif
#ifndef MAX
# define MAX(a, b) ((a) > (b) ? (a) : (b))
#endif
// r1 and r2 overlap
#define OVERLAP(r1, r2) \
(!(((r1)->x2 <= (r2)->x1) || ((r1)->x1 >= (r2)->x2) || \

View File

@ -7,12 +7,6 @@
#undef SGN
#define SGN(x) (((x) < 0) ? -1 : 1)
#undef MIN
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
#undef MAX
#define MAX(x, y) (((x) > (y)) ? (x) : (y))
/* clamp b between a and c */
#undef CLAMP
#define CLAMP(a,b,c) MIN(MAX((b),(a)),(c))

View File

@ -37,9 +37,6 @@ struct _Frame_Info
Eina_Bool interlace : 1; // interlaced or not
};
#ifndef MIN
# define MIN(a, b) (((a) < (b)) ? (a) : (b))
#endif
#define LOADERR(x) \
do { \
*error = (x); \

View File

@ -33,8 +33,12 @@ typedef unsigned int uint;
typedef unsigned int uint32;
typedef unsigned char DATA8;
#define MIN(A, B) ((A < B) ? A : B)
#define MAX(A, B) ((A > B) ? A : B)
#ifndef MIN
# define MIN(A, B) ((A < B) ? A : B)
#endif
#ifndef MAX
# define MAX(A, B) ((A > B) ? A : B)
#endif
#define CLAMP(Value, Low, High) ((Value < Low) ? Low : ((Value > High) ? High : Value))
#define SQUARE(Value) (Value * Value)

View File

@ -92,7 +92,9 @@ static const int kAlphaModifiers[16][8] = {
#define CLAMP(a) ({ int _b = (a); (((_b) >= 0) ? (((_b) < 256) ? (_b) : 255) : 0); })
// Simple min
#define MIN(a,b) ({ int _z = (a), _y = (b); ((_z <= _y) ? _z : _y); })
#ifndef MIN
# define MIN(a,b) ({ int _z = (a), _y = (b); ((_z <= _y) ? _z : _y); })
#endif
// Write a BGRA value for output to Evas
#define BGRA(r,g,b,a) ((a << 24) | (r << 16) | (g << 8) | b)