[EGIT] [core/efl] master 01/02: eina freeq - add explicit bypass on/off env var controls

2016-12-20 Thread Carsten Haitzler
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ffefbe0718c4821b7beb886b7a3630a63e8fe54c

commit ffefbe0718c4821b7beb886b7a3630a63e8fe54c
Author: Carsten Haitzler (Rasterman) 
Date:   Wed Dec 21 10:06:32 2016 +0900

eina freeq - add explicit bypass on/off env var controls

this fixes T5032
---
 src/lib/eina/eina_freeq.c | 19 +++
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/src/lib/eina/eina_freeq.c b/src/lib/eina/eina_freeq.c
index 49fdb0b..c1aff89 100644
--- a/src/lib/eina/eina_freeq.c
+++ b/src/lib/eina/eina_freeq.c
@@ -149,12 +149,23 @@ eina_freeq_new(void)
if (_eina_freeq_bypass == -1)
  {
 const char *s;
-
-if (getenv("EINA_FREEQ_BYPASS")) _eina_freeq_bypass = 1;
+int v;
+
+s = getenv("EINA_FREEQ_BYPASS");
+if (s)
+  {
+ v = atoi(s);
+ if (v == 0) _eina_freeq_bypass = 0;
+ else _eina_freeq_bypass = 1;
+  }
+if (_eina_freeq_bypass == -1)
+  {
 #ifdef HAVE_VALGRIND
-else if (RUNNING_ON_VALGRIND) _eina_freeq_bypass = 1;
+ if (RUNNING_ON_VALGRIND) _eina_freeq_bypass = 1;
+ else
 #endif
-else _eina_freeq_bypass = 0;
+   _eina_freeq_bypass = 0;
+  }
 s = getenv("EINA_FREEQ_FILL_MAX");
 if (s) _eina_freeq_fillpat_max = atoi(s);
 s = getenv("EINA_FREEQ_TOTAL_MAX");

-- 




[EGIT] [core/efl] master 02/02: eina freeq - add ability to set freeval and add a final freeval

2016-12-20 Thread Carsten Haitzler
raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=d5e88e4cf99a15005f8dbb25d784526ac050c5bd

commit d5e88e4cf99a15005f8dbb25d784526ac050c5bd
Author: Carsten Haitzler (Rasterman) 
Date:   Wed Dec 21 15:37:47 2016 +0900

eina freeq - add ability to set freeval and add a final freeval

this allows environment variables to set the byte falue to fill a
freeq item added to the queue and then another item to actually fill
memory with just before the free function so memory content difference
will tell you if its inside the free queue or already freed from it
completely. if you set tyhe freed value to 0 this will not fill with a
value just before free and leave the value as-is determined by the
first fill pattern value.
---
 src/lib/eina/eina_freeq.c | 31 +++
 src/lib/eina/eina_freeq.h | 29 -
 2 files changed, 47 insertions(+), 13 deletions(-)

diff --git a/src/lib/eina/eina_freeq.c b/src/lib/eina/eina_freeq.c
index c1aff89..17459dc 100644
--- a/src/lib/eina/eina_freeq.c
+++ b/src/lib/eina/eina_freeq.c
@@ -57,21 +57,29 @@ struct _Eina_FreeQ
 
 // = //
 
-static Eina_FreeQ*_eina_freeq_main= NULL;
-static int_eina_freeq_bypass  = -1;
-static unsigned int   _eina_freeq_fillpat_max = ITEM_FILLPAT_MAX;
-static unsigned char  _eina_freeq_fillpat_val = 0x55;
-static int_eina_freeq_total_max   = ITEM_TOTAL_MAX;
-static size_t _eina_freeq_mem_max = ITEM_MEM_MAX;
+static Eina_FreeQ*_eina_freeq_main  = NULL;
+static int_eina_freeq_bypass= -1;
+static unsigned int   _eina_freeq_fillpat_max   = ITEM_FILLPAT_MAX;
+static unsigned char  _eina_freeq_fillpat_val   = 0x55;
+static unsigned char  _eina_freeq_fillpat_freed_val = 0x77;
+static int_eina_freeq_total_max = ITEM_TOTAL_MAX;
+static size_t _eina_freeq_mem_max   = ITEM_MEM_MAX;
 
 // = //
 
-static void
+static inline void
 _eina_freeq_fill_do(void *ptr, size_t size)
 {
if (ptr) memset(ptr, _eina_freeq_fillpat_val, size);
 }
 
+static inline void
+_eina_freeq_freed_fill_do(void *ptr, size_t size)
+{
+   if (_eina_freeq_fillpat_freed_val == 0) return;
+   if (ptr) memset(ptr, _eina_freeq_fillpat_freed_val, size);
+}
+
 static void
 _eina_freeq_fill_check(void *ptr, void (*free_func) (void *ptr), size_t size)
 {
@@ -94,7 +102,10 @@ _eina_freeq_free_do(void *ptr,
 size_t size EINA_UNUSED)
 {
if ((size < _eina_freeq_fillpat_max) && (size > 0))
- _eina_freeq_fill_check(ptr, free_func, size);
+ {
+_eina_freeq_fill_check(ptr, free_func, size);
+_eina_freeq_freed_fill_do(ptr, size);
+ }
free_func(ptr);
return;
 }
@@ -172,6 +183,10 @@ eina_freeq_new(void)
 if (s) _eina_freeq_total_max = atoi(s);
 s = getenv("EINA_FREEQ_MEM_MAX");
 if (s) _eina_freeq_mem_max = atoi(s) * 1024;
+s = getenv("EINA_FREEQ_FILL");
+if (s) _eina_freeq_fillpat_val = atoi(s);
+s = getenv("EINA_FREEQ_FILL_FREED");
+if (s) _eina_freeq_fillpat_freed_val = atoi(s);
  }
fq = calloc(1, sizeof(Eina_FreeQ));
if (!fq) return NULL;
diff --git a/src/lib/eina/eina_freeq.h b/src/lib/eina/eina_freeq.h
index 11a0bca..eacd3a0 100644
--- a/src/lib/eina/eina_freeq.h
+++ b/src/lib/eina/eina_freeq.h
@@ -17,10 +17,11 @@
  *
  * For debugging and tuning you may set the following envrionment variables:
  *
- * EINA_FREEQ_BYPASS=1
+ * EINA_FREEQ_BYPASS=1/0
  *
- * Set this environment variable to immediately bypass the free queue and
- * have all items submitted free with their free function immediately.
+ * Set this environment variable to 1 to immediately bypass the free queue and
+ * have all items submitted free with their free function immediately. Set
+ * it to 0 to force the free queue to work and delay freeing of items.
  * Note that you can override this by setting count or mem max by
  * eina_freeq_count_max_set() or eina_freeq_mem_max_set() which will
  * disable bypass for that specific free queue. once bypass is disabled
@@ -31,17 +32,35 @@
  * This sets the maximum number of bytes to N an item in the free queue may
  * be in size for the free queue to fill it with debugging values like
  * 0x55 in every byte, to ensure you can see what memory has been freed
- * or not when debugging in tools like gdb.
+ * or not when debugging in tools like gdb. Note that this value is
+ * actually one greater than the actual maximum, so if this is set to 100
+ * a memory blob of 100 bytes will not be filled but one of 99 bytes in
+ * size will be.
  *
  * EINA_FREEQ_TOTAL_MAX=N
  *
  * This sets the maximum number of items allowed to N on a free queue by
- * default before it 

[EGIT] [core/efl] master 02/03: evas: Fix image save with GL engine and orientation

2016-12-20 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2e89702d576f604332197332097591667b8fbe0f

commit 2e89702d576f604332197332097591667b8fbe0f
Author: Jean-Philippe Andre 
Date:   Tue Dec 20 17:56:09 2016 +0900

evas: Fix image save with GL engine and orientation

This fixes evas_object_image_save after changing the orientation
of an image in the GL engine. In SW engine the pixel data is rotated
in memory, so things worked fine from the beginning. In GL we may
have to go through loops and hoops in order to rotate and fetch the
data from the GL texture.

This should fix ce45d44.
---
 src/lib/evas/canvas/efl_canvas_image.c |  2 +-
 src/lib/evas/canvas/evas_object_image.c| 97 +-
 src/lib/evas/include/evas_private.h|  2 +-
 src/modules/evas/engines/gl_generic/evas_engine.c  | 63 +-
 .../evas/engines/software_generic/evas_engine.c|  9 +-
 5 files changed, 93 insertions(+), 80 deletions(-)

diff --git a/src/lib/evas/canvas/efl_canvas_image.c 
b/src/lib/evas/canvas/efl_canvas_image.c
index 1c97173..bfa0ca3 100644
--- a/src/lib/evas/canvas/efl_canvas_image.c
+++ b/src/lib/evas/canvas/efl_canvas_image.c
@@ -739,7 +739,7 @@ _efl_canvas_image_efl_gfx_buffer_buffer_managed_get(Eo 
*eo_obj, void *_pd EINA_U
if (!o->buffer_data_set || !o->engine_data || !ENFN->image_data_direct_get)
  return EINA_FALSE;
 
-   return ENFN->image_data_direct_get(ENDT, o->engine_data, plane, slice, 
);
+   return ENFN->image_data_direct_get(ENDT, o->engine_data, plane, slice, 
, EINA_FALSE);
 }
 
 EOLIAN static Eina_Bool
diff --git a/src/lib/evas/canvas/evas_object_image.c 
b/src/lib/evas/canvas/evas_object_image.c
index c4b7668..d81277f 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -874,9 +874,9 @@ _efl_canvas_image_internal_efl_file_save(const Eo *eo_obj, 
Evas_Image_Data *o, c
int quality = 80, compress = 9, ok = 0;
char *encoding = NULL;
Image_Entry *ie;
-   Eina_Bool putback = EINA_FALSE, tofree = EINA_FALSE, no_convert = 
EINA_FALSE;
+   Eina_Bool putback = EINA_FALSE, tofree = EINA_FALSE, tgv = EINA_FALSE, 
free_data = EINA_FALSE;
Evas_Colorspace cspace = EVAS_COLORSPACE_ARGB;
-   int want_cspace = EVAS_COLORSPACE_ARGB;
+   Evas_Colorspace want_cspace = EVAS_COLORSPACE_ARGB;
int imagew, imageh;
void *pixels;
 
@@ -926,9 +926,11 @@ _efl_canvas_image_internal_efl_file_save(const Eo *eo_obj, 
Evas_Image_Data *o, c
 o->proxyrendering = EINA_FALSE;
  }
 
+   cspace = ENFN->image_file_colorspace_get(ENDT, pixels);
+   want_cspace = cspace;
+
if (flags)
  {
-const char *ext = NULL;
 char *p, *pp;
 char *tflags;
 
@@ -946,11 +948,17 @@ _efl_canvas_image_internal_efl_file_save(const Eo 
*eo_obj, Evas_Image_Data *o, c
  else break;
   }
 
-if (file) ext = strrchr(file, '.');
-if (encoding && ext && !strcasecmp(ext, ".tgv"))
+if (file)
+  {
+ const char *ext = strrchr(file, '.');
+ if (ext && !strcasecmp(ext, ".tgv"))
+   tgv = EINA_TRUE;
+  }
+
+if (encoding && tgv)
   {
  if (!strcmp(encoding, "auto"))
-   want_cspace = -1;
+   want_cspace = cspace;
  else if (!strcmp(encoding, "etc1"))
want_cspace = EVAS_COLORSPACE_ETC1;
  else if (!strcmp(encoding, "etc2"))
@@ -970,49 +978,39 @@ _efl_canvas_image_internal_efl_file_save(const Eo 
*eo_obj, Evas_Image_Data *o, c
   }
  }
 
-   if (!ENFN->image_data_direct_get)
- pixels = ENFN->image_data_get(ENDT, pixels, 0, , >load_error, 
);
-   else
+   if (ENFN->image_data_direct_get && (o->cur->orient == 
EVAS_IMAGE_ORIENT_NONE))
  {
+Evas_Colorspace cs;
 Eina_Slice slice;
-if (ENFN->image_data_direct_get(ENDT, pixels, 0, , ))
-  {
- if ((want_cspace != (int) cspace) && (want_cspace != -1))
-   cspace = EVAS_COLORSPACE_ARGB;
-  }
-else
+
+ENFN->image_colorspace_set(ENDT, pixels, want_cspace);
+ok = ENFN->image_data_direct_get(ENDT, pixels, 0, , , 
EINA_TRUE);
+if (ok && (want_cspace == cs))
   {
- cspace = ENFN->image_file_colorspace_get(ENDT, pixels);
- if ((want_cspace != (int) cspace) && (want_cspace != -1))
-   cspace = EVAS_COLORSPACE_ARGB;
- else
-   {
-  ENFN->image_colorspace_set(ENDT, pixels, cspace);
-  no_convert = EINA_TRUE;
-   }
+ data = (DATA32 *) slice.mem;
+ putback = EINA_FALSE;
   }
+else ENFN->image_colorspace_set(ENDT, pixels, cspace);
+ }
+
+   if (!data)
+ {
+cspace = EVAS_COLORSPACE_ARGB;
+

[EGIT] [core/efl] master 01/03: ecore_evas_convert: Fix crazy use of objects from a thread

2016-12-20 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=01af35de6fb32af659b977b0f1f3beda05a9e0af

commit 01af35de6fb32af659b977b0f1f3beda05a9e0af
Author: Jean-Philippe Andre 
Date:   Tue Dec 20 19:00:10 2016 +0900

ecore_evas_convert: Fix crazy use of objects from a thread

I did that originally to implement a slightly nice way for
Ctrl+C to work. But it was clearly a hack (as mentioned in
the comments), and stopped working since domains were
introduced.

Should we rename this standalone tool as "efl_image_convert",
or even just "efl_convert"?
---
 src/bin/ecore_evas/ecore_evas_convert.c | 67 ++---
 1 file changed, 28 insertions(+), 39 deletions(-)

diff --git a/src/bin/ecore_evas/ecore_evas_convert.c 
b/src/bin/ecore_evas/ecore_evas_convert.c
index 07d4632..6012d9a 100644
--- a/src/bin/ecore_evas/ecore_evas_convert.c
+++ b/src/bin/ecore_evas/ecore_evas_convert.c
@@ -12,6 +12,10 @@
 #include 
 #include 
 
+#if defined(_WIN32) || defined(EXOTIC_NO_SIGNAL)
+# define NO_SIGNAL
+#endif
+
 #undef EINA_LOG_DOMAIN_DEFAULT
 #define EINA_LOG_DOMAIN_DEFAULT _log_dom
 static int _log_dom = -1;
@@ -36,53 +40,38 @@ const Ecore_Getopt optdesc = {
   }
 };
 
-struct Save_Job {
+typedef struct _Save_Job {
const char *output;
const char *flags;
-   Ecore_Thread *th;
Evas_Object *im;
-   int ret, cancel;
-};
+   int ret;
+} Save_Job;
+
+static Save_Job job = { NULL, NULL, NULL, -1 };
 
 static void
-_save_do(void *data, Ecore_Thread *thread EINA_UNUSED)
+_save_do(void *data EINA_UNUSED)
 {
-   struct Save_Job *job = data;
-
-   job->ret = 0;
-   if (!evas_object_image_save(job->im, job->output, NULL, job->flags))
+   job.ret = 0;
+   if (!evas_object_image_save(job.im, job.output, NULL, job.flags))
  {
-EINA_LOG_ERR("Could not convert file to '%s'.", job->output);
-job->ret = 1;
+EINA_LOG_ERR("Could not convert file to '%s'.", job.output);
+job.ret = 1;
  }
-}
 
-static void
-_save_end(void *data EINA_UNUSED, Ecore_Thread *thread EINA_UNUSED)
-{
ecore_main_loop_quit();
 }
 
-static Eina_Bool
-exit_func(void *data, int ev_type EINA_UNUSED, void *ev)
+#ifndef NO_SIGNAL
+static void
+_sigint(int sig EINA_UNUSED)
 {
-   Ecore_Event_Signal_Exit *e = ev;
-   struct Save_Job *job = data;
-   if (!job->cancel && !e->quit && !e->terminate)
- {
-// this won't do anything, really...
-fprintf(stderr, "Cancellation requested. Press Ctrl+C again to 
kill.\n");
-fflush(stderr);
-job->cancel = 1;
-ecore_thread_cancel(job->th);
- }
-   else
- {
-fprintf(stderr, "Terminated.");
-exit(1);
- }
-   return ECORE_CALLBACK_RENEW;
+   EINA_LOG_ERR("Image save interrupted by SIGINT: '%s'.", job.output);
+   // eina_file_unlink
+   unlink(job.output);
+   exit(-1);
 }
+#endif
 
 int
 main(int argc, char *argv[])
@@ -97,7 +86,6 @@ main(int argc, char *argv[])
Eina_Bool compress = 1;
Eina_Bool quit_option = EINA_FALSE;
Eina_Strbuf *flags = NULL;
-   struct Save_Job job = { NULL, NULL, NULL, NULL, 0, 0 };
 
Ecore_Getopt_Value values[] = {
  ECORE_GETOPT_VALUE_INT(quality),
@@ -156,15 +144,16 @@ main(int argc, char *argv[])
 goto end;
  }
 
-   // NOTE: DO NOT DO THIS AT HOME -- HACK for Ctrl+C
-   // This makes Ctrl+C work but the Evas Object may not be deleted cleanly
+#ifndef NO_SIGNAL
+   // Brutal way of
+   signal(SIGINT, _sigint);
+#endif
+
job.output = argv[arg_index + 1];
job.flags = eina_strbuf_string_get(flags);
job.im = im;
-   job.th = ecore_thread_run(_save_do, _save_end, _save_end, );
-   ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, exit_func, );
+   ecore_job_add(_save_do, NULL);
ecore_main_loop_begin();
-
r = job.ret;
 
  end:

-- 




[EGIT] [core/efl] master 03/03: evas: Try to fix compilation with EGLAttrib

2016-12-20 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=1d4affadd1957500eaa8b33e9c89174c613e34a4

commit 1d4affadd1957500eaa8b33e9c89174c613e34a4
Author: Jean-Philippe Andre 
Date:   Tue Dec 20 17:07:50 2016 +0900

evas: Try to fix compilation with EGLAttrib
---
 src/modules/evas/engines/gl_common/evas_gl_context.c | 1 -
 src/modules/evas/engines/gl_common/evas_gl_define.h  | 7 +++
 src/modules/evas/engines/gl_drm/evas_engine.c| 4 
 src/modules/evas/engines/gl_drm/evas_outbuf.c| 1 -
 src/modules/evas/engines/gl_x11/evas_engine.c| 6 +-
 src/modules/evas/engines/gl_x11/evas_x_main.c| 8 
 6 files changed, 8 insertions(+), 19 deletions(-)

diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c 
b/src/modules/evas/engines/gl_common/evas_gl_context.c
index 8cca90a..dc04597 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_context.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_context.c
@@ -55,7 +55,6 @@ void  *(*secsym_eglMapImageSEC)   (void 
*a, void *b, int c,
 unsigned int   (*secsym_eglUnmapImageSEC) (void *a, void *b, int 
c) = NULL;
 unsigned int   (*secsym_eglGetImageAttribSEC) (void *a, void *b, int 
c, int *d) = NULL;
 
-
 /* This one is now a local wrapper to avoid type mixups */
 void *evas_gl_common_eglCreateImage   (EGLDisplay dpy, 
EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib 
*attrib_list);
 static void * (*eglsym_eglCreateImage)(EGLDisplay dpy, 
EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib 
*attrib_list) = NULL;
diff --git a/src/modules/evas/engines/gl_common/evas_gl_define.h 
b/src/modules/evas/engines/gl_common/evas_gl_define.h
index 0e76f41..8750250 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_define.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_define.h
@@ -282,6 +282,9 @@ Much of it is from Mesa, so their copyright is included as 
well.
 #ifndef EGL_WAYLAND_Y_INVERTED_WL
 # define EGL_WAYLAND_Y_INVERTED_WL 0x31DB
 #endif
+#ifndef EGL_PLATFORM_X11_KHR
+# define EGL_PLATFORM_X11_KHR 0x31D5
+#endif
 // Evas_3d require GL_BGR, but that's an extention and will not be necessary 
once we move to Evas_GL_Image
 #ifndef GL_BGR
 #define GL_BGR 0x80E0
@@ -329,4 +332,8 @@ Much of it is from Mesa, so their copyright is included as 
well.
 #define GL_STENCIL_EXT 0x1802
 #endif
 
+#if defined(GL_GLES) && !defined(EGL_VERSION_1_5)
+typedef intptr_t EGLAttrib;
+#endif
+
 #endif
diff --git a/src/modules/evas/engines/gl_drm/evas_engine.c 
b/src/modules/evas/engines/gl_drm/evas_engine.c
index 5fab775..61f3f07 100644
--- a/src/modules/evas/engines/gl_drm/evas_engine.c
+++ b/src/modules/evas/engines/gl_drm/evas_engine.c
@@ -20,10 +20,6 @@
 
 #define EVAS_GL_UPDATE_TILE_SIZE 16
 
-#ifndef EGL_VERSION_1_5
-typedef intptr_t EGLAttrib;
-#endif
-
 /* external variables */
 int _evas_engine_gl_drm_log_dom = -1;
 int _extn_have_buffer_age = 1;
diff --git a/src/modules/evas/engines/gl_drm/evas_outbuf.c 
b/src/modules/evas/engines/gl_drm/evas_outbuf.c
index b76f3eb..cfc40a0 100644
--- a/src/modules/evas/engines/gl_drm/evas_outbuf.c
+++ b/src/modules/evas/engines/gl_drm/evas_outbuf.c
@@ -1,5 +1,4 @@
 #include "evas_engine.h"
-#include "../gl_common/evas_gl_define.h"
 
 /* local variables */
 static Outbuf *_evas_gl_drm_window = NULL;
diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c 
b/src/modules/evas/engines/gl_x11/evas_engine.c
index 9d6150a..94bfded 100644
--- a/src/modules/evas/engines/gl_x11/evas_engine.c
+++ b/src/modules/evas/engines/gl_x11/evas_engine.c
@@ -79,10 +79,6 @@ glsym_func_void_ptr glsym_evas_gl_common_current_context_get 
= NULL;
 
 #ifdef GL_GLES
 
-#if !defined(EGL_KHR_cl_event2) && !defined(EGL_VERSION_1_5)
-typedef intptr_t EGLAttribKHR;
-#endif
-
 _eng_fn  (*glsym_eglGetProcAddress)(const char *a) = NULL;
 EGLImageKHR (*glsym_evas_gl_common_eglCreateImage)(EGLDisplay a, EGLContext b, 
EGLenum c, EGLClientBuffer d, const EGLAttrib *e) = NULL;
 void (*glsym_eglDestroyImage)  (EGLDisplay a, void *b) = NULL;
@@ -2938,7 +2934,7 @@ eng_image_native_set(void *data, void *image, void 
*native)
   {
  if ((n = calloc(1, sizeof(Native
{
-  EGLAttribKHR attribs[3];
+  EGLAttrib attribs[3];
   int format, yinvert = 1;
 
   glsym_eglQueryWaylandBufferWL(eng_get_ob(re)->egl_disp, 
wl_buf,
diff --git a/src/modules/evas/engines/gl_x11/evas_x_main.c 
b/src/modules/evas/engines/gl_x11/evas_x_main.c
index 18fad57..4cd47f5 100644
--- a/src/modules/evas/engines/gl_x11/evas_x_main.c
+++ b/src/modules/evas/engines/gl_x11/evas_x_main.c
@@ -151,14 +151,6 @@ _visuals_hash_index_get_from_info(Evas_Engine_Info_GL_X11 
*info)
 
 #ifdef GL_GLES
 
-#ifndef EGL_PLATFORM_X11_KHR
-# define EGL_PLATFORM_X11_KHR 0x31D5

Re: [E-devel] [EGIT] [core/efl] master 01/21: eina: add general purpose function to compar float and double.

2016-12-20 Thread Vincent Torri
On Wed, Dec 21, 2016 at 12:08 AM, Cedric BAIL  wrote:
> On Mon, Dec 19, 2016 at 10:06 PM, Vincent Torri  
> wrote:
>> last thing : for now, mingw-w64 does not define FLT_EPSILON. It should
>> be added soon as it is part of the API of win32.
>
> Oh, thanks. Will add some fallback then.

hmm, no, it works. It's just defined in a strange location (not in
float.h, but somewhere else). I should have just test with an example
(what i've just did) before sending the mail

sorry

Vincent

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] Eo: static methods or C syntax sugar for class methods?

2016-12-20 Thread Jean-Philippe André
Hey k-s,

On 20 December 2016 at 20:03, Gustavo Sverzut Barbieri 
wrote:

> On Mon, Dec 19, 2016 at 11:05 PM, Jean-Philippe André 
> wrote:
> > On 19 December 2016 at 21:10, Gustavo Sverzut Barbieri <
> barbi...@gmail.com>
> > While these are nice to be "class methods" since one could get these
> >> to work with subclasses, they are often used with the original class.
> >> Then my request is to either to introduce a "staticmethod" OR to use
> >> some macro trick to count the number of parameters and pass the class
> >> automatically when omitted or generate 2 functions, one with class and
> >> another without (one could be an actual function, while the other just
> >> a macro).
> >>
> >> End goal is to make these look more like:
> >>
> >> efl_net_ip_address_create(1234, "127.0.0.1");
> >
> >
> > A macro could be nice. We still need @class functions to work with other
> > classes than the one that declares the method. Each class can then have
> its
> > own implementation of the common @class function. Should all sub
> > implementations also provide a macro, then?
>
> that's a neat idea, to generate the macros with the new name if
> "implements"
>
> but if we do a macro that counts the number of parameters and if no
> class is given it would assume the default class (base), that's easier
> to use.
>

I'm a bit worried about the naming scheme for those macros, as they would
then have to merge a full method name (eg. my_first_class_func) and the
implementing class name (eg. my_other_class). I honestly didn't really
think of this idea as very neat because of this ;) But maybe you have a
good idea?

As you may know I've used such a factory for input events, and the syntax
is a bit crappy (but it returns the private data, which is convenient for
internal code).

-- 
Jean-Philippe André
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 01/01: build: enable -Wfloat-equal for compiling

2016-12-20 Thread Jean-Philippe André
Hi,

On 21 December 2016 at 08:06, Cedric BAIL  wrote:

> On Mon, Dec 19, 2016 at 11:12 PM, Jean-Philippe André 
> wrote:
> > Hey Mike,
> >
> > On 20 December 2016 at 01:12, Mike Blumenkrantz <
> > michael.blumenkra...@gmail.com> wrote:
> >> discomfitor pushed a commit to branch master.
> >>
> >> http://git.enlightenment.org/core/efl.git/commit/?id=
> >> 25792d64165ad4f5f647a36f087af2d2206a6618
> >>
> >> commit 25792d64165ad4f5f647a36f087af2d2206a6618
> >> Author: Mike Blumenkrantz 
> >> Date:   Mon Dec 19 11:08:43 2016 -0500
> >>
> >> build: enable -Wfloat-equal for compiling
> >>
> >>  #WarningOfTheMonth
> >>
> >
> > Urgh. What the hell.
> >
> > Those warnings have a very limited value. How many real issues have you
> > seen that resulted from this unsafe comparison? I'm pretty sure that
> float
> > == 0 or float != 0 will succeed when we expect them to, and the equality
> > tests will also work whenever we do direct assignments (without
> arithmetic).
>
> I have found some real issue already in edje_calc, edje_load and
> edje_edit (I believe some of the logic in eina matrix and quaternion
> where also buggy in that regard, but less sure of it as I don't know
> the user of the API that well). Overall, I wouldn't have even looked
> for a problem there and did react at first like you when I saw those
> warning. Still I realize that there was potential for edje and
> ephysics to actually have bugs due to this that most people wouldn't
> even know where to start looking at. Basically there is benefit for
> this flag, but mostly in place where we are barelly looking.
>

You have seen potential issues from reading the code. I'm not arguing there
aren't any real issues behind this, but I doubt there even is a ticket
related to this on Phab.

> Now I understand why cedric made a series of patches with the float
> > comparison thing. I'm sure he didn't have anything more important to do.
> > Are you going to fix the remaining 523 warnings? Please don't send 100
> > patches for that...
>
> We really should. I have no idea at this point which one are real
> potential bug and which one aren't. Now why I am doing it per files
> and not as a huge batch, because if we do get it wrong for one widget
> or one feature it is easier to just revert that file that the entire
> patch. I am not sure it is a good idea to do it in one go.
>

Urgh. After that you can go and fix every typo in the doc, one patch at a
time.

> PS: I had only 2 warnings before that. Potentially not fixable (va_start
> > with char arguments in EAPI functions). But at least I could easily spot
> > anything new.
>
> I am hoping to get it to a manageable level today and may switch to
> more important work after that. Hopefully some more people can look at
> it and fix the part that they feel confortable with.
>

I may have not expressed myself clearly then. My point really was exactly
what bu5m4n said. If you want to add this kind of compiler warning, fix the
warnings first, maybe even talk about it on the ML so it becomes a team
effort. But don't pollute everyone with 500+ warnings that then hide new
real issues on stuff we are working on.

Should we add -Wfloat-conversion next? #WarningOfTheYear

-- 
Jean-Philippe André
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 17/37: elementary: fix float comparison warning in button.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=df0894f2bf6121ac559a8bcba64f7b379339da07

commit df0894f2bf6121ac559a8bcba64f7b379339da07
Author: Cedric BAIL 
Date:   Tue Dec 20 15:39:35 2016 -0800

elementary: fix float comparison warning in button.
---
 src/lib/elementary/elm_button.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/elm_button.c b/src/lib/elementary/elm_button.c
index 17ef209..7faf267 100644
--- a/src/lib/elementary/elm_button.c
+++ b/src/lib/elementary/elm_button.c
@@ -382,7 +382,7 @@ _elm_button_autorepeat_initial_timeout_set(Eo *obj, 
Elm_Button_Data *sd, double
 return;
  }
 
-   if (sd->ar_initial_timeout == t) return;
+   if (EINA_DBL_CMP(sd->ar_initial_timeout, t)) return;
ELM_SAFE_FREE(sd->timer, ecore_timer_del);
sd->ar_initial_timeout = t;
 }
@@ -405,7 +405,7 @@ _elm_button_autorepeat_gap_timeout_set(Eo *obj, 
Elm_Button_Data *sd, double t)
 return;
  }
 
-   if (sd->ar_gap_timeout == t) return;
+   if (EINA_DBL_CMP(sd->ar_gap_timeout, t)) return;
 
sd->ar_gap_timeout = t;
if ((sd->repeating) && (sd->timer)) ecore_timer_interval_set(sd->timer, t);

-- 




[EGIT] [core/enlightenment] master 01/01: tasks - fix fresh segv added in stack support

2016-12-20 Thread Carsten Haitzler
raster pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=dbd5855ac79aa89f2ff2b2b29cbcbcffa04091d5

commit dbd5855ac79aa89f2ff2b2b29cbcbcffa04091d5
Author: Carsten Haitzler (Rasterman) 
Date:   Wed Dec 21 09:48:47 2016 +0900

tasks - fix fresh segv added in stack support

this fixes T5031 and fixes D4504
---
 src/modules/tasks/e_mod_main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/modules/tasks/e_mod_main.c b/src/modules/tasks/e_mod_main.c
index 367536b..7f3b64a 100644
--- a/src/modules/tasks/e_mod_main.c
+++ b/src/modules/tasks/e_mod_main.c
@@ -690,6 +690,8 @@ _tasks_item_fill(Tasks_Item *item)
const char *label;
E_Client *ec;
 
+   ec = item->client;
+
if (item->tasks->config->text_only)
  item->o_icon = NULL;
else
@@ -700,7 +702,7 @@ _tasks_item_fill(Tasks_Item *item)
 evas_object_show(item->o_icon);
  }
 
-   ec = e_client_stack_active_adjust(item->client);
+   ec = e_client_stack_active_adjust(ec);
 
if (item->tasks->config->icon_only) label = "";
else label = e_client_util_name_get(ec);

-- 




[EGIT] [core/efl] master 22/37: elementary: fix float comparison warning in player.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4fd1aa8958e0f3cf1eb451db8fbfd28b9762436a

commit 4fd1aa8958e0f3cf1eb451db8fbfd28b9762436a
Author: Cedric BAIL 
Date:   Tue Dec 20 15:44:51 2016 -0800

elementary: fix float comparison warning in player.
---
 src/lib/elementary/elc_player.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/elementary/elc_player.c b/src/lib/elementary/elc_player.c
index f59be6f..4877485 100644
--- a/src/lib/elementary/elc_player.c
+++ b/src/lib/elementary/elc_player.c
@@ -253,7 +253,7 @@ _update_slider(void *data, const Efl_Event *event 
EINA_UNUSED)
elm_object_disabled_set(sd->slider,
(!seekable) | elm_widget_disabled_get(data));
elm_slider_min_max_set(sd->slider, 0, length);
-   if ((elm_slider_value_get(sd->slider) != pos) &&
+   if ((!EINA_DBL_CMP(elm_slider_value_get(sd->slider), pos)) &&
(!sd->dragging))
  elm_slider_value_set(sd->slider, pos);
 }
@@ -273,7 +273,7 @@ _update_position(void *data, const Efl_Event *event 
EINA_UNUSED)
ELM_PLAYER_DATA_GET(data, sd);
 
pos = elm_slider_value_get(sd->slider);
-   if (pos != elm_video_play_position_get(sd->video))
+   if (!EINA_FLT_CMP(pos, elm_video_play_position_get(sd->video)))
  elm_video_play_position_set(sd->video, pos);
 }
 
@@ -298,7 +298,7 @@ _update_volume(void *data, const Efl_Event *event 
EINA_UNUSED)
ELM_PLAYER_DATA_GET(data, sd);
 
vol = elm_slider_value_get(sd->vslider) / 100.0;
-   if (vol != elm_video_audio_level_get(sd->video))
+   if (!EINA_DBL_CMP(vol, elm_video_audio_level_get(sd->video)))
  elm_video_audio_level_set(sd->video, vol);
 }
 

-- 




[EGIT] [core/efl] master 20/37: elementary: fix float comparison warning in multi button entry.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=bec8a19080cede1e02214bba9a97fb46046e50b8

commit bec8a19080cede1e02214bba9a97fb46046e50b8
Author: Cedric BAIL 
Date:   Tue Dec 20 15:42:00 2016 -0800

elementary: fix float comparison warning in multi button entry.
---
 src/lib/elementary/elc_multibuttonentry.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/elementary/elc_multibuttonentry.c 
b/src/lib/elementary/elc_multibuttonentry.c
index bdd5f6b..a78f176 100644
--- a/src/lib/elementary/elc_multibuttonentry.c
+++ b/src/lib/elementary/elc_multibuttonentry.c
@@ -1383,12 +1383,12 @@ _box_layout_cb(Evas_Object *o,
 efl_gfx_size_hint_combined_min_get(obj, , );
 
 fw = fh = EINA_FALSE;
-if (ax == -1.0) {fw = 1; ax = 0.5; }
-if (ay == -1.0) {fh = 1; ay = 0.5; }
+if (EINA_DBL_CMP(ax, -1)) {fw = 1; ax = 0.5; }
+if (EINA_DBL_CMP(ay, -1)) {fh = 1; ay = 0.5; }
 if (rtl) ax = 1.0 - ax;
 
 ww = mnw;
-if (wx)
+if (!EINA_DBL_CMP(wx, 0))
   {
  if (ww <= w - linew) ww = w - linew;
  else ww = w;

-- 




[EGIT] [core/efl] master 03/37: triangulator: fix float comparison warning.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=0d1c0773a084ae3a13ecac176e96c5f8b00b7ede

commit 0d1c0773a084ae3a13ecac176e96c5f8b00b7ede
Author: Cedric BAIL 
Date:   Tue Dec 20 10:21:02 2016 -0800

triangulator: fix float comparison warning.
---
 .../triangulator/triangulator_stroker.c| 27 --
 1 file changed, 15 insertions(+), 12 deletions(-)

diff --git a/src/static_libs/triangulator/triangulator_stroker.c 
b/src/static_libs/triangulator/triangulator_stroker.c
index 18f7ead..436229b 100644
--- a/src/static_libs/triangulator/triangulator_stroker.c
+++ b/src/static_libs/triangulator/triangulator_stroker.c
@@ -1,4 +1,3 @@
-
 #include "triangulator_stroker.h"
 #include 
 
@@ -31,9 +30,9 @@ normal_vector(float x1, float y1, float x2, float y2, float 
width,
float dx = x2 - x1;
float dy = y2 - y1;
 
-   if (dx == 0)
+   if (EINA_FLT_CMP(dx, 0))
  pw = width / fabsf(dy);
-   else if (dy == 0)
+   else if (EINA_FLT_CMP(dy, 0))
  pw = width / fabsf(dx);
else
  pw = width / sqrtf(dx*dx + dy*dy);
@@ -397,7 +396,7 @@ static inline void
 _skip_duplicate_points(const double **pts, const double *end_pts)
 {
while ((*pts + 2) < end_pts && (*pts)[0] == (*pts)[2] &&
-  (*pts)[1] == (*pts)[3])
+  EINA_FLT_CMP((*pts)[1], (*pts)[3]))
  {
 *pts += 2;
  }
@@ -425,7 +424,7 @@ _path_info_get(const Efl_Gfx_Path_Command *cmds, const 
double *pts, Eina_Bool *i
   *implicit_close = EINA_TRUE;
   // fall through
case EFL_GFX_PATH_COMMAND_TYPE_MOVE_TO:
-  if ((pts[0] == pts[i]) && (pts[1] == pts[i+1]))
+  if (EINA_FLT_CMP(pts[0], pts[i]) && EINA_FLT_CMP(pts[1], 
pts[i+1]))
 *ends_at_start = EINA_TRUE;
   return;
default:
@@ -433,8 +432,8 @@ _path_info_get(const Efl_Gfx_Path_Command *cmds, const 
double *pts, Eina_Bool *i
   }
  }
// this path is the last path with out implicit close.
-   *ends_at_start = pts[0] == pts[i] &&
-pts[1] == pts[i+1];
+   *ends_at_start = EINA_FLT_CMP(pts[0], pts[i]) &&
+EINA_FLT_CMP(pts[1], pts[i+1]);
 }
 
 void
@@ -493,7 +492,7 @@ triangulator_stroker_process(Triangulator_Stroker *stroker,
  break;
   }
case EFL_GFX_PATH_COMMAND_TYPE_LINE_TO:
-  if (stroker->cx != (float)pts[0] || stroker->cy != (float)pts[1])
+  if (!EINA_FLT_CMP(stroker->cx, pts[0]) || 
!EINA_FLT_CMP(stroker->cy, (float)pts[1]))
 {
if (previous_type != EFL_GFX_PATH_COMMAND_TYPE_MOVE_TO)
  add_join(stroker, pts[0], pts[1]);
@@ -503,11 +502,15 @@ triangulator_stroker_process(Triangulator_Stroker 
*stroker,
   pts+=2;
   break;
case EFL_GFX_PATH_COMMAND_TYPE_CUBIC_TO:
-  if (stroker->cx != (float)pts[0] || stroker->cy != (float)pts[1] 
||
-  (float)pts[0] != (float)pts[2] || (float)pts[1] != 
(float)pts[3] ||
-  (float)pts[2] != (float)pts[4] || (float)pts[3] != 
(float)pts[5])
+  if (!EINA_FLT_CMP(stroker->cx, pts[0]) ||
+  !EINA_FLT_CMP(stroker->cy, pts[1]) ||
+  !EINA_FLT_CMP(pts[0], pts[2]) ||
+  !EINA_FLT_CMP(pts[1], pts[3]) ||
+  !EINA_FLT_CMP(pts[2], pts[4]) ||
+  !EINA_FLT_CMP(pts[3], pts[5]))
 {
-   if (stroker->cx != (float)pts[0] || stroker->cy != 
(float)pts[1])
+   if (!EINA_FLT_CMP(stroker->cx, pts[0]) ||
+   !EINA_FLT_CMP(stroker->cy, pts[1]))
  {
 if (previous_type != EFL_GFX_PATH_COMMAND_TYPE_MOVE_TO)
   add_join(stroker, pts[0], pts[1]);

-- 




[EGIT] [core/efl] master 12/37: elementary: fix float warning in progressbar.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=0f6383b73e7b1cc9e61838f26e68a958936f4317

commit 0f6383b73e7b1cc9e61838f26e68a958936f4317
Author: Cedric BAIL 
Date:   Tue Dec 20 15:14:14 2016 -0800

elementary: fix float warning in progressbar.
---
 src/lib/elementary/elm_progressbar.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elementary/elm_progressbar.c 
b/src/lib/elementary/elm_progressbar.c
index 9f92ca7..34e7ec1 100644
--- a/src/lib/elementary/elm_progressbar.c
+++ b/src/lib/elementary/elm_progressbar.c
@@ -425,7 +425,7 @@ _elm_progressbar_efl_ui_progress_span_size_get(Eo *obj 
EINA_UNUSED, Elm_Progress
 EOLIAN static void
 _elm_progressbar_efl_ui_progress_progress_value_set(Eo *obj, 
Elm_Progressbar_Data *sd, double val)
 {
-   if (sd->val == val) return;
+   if (EINA_DBL_CMP(sd->val, val)) return;
 
elm_progressbar_part_value_set(obj, "elm.cur.progressbar", val);
 }

-- 




[EGIT] [core/efl] master 26/37: edje: fix float comparison warning in edje_external_inspector.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4cbca7c3571b9f4260e139b121e9a54287dd51fa

commit 4cbca7c3571b9f4260e139b121e9a54287dd51fa
Author: Cedric BAIL 
Date:   Tue Dec 20 15:47:31 2016 -0800

edje: fix float comparison warning in edje_external_inspector.
---
 src/bin/edje/edje_external_inspector.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/bin/edje/edje_external_inspector.c 
b/src/bin/edje/edje_external_inspector.c
index 01e3d22..c770bbe 100644
--- a/src/bin/edje/edje_external_inspector.c
+++ b/src/bin/edje/edje_external_inspector.c
@@ -114,7 +114,7 @@ _param_value_str_get(const Edje_External_Type *type, const 
Edje_External_Param_I
  return buf;
 
   case EDJE_EXTERNAL_PARAM_TYPE_DOUBLE:
- if (param->info.d.def == EDJE_EXTERNAL_DOUBLE_UNSET) return NULL;
+ if (EINA_DBL_CMP(param->info.d.def, EDJE_EXTERNAL_DOUBLE_UNSET)) 
return NULL;
  snprintf(buf, buflen, "%g", param->info.d.def);
  return buf;
 
@@ -219,17 +219,17 @@ _param_extra_details(const Edje_External_Type *type, 
const Edje_External_Param_I
  break;
 
   case EDJE_EXTERNAL_PARAM_TYPE_DOUBLE:
- if (param->info.d.min != EDJE_EXTERNAL_DOUBLE_UNSET)
+ if (EINA_DBL_CMP(param->info.d.min, EDJE_EXTERNAL_DOUBLE_UNSET))
{
   if (machine) printf("MIN: %g\n", param->info.d.min);
   else printf(", min: %g", param->info.d.min);
}
- if (param->info.d.max != EDJE_EXTERNAL_DOUBLE_UNSET)
+ if (EINA_DBL_CMP(param->info.d.max, EDJE_EXTERNAL_DOUBLE_UNSET))
{
   if (machine) printf("MAX: %g\n", param->info.d.max);
   else printf(", max: %g", param->info.d.max);
}
- if (param->info.d.step != EDJE_EXTERNAL_DOUBLE_UNSET)
+ if (EINA_DBL_CMP(param->info.d.step, EDJE_EXTERNAL_DOUBLE_UNSET))
{
   if (machine) printf("STEP: %g\n", param->info.d.step);
   else printf(", step: %g", param->info.d.step);

-- 




[EGIT] [core/efl] master 02/37: evas: fix proper operator ordering with parentheses.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ada014ec09176d9eb7c64eed9c3c68c135dd1e71

commit ada014ec09176d9eb7c64eed9c3c68c135dd1e71
Author: Cedric BAIL 
Date:   Tue Dec 20 10:04:54 2016 -0800

evas: fix proper operator ordering with parentheses.
---
 src/lib/evas/canvas/evas_object_image.c | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_image.c 
b/src/lib/evas/canvas/evas_object_image.c
index 186d7e5..c4b7668 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -2753,10 +2753,10 @@ evas_object_image_is_opaque(Evas_Object *eo_obj 
EINA_UNUSED,
   (EINA_DBL_CMP(m->points[1].x, m->points[2].x)) &&
   (EINA_DBL_CMP(m->points[0].y, m->points[1].y)) &&
   (EINA_DBL_CMP(m->points[2].y, m->points[3].y))) ||
- (EINA_DBL_CMP(m->points[0].x, m->points[1].x)) &&
- (EINA_DBL_CMP(m->points[2].x, m->points[3].x)) &&
- (EINA_DBL_CMP(m->points[0].y, m->points[3].y)) &&
- (EINA_DBL_CMP(m->points[1].y, m->points[2].y)))
+ ((EINA_DBL_CMP(m->points[0].x, m->points[1].x)) &&
+  (EINA_DBL_CMP(m->points[2].x, m->points[3].x)) &&
+  (EINA_DBL_CMP(m->points[0].y, m->points[3].y)) &&
+  (EINA_DBL_CMP(m->points[1].y, m->points[2].y
{
   if ((EINA_DBL_CMP(m->points[0].x, obj->cur->geometry.x)) &&
   (EINA_DBL_CMP(m->points[0].y, obj->cur->geometry.y)) &&
@@ -2849,10 +2849,10 @@ evas_object_image_was_opaque(Evas_Object *eo_obj 
EINA_UNUSED,
   (EINA_DBL_CMP(m->points[1].x, m->points[2].x)) &&
   (EINA_DBL_CMP(m->points[0].y, m->points[1].y)) &&
   (EINA_DBL_CMP(m->points[2].y, m->points[3].y))) ||
- (EINA_DBL_CMP(m->points[0].x, m->points[1].x)) &&
- (EINA_DBL_CMP(m->points[2].x, m->points[3].x)) &&
- (EINA_DBL_CMP(m->points[0].y, m->points[3].y)) &&
- (EINA_DBL_CMP(m->points[1].y, m->points[2].y)))
+ ((EINA_DBL_CMP(m->points[0].x, m->points[1].x)) &&
+  (EINA_DBL_CMP(m->points[2].x, m->points[3].x)) &&
+  (EINA_DBL_CMP(m->points[0].y, m->points[3].y)) &&
+  (EINA_DBL_CMP(m->points[1].y, m->points[2].y
{
   if ((EINA_DBL_CMP(m->points[0].x, obj->prev->geometry.x)) &&
   (EINA_DBL_CMP(m->points[0].y, obj->prev->geometry.y)) &&

-- 




[EGIT] [core/efl] master 21/37: elementary: fix float comparison warning in popup.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=71df83120c59008c6bf38fc0450d4d70abf255a8

commit 71df83120c59008c6bf38fc0450d4d70abf255a8
Author: Cedric BAIL 
Date:   Tue Dec 20 15:44:32 2016 -0800

elementary: fix float comparison warning in popup.
---
 src/lib/elementary/elc_popup.c | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/lib/elementary/elc_popup.c b/src/lib/elementary/elc_popup.c
index 9bda0ca..189dbc5 100644
--- a/src/lib/elementary/elc_popup.c
+++ b/src/lib/elementary/elc_popup.c
@@ -467,9 +467,9 @@ _elm_popup_elm_layout_sizing_eval(Eo *obj, Elm_Popup_Data 
*sd)
 elm_popup_align_get(obj, , );
 evas_object_geometry_get(sd->parent, NULL, NULL, , );
 
-if (horizontal == ELM_NOTIFY_ALIGN_FILL)
+if (EINA_DBL_CMP(horizontal, ELM_NOTIFY_ALIGN_FILL))
   minw = w;
-if (vertical == ELM_NOTIFY_ALIGN_FILL)
+if (EINA_DBL_CMP(vertical, ELM_NOTIFY_ALIGN_FILL))
   minh = h;
 
edje_object_size_min_restricted_calc(elm_layout_edje_get(sd->content_area),
  , , minw, minh);
@@ -1644,23 +1644,23 @@ _elm_notify_orient_get(const Evas_Object *obj)
 
elm_notify_align_get(obj, , );
 
-   if ((horizontal == 0.5) && (vertical == 0.0))
+   if ((EINA_DBL_CMP(horizontal, 0.5)) && (EINA_DBL_CMP(vertical, 0.0)))
  orient = ELM_NOTIFY_ORIENT_TOP;
-   else if ((horizontal == 0.5) && (vertical == 0.5))
+   else if ((EINA_DBL_CMP(horizontal, 0.5)) && (EINA_DBL_CMP(vertical, 0.5)))
  orient = ELM_NOTIFY_ORIENT_CENTER;
-   else if ((horizontal == 0.5) && (vertical == 1.0))
+   else if ((EINA_DBL_CMP(horizontal, 0.5)) && (EINA_DBL_CMP(vertical, 1.0)))
  orient = ELM_NOTIFY_ORIENT_BOTTOM;
-   else if ((horizontal == 0.0) && (vertical == 0.5))
+   else if ((EINA_DBL_CMP(horizontal, 0.0)) && (EINA_DBL_CMP(vertical, 0.5)))
  orient = ELM_NOTIFY_ORIENT_LEFT;
-   else if ((horizontal == 1.0) && (vertical == 0.5))
+   else if ((EINA_DBL_CMP(horizontal, 1.0)) && (EINA_DBL_CMP(vertical, 0.5)))
  orient = ELM_NOTIFY_ORIENT_RIGHT;
-   else if ((horizontal == 0.0) && (vertical == 0.0))
+   else if ((EINA_DBL_CMP(horizontal, 0.0)) && (EINA_DBL_CMP(vertical, 0.0)))
  orient = ELM_NOTIFY_ORIENT_TOP_LEFT;
-   else if ((horizontal == 1.0) && (vertical == 0.0))
+   else if ((EINA_DBL_CMP(horizontal, 1.0)) && (EINA_DBL_CMP(vertical, 0.0)))
  orient = ELM_NOTIFY_ORIENT_TOP_RIGHT;
-   else if ((horizontal == 0.0) && (vertical == 1.0))
+   else if ((EINA_DBL_CMP(horizontal, 0.0)) && (EINA_DBL_CMP(vertical, 1.0)))
  orient = ELM_NOTIFY_ORIENT_BOTTOM_LEFT;
-   else if ((horizontal == 1.0) && (vertical == 1.0))
+   else if ((EINA_DBL_CMP(horizontal, 1.0)) && (EINA_DBL_CMP(vertical, 1.0)))
  orient = ELM_NOTIFY_ORIENT_BOTTOM_RIGHT;
else
  orient = ELM_NOTIFY_ORIENT_TOP;

-- 




[EGIT] [core/efl] master 35/37: eina: add api for assessing the relative position of two rectangles

2016-12-20 Thread Marcel Hollerbach
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4e9656feacee2e00785d21d68bed5d3400c198be

commit 4e9656feacee2e00785d21d68bed5d3400c198be
Author: Marcel Hollerbach 
Date:   Tue Dec 20 16:04:29 2016 -0800

eina: add api for assessing the relative position of two rectangles

Summary:
the api returns if a rectangle is positioned above/below/right or left
of a other rectangle.

Code which does simular things are part of verne and e, i think its a good 
idea to provide api for that.

Test Plan: Just run the test suite

Reviewers: raster, jpeg, cedric

Reviewed By: cedric

Differential Revision: https://phab.enlightenment.org/D4489

Signed-off-by: Cedric BAIL 
---
 src/lib/eina/eina_rectangle.c| 17 +
 src/lib/eina/eina_rectangle.h| 24 
 src/tests/eina/eina_test_rectangle.c | 18 ++
 3 files changed, 59 insertions(+)

diff --git a/src/lib/eina/eina_rectangle.c b/src/lib/eina/eina_rectangle.c
index 4a235da..a3e8bff 100644
--- a/src/lib/eina/eina_rectangle.c
+++ b/src/lib/eina/eina_rectangle.c
@@ -894,3 +894,20 @@ eina_rectangle_pool_geometry_get(Eina_Rectangle_Pool 
*pool, int *w, int *h)
 
return EINA_TRUE;
 }
+
+EAPI Eina_Rectangle_Outside
+eina_rectangle_outside_position(Eina_Rectangle *rect1, Eina_Rectangle *rect2)
+{
+   Eina_Rectangle_Outside ret = 0;
+
+   if (rect1->y > rect2->y)
+ ret |= EINA_RECTANGLE_OUTSIDE_TOP;
+   if (rect1->x > rect2->x)
+ ret |= EINA_RECTANGLE_OUTSIDE_LEFT;
+   if (rect1->y + rect1->h < rect2->y + rect2->h)
+ ret |= EINA_RECTANGLE_OUTSIDE_BOTTOM;
+   if (rect1->x + rect1->w < rect2->x + rect2->w)
+ ret |= EINA_RECTANGLE_OUTSIDE_RIGHT;
+
+   return ret;
+}
diff --git a/src/lib/eina/eina_rectangle.h b/src/lib/eina/eina_rectangle.h
index 2b600c6..fce0470 100644
--- a/src/lib/eina/eina_rectangle.h
+++ b/src/lib/eina/eina_rectangle.h
@@ -75,6 +75,19 @@ typedef enum {
 } Eina_Rectangle_Packing;
 
 /**
+ * @typedef Eina_Rectangle_Outside
+ * Enumeration gives the positions where a rectangle can be outside a other 
rectangle
+ * @since 1.19
+ */
+typedef enum {
+EINA_RECTANGLE_OUTSIDE_TOP = 1,
+EINA_RECTANGLE_OUTSIDE_LEFT = 2,
+EINA_RECTANGLE_OUTSIDE_BOTTOM = 4,
+EINA_RECTANGLE_OUTSIDE_RIGHT = 8
+} Eina_Rectangle_Outside;
+
+
+/**
  * @brief Check if the given spans intersect.
  *
  * @param c1 The column of the first span.
@@ -507,6 +520,17 @@ EAPI voideina_rectangle_free(Eina_Rectangle 
*rect) EINA_ARG_NONNULL(
  */
 EAPI voideina_rectangle_pool_packing_set(Eina_Rectangle_Pool 
*pool,Eina_Rectangle_Packing type) EINA_ARG_NONNULL(1);
 
+/**
+ * @brief calculate where rect2 is outside of rect1
+ *
+ * @param rect1 the rect to use as anchor
+ * @param rect2 the rect to look for outside positions
+ *
+ * @return A or'ed map of Eina_Rectangle_Outside values
+ * @since 1.19
+ */
+EAPI Eina_Rectangle_Outside eina_rectangle_outside_position(Eina_Rectangle 
*rect1, Eina_Rectangle *rect2);
+
 #include "eina_inline_rectangle.x"
 
 /**
diff --git a/src/tests/eina/eina_test_rectangle.c 
b/src/tests/eina/eina_test_rectangle.c
index fe21bf7..a6891f3 100644
--- a/src/tests/eina/eina_test_rectangle.c
+++ b/src/tests/eina/eina_test_rectangle.c
@@ -196,10 +196,28 @@ START_TEST(eina_rectangle_union_intersect)
 }
 END_TEST
 
+START_TEST(eina_rectangle_position_test)
+{
+Eina_Rectangle middle, top, down, right, left;
+EINA_RECTANGLE_SET(, -1, -1, 2.0, 2.0);
+EINA_RECTANGLE_SET(,-1, -2, 2.0, 2.0);
+EINA_RECTANGLE_SET(,   0, -1, 2.0, 2.0);
+EINA_RECTANGLE_SET(,   -2, -1, 2.0, 2.0);
+EINA_RECTANGLE_SET(,   -1,  0, 2.0, 2.0);
+
+ck_assert_int_eq(eina_rectangle_outside_position(, ), 
EINA_RECTANGLE_OUTSIDE_TOP) ;
+ck_assert_int_eq(eina_rectangle_outside_position(, ), 
EINA_RECTANGLE_OUTSIDE_BOTTOM) ;
+ck_assert_int_eq(eina_rectangle_outside_position(, ), 
EINA_RECTANGLE_OUTSIDE_RIGHT) ;
+ck_assert_int_eq(eina_rectangle_outside_position(, ), 
EINA_RECTANGLE_OUTSIDE_LEFT) ;
+
+}
+END_TEST
+
 void
 eina_test_rectangle(TCase *tc)
 {
tcase_add_test(tc, eina_rectangle_pool);
tcase_add_test(tc, eina_rectangle_pool_skyline);
tcase_add_test(tc, eina_rectangle_union_intersect);
+   tcase_add_test(tc, eina_rectangle_position_test);
 }

-- 




[EGIT] [core/efl] master 31/37: edje: fix float comparison warning in edje edit logic.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=14d7ec478cf5b7fbb61346a7da15faf90910b59d

commit 14d7ec478cf5b7fbb61346a7da15faf90910b59d
Author: Cedric BAIL 
Date:   Tue Dec 20 16:00:26 2016 -0800

edje: fix float comparison warning in edje edit logic.
---
 src/lib/edje/edje_edit.c | 140 +++
 1 file changed, 70 insertions(+), 70 deletions(-)

diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index 6c57a75..de88db3 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -6192,7 +6192,7 @@ edje_edit_state_name_set(Evas_Object *obj, const char 
*part, const char *state,
 
  if (t->id == part_id &&
  !strcmp(epr->state, pd->state.name) &&
- pd->state.value == epr->value)
+ EQ(pd->state.value, epr->value))
{
   _edje_if_string_replace(ed, >state, new_name);
   epr->value = value;
@@ -6480,7 +6480,7 @@ edje_edit_state_add(Evas_Object *obj, const char *part, 
const char *name, double
break;
 
  case EDJE_EXTERNAL_PARAM_TYPE_DOUBLE:
-   if (pi->info.d.def != EDJE_EXTERNAL_DOUBLE_UNSET)
+   if (NEQ(pi->info.d.def, EDJE_EXTERNAL_DOUBLE_UNSET))
  p->d = pi->info.d.def;
break;
 
@@ -7577,7 +7577,7 @@ edje_edit_state_external_param_set(Evas_Object *obj, 
const char *part, const cha
   const char *sname;
   double svalue;
   sname = edje_edit_part_selected_state_get(obj, part, );
-  if (!strcmp(state, sname) && svalue == value)
+  if (!strcmp(state, sname) && EQ(svalue, value))
 if (!edje_object_part_external_param_set(obj, part, p))
   if ((type == EDJE_EXTERNAL_PARAM_TYPE_CHOICE) ||
   (type == EDJE_EXTERNAL_PARAM_TYPE_STRING))
@@ -12412,7 +12412,7 @@ _edje_generate_image_set_source(Evas_Object *obj, const 
char *entry)
 
 double scale_by = 0;
 scale_by = edje_edit_image_set_image_border_scale_get(obj, entry, 
place);
-if (scale_by != 0)
+if (NEQ(scale_by, 0))
   BUF_APPENDF(I3 "border_scale_by: %.3f;\n", scale_by);
 
 BUF_APPEND(I2 "}\n");
@@ -13249,7 +13249,7 @@ _edje_generate_source_of_program(Evas_Object *obj, 
const char *program, Eina_Str
switch (tweenmode)
  {
   case EDJE_TWEEN_MODE_LINEAR:
-if (db)
+if (NEQ(db, ZERO))
   BUF_APPENDF(I4 "transition: LINEAR %.5f", db);
 else
   no_transition = EINA_TRUE;
@@ -13323,7 +13323,7 @@ _edje_generate_source_of_program(Evas_Object *obj, 
const char *program, Eina_Str
/* In */
db = epr->in.from;
db2 = epr->in.range;
-   if (db || db2)
+   if (NEQ(db, ZERO) || NEQ(db2, ZERO))
  BUF_APPENDF(I4 "in: %.5f %.5f;\n", db, db2);
 
/* Targets */
@@ -13399,7 +13399,7 @@ _edje_source_with_double_values_append(const char 
*param_name, char val_num, dou
 
 #define INHERIT_CHECK(ATTRIBUTE) (pd->ATTRIBUTE != inherit_pd->ATTRIBUTE)
 
-#define INHERIT_CHECK_DOUBLE(ATTRIBUTE_1, ATTRIBUTE_2) ((pd->ATTRIBUTE_1 != 
inherit_pd->ATTRIBUTE_1) || (pd->ATTRIBUTE_2 != inherit_pd->ATTRIBUTE_2))
+#define INHERIT_CHECK_DOUBLE(ATTRIBUTE_1, ATTRIBUTE_2) ((NEQ(pd->ATTRIBUTE_1, 
inherit_pd->ATTRIBUTE_1)) || (NEQ(pd->ATTRIBUTE_2, inherit_pd->ATTRIBUTE_2)))
 
 #define INHERIT_CHECK_STRING(ATTRIBUTE_STR) (strcmp(inherit_pd->ATTRIBUTE_STR, 
pd->ATTRIBUTE_STR))
 
@@ -13453,7 +13453,7 @@ _edje_generate_source_state_relative(Edje *ed,
  }
else
  {
-relative = ((pd->rel1.relative_x == 0) && (pd->rel1.relative_y == 0)) 
? EINA_FALSE : EINA_TRUE;
+relative = (EQ(pd->rel1.relative_x, ZERO) && EQ(pd->rel1.relative_y, 
ZERO)) ? EINA_FALSE : EINA_TRUE;
 offset = ((pd->rel1.offset_x == 0) && (pd->rel1.offset_y == 0)) ? 
EINA_FALSE : EINA_TRUE;
 if ((pd->rel1.id_x != -1) || (pd->rel1.id_y != -1))
   {
@@ -13574,7 +13574,7 @@ _edje_generate_source_state_relative(Edje *ed,
  }
else
  {
-relative = ((pd->rel2.relative_x == 1) && (pd->rel2.relative_y == 1)) 
? EINA_FALSE : EINA_TRUE;
+relative = (EQ(pd->rel2.relative_x, FROM_INT(1)) && 
EQ(pd->rel2.relative_y, FROM_INT(1))) ? EINA_FALSE : EINA_TRUE;
 offset = ((pd->rel2.offset_x == -1) && (pd->rel2.offset_y == -1)) ? 
EINA_FALSE : EINA_TRUE;
 if ((pd->rel2.id_x != -1) || (pd->rel2.id_y != -1))
   {
@@ -13692,9 +13692,9 @@ _edje_generate_source_state_image(Edje_Edit *eed, 
Evas_Object *obj,
   (img->image.border.t == inherit_pd_img->image.border.t) &&
   (img->image.border.b == inherit_pd_img->image.border.b)) ? 
EINA_FALSE : EINA_TRUE;
 
-border_scale_by = (img->image.border.scale_by == 
inherit_pd_img->image.border.scale_by) ? EINA_FALSE : EINA_TRUE;
+border_scale_by = 

[EGIT] [core/efl] master 16/37: elementary: fix float comparison warning for panes.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8952d505c29b8878985f3fd7b31742556ebcfdbf

commit 8952d505c29b8878985f3fd7b31742556ebcfdbf
Author: Cedric BAIL 
Date:   Tue Dec 20 15:39:08 2016 -0800

elementary: fix float comparison warning for panes.
---
 src/lib/elementary/elm_panes.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/elementary/elm_panes.c b/src/lib/elementary/elm_panes.c
index 3b70dc6..509ca30 100644
--- a/src/lib/elementary/elm_panes.c
+++ b/src/lib/elementary/elm_panes.c
@@ -100,8 +100,8 @@ _elm_panes_elm_widget_focus_next(Eo *obj, Elm_Panes_Data 
*sd, Elm_Focus_Directio
left = elm_layout_content_get(obj, "left");
right = elm_layout_content_get(obj, "right");
 
-   if (((sd->orientation == EFL_ORIENT_HORIZONTAL) && (h == 0.0)) ||
-   ((sd->orientation == EFL_ORIENT_VERTICAL) && (w == 0.0)))
+   if (((sd->orientation == EFL_ORIENT_HORIZONTAL) && (EINA_DBL_CMP(h, 0.0))) 
||
+   ((sd->orientation == EFL_ORIENT_VERTICAL) && (EINA_DBL_CMP(w, 0.0
  {
return elm_widget_focus_next_get(right, dir, next, next_item);
  }

-- 




[EGIT] [core/efl] master 19/37: elementary: fix float comparison warning in action slider.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a65cb62853c344bcdc34af589a4199488f9025e8

commit a65cb62853c344bcdc34af589a4199488f9025e8
Author: Cedric BAIL 
Date:   Tue Dec 20 15:41:41 2016 -0800

elementary: fix float comparison warning in action slider.
---
 src/lib/elementary/elm_actionslider.c | 40 +--
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/src/lib/elementary/elm_actionslider.c 
b/src/lib/elementary/elm_actionslider.c
index 0694daa..a254258 100644
--- a/src/lib/elementary/elm_actionslider.c
+++ b/src/lib/elementary/elm_actionslider.c
@@ -156,10 +156,10 @@ _drag_button_move_cb(void *data,
 
edje_object_part_drag_value_get
  (wd->resize_obj, "elm.drag_button_base", , NULL);
-   if (pos == 0.0)
+   if (EINA_DBL_CMP(pos, 0.0))
  efl_event_callback_legacy_call
(obj, ELM_ACTIONSLIDER_EVENT_POS_CHANGED, !elm_widget_mirrored_get(obj) 
? "left" : "right");
-   else if (pos == 1.0)
+   else if (EINA_DBL_CMP(pos, 1.0))
  efl_event_callback_legacy_call
(obj, ELM_ACTIONSLIDER_EVENT_POS_CHANGED, !elm_widget_mirrored_get(obj) 
? "right" : "left");
else if (pos >= 0.45 && pos <= 0.55)
@@ -199,8 +199,8 @@ _button_animator(void *data)
   adjusted_final = (!elm_widget_mirrored_get(obj)) ?
 sd->final_position : 1.0 - sd->final_position;
 
-  if ((adjusted_final == 0.0) ||
-  (adjusted_final == 0.5 && cur_position >= adjusted_final))
+  if ((EINA_DBL_CMP(adjusted_final, 0.0)) ||
+  (EINA_DBL_CMP(adjusted_final, 0.5) && cur_position >= 
adjusted_final))
 {
new_position = cur_position - move_amount;
 
@@ -210,8 +210,8 @@ _button_animator(void *data)
 flag_finish_animation = EINA_TRUE;
  }
 }
-  else if ((adjusted_final == 1.0) ||
-   (adjusted_final == 0.5 && cur_position < adjusted_final))
+  else if ((EINA_DBL_CMP(adjusted_final, 1.0)) ||
+   (EINA_DBL_CMP(adjusted_final, 0.5) && cur_position < 
adjusted_final))
 {
new_position = cur_position + move_amount;
 
@@ -232,15 +232,15 @@ _button_animator(void *data)
 
 _text_get(obj, , , );
 
-if ((!sd->final_position) &&
+if ((!EINA_DBL_CMP(sd->final_position, 0)) &&
 (sd->enabled_position & ELM_ACTIONSLIDER_LEFT))
   efl_event_callback_legacy_call
 (obj, EFL_UI_EVENT_SELECTED, (char *)left);
-else if ((sd->final_position == 0.5) &&
+else if ((EINA_DBL_CMP(sd->final_position, 0.5)) &&
  (sd->enabled_position & ELM_ACTIONSLIDER_CENTER))
   efl_event_callback_legacy_call
 (obj, EFL_UI_EVENT_SELECTED, (char *)center);
-else if ((sd->final_position == 1) &&
+else if ((EINA_DBL_CMP(sd->final_position, 1)) &&
  (sd->enabled_position & ELM_ACTIONSLIDER_RIGHT))
   efl_event_callback_legacy_call
 (obj, EFL_UI_EVENT_SELECTED, (char *)right);
@@ -276,8 +276,8 @@ _drag_button_up_cb(void *data,
_text_get(obj, , , );
 
if ((sd->enabled_position & ELM_ACTIONSLIDER_LEFT) &&
-   ((!elm_widget_mirrored_get(obj) && position == 0.0) ||
-(elm_widget_mirrored_get(obj) && position == 1.0)))
+   ((!elm_widget_mirrored_get(obj) && EINA_DBL_CMP(position, 0.0)) ||
+(elm_widget_mirrored_get(obj) && EINA_DBL_CMP(position, 1.0
  {
 sd->final_position = 0;
 efl_event_callback_legacy_call
@@ -300,8 +300,8 @@ _drag_button_up_cb(void *data,
  }
 
if ((sd->enabled_position & ELM_ACTIONSLIDER_RIGHT) &&
-   ((!elm_widget_mirrored_get(obj) && position == 1.0) ||
-(elm_widget_mirrored_get(obj) && position == 0.0)))
+   ((!elm_widget_mirrored_get(obj) && EINA_DBL_CMP(position, 1)) ||
+(elm_widget_mirrored_get(obj) && EINA_DBL_CMP(position, 0
  {
 sd->final_position = 1;
 efl_event_callback_legacy_call
@@ -370,7 +370,7 @@ _track_move_cb(void *data,
 
if (!strcmp(emission, "elm,action,down,right"))
  {
-if (sd->final_position == 0.0)
+if (EINA_DBL_CMP(sd->final_position, 0.0))
   {
  if (sd->enabled_position & ELM_ACTIONSLIDER_CENTER)
{
@@ -385,7 +385,7 @@ _track_move_cb(void *data,
   sd->final_position = 1.0;
}
   }
-else if ((sd->final_position == 0.5) &&
+else if (EINA_DBL_CMP(sd->final_position, 0.5) &&
  (sd->enabled_position & ELM_ACTIONSLIDER_RIGHT))
   {
  efl_event_callback_legacy_call
@@ -404,7 +404,7 @@ _track_move_cb(void *data,
  }
else
  {
-if (sd->final_position == 1.0)
+if (EINA_DBL_CMP(sd->final_position, 1.0))
   {
  if (sd->enabled_position & ELM_ACTIONSLIDER_CENTER)
{
@@ -419,7 +419,7 @@ _track_move_cb(void 

[EGIT] [core/efl] master 28/37: edje: fix float comparison warning in Box Layout logic.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=dc022d602d3e7d396137bb6bfb290e70880d89dd

commit dc022d602d3e7d396137bb6bfb290e70880d89dd
Author: Cedric BAIL 
Date:   Tue Dec 20 15:58:48 2016 -0800

edje: fix float comparison warning in Box Layout logic.
---
 src/lib/edje/edje_box_layout.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/edje/edje_box_layout.c b/src/lib/edje/edje_box_layout.c
index 8ba073c..1abfbc9 100644
--- a/src/lib/edje/edje_box_layout.c
+++ b/src/lib/edje/edje_box_layout.c
@@ -166,7 +166,7 @@ _edje_box_recalc_apply(Edje *ed EINA_UNUSED, Edje_Real_Part 
*ep, Edje_Calc_Param
if ((ep->type != EDJE_RP_TYPE_CONTAINER) ||
(!ep->typedata.container)) return;
 
-   if ((ep->param2) && (ep->description_pos != ZERO))
+   if ((ep->param2) && (NEQ(ep->description_pos, ZERO)))
  {
 Edje_Part_Description_Box *param2_desc = (Edje_Part_Description_Box 
*)ep->param2->description;
 if (ep->typedata.container->anim->end.layout == NULL)

-- 




[EGIT] [core/efl] master 27/37: edje: fix float comparison warning in edje_cc.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9730eb1f47341173063148332b9a833ff1377f45

commit 9730eb1f47341173063148332b9a833ff1377f45
Author: Cedric BAIL 
Date:   Tue Dec 20 15:47:57 2016 -0800

edje: fix float comparison warning in edje_cc.
---
 src/bin/edje/edje_cc_handlers.c | 22 ++
 src/bin/edje/edje_cc_parse.c|  4 ++--
 2 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c
index 3861cd9..188e169 100644
--- a/src/bin/edje/edje_cc_handlers.c
+++ b/src/bin/edje/edje_cc_handlers.c
@@ -3676,7 +3676,7 @@ st_collections_base_scale(void)
check_min_arg_count(1);
 
edje_file->base_scale = FROM_DOUBLE(parse_float_range(0, 0.0, 9.0));
-   if (edje_file->base_scale == ZERO)
+   if (EQ(edje_file->base_scale, ZERO))
  {
 ERR("The base_scale is 0.0. The value should be bigger than 0.0.");
 exit(-1);
@@ -8095,7 +8095,7 @@ st_collections_group_parts_part_description_inherit(void)
  exit(-1);
   }
 
-if (!strcmp (parent_name, "default") && parent_val == 0.0)
+if (!strcmp (parent_name, "default") && EINA_DBL_CMP(parent_val, 0.0))
   parent = ep->default_desc;
 else
   {
@@ -8127,8 +8127,8 @@ st_collections_group_parts_part_description_inherit(void)
 }
}
 
-if (min_dst)
-  {
+ if (EINA_DBL_CMP(min_dst, 0.0))
+   {
   WRN("%s:%i: couldn't find an exact match in part '%s' when 
looking for '%s' %lf. Falling back to nearest one '%s' %lf.",
   file_in, line - 1, ep->name, parent_name, parent_val, 
parent ? parent->state.name : NULL, parent ? parent->state.value : 0);
}
@@ -8390,8 +8390,12 @@ 
_part_description_state_update(Edje_Part_Description_Common *ed)
Edje_Part *ep = current_part;
 
if (ed == ep->default_desc) return;
-   if ((ep->default_desc->state.name && !strcmp(ed->state.name, 
ep->default_desc->state.name) && ed->state.value == 
ep->default_desc->state.value) ||
-   (!ep->default_desc->state.name && !strcmp(ed->state.name, "default") && 
ed->state.value == ep->default_desc->state.value))
+   if ((ep->default_desc->state.name &&
+!strcmp(ed->state.name, ep->default_desc->state.name) &&
+EQ(ed->state.value, ep->default_desc->state.value)) ||
+   (!ep->default_desc->state.name &&
+!strcmp(ed->state.name, "default") &&
+EQ(ed->state.value, ep->default_desc->state.value)))
  {
 if (ep->type == EDJE_PART_TYPE_IMAGE)
   _edje_part_description_image_remove((Edje_Part_Description_Image*) 
ed);
@@ -8407,7 +8411,8 @@ 
_part_description_state_update(Edje_Part_Description_Common *ed)
 unsigned int i;
 for (i = 0; i < ep->other.desc_count - 1; ++i)
   {
- if (!strcmp(ed->state.name, ep->other.desc[i]->state.name) && 
ed->state.value == ep->other.desc[i]->state.value)
+ if (!strcmp(ed->state.name, ep->other.desc[i]->state.name) &&
+ EQ(ed->state.value, ep->other.desc[i]->state.value))
{
   if (ep->type == EDJE_PART_TYPE_IMAGE)
 
_edje_part_description_image_remove((Edje_Part_Description_Image*) ed);
@@ -8462,7 +8467,8 @@ st_collections_group_parts_part_description_state(void)
  val = parse_float_range(1, 0.0, 1.0);
 
/* if only default desc exists and current desc is not default, commence 
paddling */
-   if ((!ep->other.desc_count) && (val || (!eina_streq(s, "default"
+   if ((!ep->other.desc_count) &&
+   (!EINA_DBL_CMP(val, 0) || (!eina_streq(s, "default"
  {
 ERR("parse error %s:%i. invalid state name: '%s'. \"default\" state 
must always be first.",
 file_in, line - 1, s);
diff --git a/src/bin/edje/edje_cc_parse.c b/src/bin/edje/edje_cc_parse.c
index e5a7386..93e857e 100644
--- a/src/bin/edje/edje_cc_parse.c
+++ b/src/bin/edje/edje_cc_parse.c
@@ -1891,7 +1891,7 @@ _calcf(char op, double a, double b)
  a -= b;
  return a;
   case '/':
- if (b != 0) a /= b;
+ if (NEQ(b, 0)) a /= b;
  else
ERR("%s:%i divide by zero", file_in, line - 1);
  return a;
@@ -1899,7 +1899,7 @@ _calcf(char op, double a, double b)
  a *= b;
  return a;
   case '%':
- if (0 != b) a = (double)((int)a % (int)b);
+ if (NEQ(b, 0)) a = (double)((int)a % (int)b);
  else
ERR("%s:%i modula by zero", file_in, line - 1);
  return a;

-- 




[EGIT] [core/efl] master 34/37: edje: fix float comparison warning in vector loading logic.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a5804c970da22264808f6d0a7133a985cb9911ef

commit a5804c970da22264808f6d0a7133a985cb9911ef
Author: Cedric BAIL 
Date:   Tue Dec 20 16:03:11 2016 -0800

edje: fix float comparison warning in vector loading logic.

Hum, there is no use of our fixed point infrastructure for vector.
---
 src/lib/edje/edje_load.c |  3 ++-
 src/lib/edje/edje_util.c | 14 +++---
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/lib/edje/edje_load.c b/src/lib/edje/edje_load.c
index 91695b2..e530926 100644
--- a/src/lib/edje/edje_load.c
+++ b/src/lib/edje/edje_load.c
@@ -2876,7 +2876,8 @@ _edje_dupe_vector_data(Edje *ed, int svg_id, double 
width, double height,
root = evas_vg_container_add(NULL);
efl_vg_dup(root, vector->vg);
 
-   if (vector->w && vector->h)
+   if (!EINA_DBL_CMP(vector->w, 0) &&
+   !EINA_DBL_CMP(vector->h, 0))
  {
 _apply_transformation(root, width, height, vector);
  }
diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index 83c37d5..e9cead7 100644
--- a/src/lib/edje/edje_util.c
+++ b/src/lib/edje/edje_util.c
@@ -338,7 +338,7 @@ edje_scale_set(double scale)
 {
Edje *ed;
 
-   if (_edje_scale == FROM_DOUBLE(scale)) return;
+   if (EQ(_edje_scale, FROM_DOUBLE(scale))) return;
_edje_scale = FROM_DOUBLE(scale);
EINA_INLIST_FOREACH(_edje_edjes, ed) edje_object_calc_force(ed->obj);
 }
@@ -359,7 +359,7 @@ edje_password_show_last_set(Eina_Bool password_show_last)
 EAPI void
 edje_password_show_last_timeout_set(double password_show_last_timeout)
 {
-   if (_edje_password_show_last_timeout == password_show_last_timeout) return;
+   if (EINA_DBL_CMP(_edje_password_show_last_timeout, 
password_show_last_timeout)) return;
_edje_password_show_last_timeout = password_show_last_timeout;
 }
 
@@ -371,7 +371,7 @@ _edje_object_scale_set(Eo *obj EINA_UNUSED, Edje *ed, 
double scale)
Eina_List *l;
unsigned short i;
 
-   if (ed->scale == scale) return EINA_TRUE;
+   if (EQ(ed->scale, FROM_DOUBLE(scale))) return EINA_TRUE;
ed->scale = FROM_DOUBLE(scale);
EINA_LIST_FOREACH(ed->groups, l, ged)
  edje_object_scale_set(ged->obj, scale);
@@ -4138,7 +4138,7 @@ _edje_object_part_drag_value_set(Eo *obj EINA_UNUSED, 
Edje *ed, const char *part
  }
if (rp->part->dragable.x < 0) dx = 1.0 - dx;
if (rp->part->dragable.y < 0) dy = 1.0 - dy;
-   if ((rp->drag->val.x == FROM_DOUBLE(dx)) && (rp->drag->val.y == 
FROM_DOUBLE(dy)))
+   if (EQ(rp->drag->val.x, FROM_DOUBLE(dx)) && EQ(rp->drag->val.y, 
FROM_DOUBLE(dy)))
  {
 return EINA_TRUE;
  }
@@ -4222,7 +4222,7 @@ _edje_object_part_drag_size_set(Eo *obj EINA_UNUSED, Edje 
*ed, const char *part,
if (dh < 0.0) dh = 0.0;
else if (dh > 1.0)
  dh = 1.0;
-   if ((rp->drag->size.x == FROM_DOUBLE(dw)) && (rp->drag->size.y == 
FROM_DOUBLE(dh)))
+   if (EQ(rp->drag->size.x, FROM_DOUBLE(dw)) && EQ(rp->drag->size.y, 
FROM_DOUBLE(dh)))
  {
 return EINA_TRUE;
  }
@@ -4449,7 +4449,7 @@ _edje_object_part_drag_step(Eo *obj EINA_UNUSED, Edje 
*ed, const char *part, dou
  MUL(rp->drag->step.y, rp->part->dragable.y)));
rp->drag->val.x = CLAMP(rp->drag->val.x, ZERO, FROM_DOUBLE(1.0));
rp->drag->val.y = CLAMP(rp->drag->val.y, ZERO, FROM_DOUBLE(1.0));
-   if ((px == rp->drag->val.x) && (py == rp->drag->val.y))
+   if (EQ(px, rp->drag->val.x) && EQ(py, rp->drag->val.y))
  {
 return EINA_TRUE;
  }
@@ -4499,7 +4499,7 @@ _edje_object_part_drag_page(Eo *obj EINA_UNUSED, Edje 
*ed, const char *part, dou
rp->drag->val.y = ADD(py, MUL(FROM_DOUBLE(dy), MUL(rp->drag->page.y, 
rp->part->dragable.y)));
rp->drag->val.x = CLAMP(rp->drag->val.x, ZERO, FROM_DOUBLE(1.0));
rp->drag->val.y = CLAMP(rp->drag->val.y, ZERO, FROM_DOUBLE(1.0));
-   if ((px == rp->drag->val.x) && (py == rp->drag->val.y))
+   if (EQ(px, rp->drag->val.x) && EQ(py, rp->drag->val.y))
  {
 return EINA_TRUE;
  }

-- 




[EGIT] [core/efl] master 30/37: edje: fix float comparison warning in edje callback code.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7abe432992fd974c7440097f97a607fea845172d

commit 7abe432992fd974c7440097f97a607fea845172d
Author: Cedric BAIL 
Date:   Tue Dec 20 16:00:05 2016 -0800

edje: fix float comparison warning in edje callback code.
---
 src/lib/edje/edje_callbacks.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/edje/edje_callbacks.c b/src/lib/edje/edje_callbacks.c
index c92f329..8a32093 100644
--- a/src/lib/edje/edje_callbacks.c
+++ b/src/lib/edje/edje_callbacks.c
@@ -320,7 +320,7 @@ _edje_mouse_move_signal_cb(void *data, const Efl_Event 
*event)
  FLOAT_T dx, dy;
 
  _edje_part_dragable_calc(ed, rp, , );
- if ((dx != rp->drag->val.x) || (dy != rp->drag->val.y))
+ if ((NEQ(dx, rp->drag->val.x)) || (NEQ(dy, rp->drag->val.y)))
{
   rp->drag->val.x = dx;
   rp->drag->val.y = dy;

-- 




[EGIT] [core/efl] master 07/37: elementary: fix float comparison warning in bg test.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ee79b90066e7f3d0587fcb445df7a7f8b82e112e

commit ee79b90066e7f3d0587fcb445df7a7f8b82e112e
Author: Cedric BAIL 
Date:   Tue Dec 20 14:54:59 2016 -0800

elementary: fix float comparison warning in bg test.
---
 src/bin/elementary/test_bg.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/bin/elementary/test_bg.c b/src/bin/elementary/test_bg.c
index 3d1d885..bb6b119 100644
--- a/src/bin/elementary/test_bg.c
+++ b/src/bin/elementary/test_bg.c
@@ -47,13 +47,13 @@ _cb_color_changed(void *data, Evas_Object *obj, void *event 
EINA_UNUSED)
double val = 0.0;
 
val = elm_spinner_value_get(obj);
-   if (val == 1.0)
+   if (EINA_DBL_CMP(val, 1.0))
  elm_bg_color_set(o_bg, 255, 255, 255);
-   else if (val == 2.0)
+   else if (EINA_DBL_CMP(val, 2.0))
  elm_bg_color_set(o_bg, 255, 0, 0);
-   else if (val == 3.0)
+   else if (EINA_DBL_CMP(val, 3.0))
  elm_bg_color_set(o_bg, 0, 0, 255);
-   else if (val == 4.0)
+   else if (EINA_DBL_CMP(val, 4.0))
  elm_bg_color_set(o_bg, 0, 255, 0);
 }
 

-- 




[EGIT] [core/efl] master 10/37: elementary: fix float comparison warning in photocam.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=144c7deaae0fc0d3d8832e43986c8d325f637d3c

commit 144c7deaae0fc0d3d8832e43986c8d325f637d3c
Author: Cedric BAIL 
Date:   Tue Dec 20 15:10:54 2016 -0800

elementary: fix float comparison warning in photocam.
---
 src/lib/elementary/elm_photocam.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/elementary/elm_photocam.c 
b/src/lib/elementary/elm_photocam.c
index b4f0f97..636c28d 100644
--- a/src/lib/elementary/elm_photocam.c
+++ b/src/lib/elementary/elm_photocam.c
@@ -1859,7 +1859,7 @@ _elm_photocam_zoom_set(Eo *obj, Elm_Photocam_Data *sd, 
double zoom)
Eina_Bool an = EINA_FALSE;
 
if (zoom <= (1.0 / 256.0)) zoom = (1.0 / 256.0);
-   if (zoom == sd->zoom) return;
+   if (EINA_DBL_CMP(zoom, sd->zoom)) return;
 
sd->zoom = zoom;
sd->size.ow = sd->size.w;
@@ -1897,7 +1897,7 @@ _elm_photocam_zoom_set(Eo *obj, Elm_Photocam_Data *sd, 
double zoom)
z = (double)sd->size.imw / pw;
  else
z = (double)sd->size.imh / ph;
- if (z != sd->zoom)
+ if (!EINA_DBL_CMP(z, sd->zoom))
zoom_changed = 1;
  sd->zoom = z;
  sd->size.nw = pw;
@@ -1943,7 +1943,7 @@ _elm_photocam_zoom_set(Eo *obj, Elm_Photocam_Data *sd, 
double zoom)
   }
 else if ((sd->size.imw < rw) && (sd->size.imh < rh))
   {
- if (1 != sd->zoom) zoom_changed = 1;
+ if (!EINA_DBL_CMP(sd->zoom, 1)) zoom_changed = 1;
  sd->zoom = 1;
  sd->size.nw = sd->size.imw;
  sd->size.nh = sd->size.imh;
@@ -1962,7 +1962,7 @@ _elm_photocam_zoom_set(Eo *obj, Elm_Photocam_Data *sd, 
double zoom)
z = (double)sd->size.imw / pw;
  else
z = (double)sd->size.imh / ph;
- if (z != sd->zoom)
+ if (EINA_DBL_CMP(z, sd->zoom))
zoom_changed = 1;
  sd->zoom = z;
  sd->size.nw = pw;

-- 




[EGIT] [core/efl] master 01/37: efl: in read only case this might get uninitialized.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e9ebad15191cf39d757db76a681bd69bbd0fb086

commit e9ebad15191cf39d757db76a681bd69bbd0fb086
Author: Cedric BAIL 
Date:   Tue Dec 20 09:40:03 2016 -0800

efl: in read only case this might get uninitialized.
---
 src/lib/efl/interfaces/efl_io_buffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/efl/interfaces/efl_io_buffer.c 
b/src/lib/efl/interfaces/efl_io_buffer.c
index e22bfa3..1cfeedd 100644
--- a/src/lib/efl/interfaces/efl_io_buffer.c
+++ b/src/lib/efl/interfaces/efl_io_buffer.c
@@ -370,7 +370,7 @@ EOLIAN static Eina_Error
 _efl_io_buffer_efl_io_sizer_resize(Eo *o, Efl_Io_Buffer_Data *pd, uint64_t 
size)
 {
Eina_Error ret = 0;
-   Eina_Bool reallocated;
+   Eina_Bool reallocated = EINA_FALSE;
size_t old_size, pos_read, pos_write;
 
EINA_SAFETY_ON_TRUE_RETURN_VAL(efl_io_closer_closed_get(o), EINVAL);

-- 




[EGIT] [core/efl] master 13/37: elementary: fix float comparison warning in thumb.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=33e43c5608d4cadb57e3304da79f13901a6abdf2

commit 33e43c5608d4cadb57e3304da79f13901a6abdf2
Author: Cedric BAIL 
Date:   Tue Dec 20 15:15:51 2016 -0800

elementary: fix float comparison warning in thumb.
---
 src/lib/elementary/elm_thumb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elementary/elm_thumb.c b/src/lib/elementary/elm_thumb.c
index 9332c23..b1893de 100644
--- a/src/lib/elementary/elm_thumb.c
+++ b/src/lib/elementary/elm_thumb.c
@@ -358,7 +358,7 @@ _thumb_start(Elm_Thumb_Data *sd)
  ethumb_client_orientation_set(_elm_ethumb_client, sd->thumb.orient);
if (sd->thumb.tw && sd->thumb.th)
  ethumb_client_size_set(_elm_ethumb_client, sd->thumb.tw, sd->thumb.th);
-   if (sd->thumb.cropx && sd->thumb.cropy)
+   if (!EINA_DBL_CMP(sd->thumb.cropx, 0) && !EINA_DBL_CMP(sd->thumb.cropy, 0))
  ethumb_client_crop_align_set(_elm_ethumb_client, sd->thumb.cropx, 
sd->thumb.cropy);
if (sd->thumb.quality)
  ethumb_client_quality_set(_elm_ethumb_client, sd->thumb.quality);

-- 




[EGIT] [core/efl] master 08/37: elementary: fix float comparison warning in flip page test.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a5bc6f7b009d74605ea5adf2ce2c58fd5bef44b6

commit a5bc6f7b009d74605ea5adf2ce2c58fd5bef44b6
Author: Cedric BAIL 
Date:   Tue Dec 20 14:55:21 2016 -0800

elementary: fix float comparison warning in flip page test.
---
 src/bin/elementary/test_flip_page.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/elementary/test_flip_page.c 
b/src/bin/elementary/test_flip_page.c
index 5fbb9df..4e9bec6 100644
--- a/src/bin/elementary/test_flip_page.c
+++ b/src/bin/elementary/test_flip_page.c
@@ -385,7 +385,7 @@ _state_update(State *st)
 
if (mx < 1) mx = 1; // quick hack to keep curl line visible
 
-   if (mgrad == 0.0) // special horizontal case
+   if (EINA_DBL_CMP(mgrad, 0.0)) // special horizontal case
   mgrad = 0.001; // quick dirty hack for now
// else
  {

-- 




[EGIT] [core/efl] master 14/37: elementary: fix float warning in scroller.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=691ba877d763142a14eeb3809fc0c1766a09125a

commit 691ba877d763142a14eeb3809fc0c1766a09125a
Author: Cedric BAIL 
Date:   Tue Dec 20 15:16:17 2016 -0800

elementary: fix float warning in scroller.
---
 src/lib/elementary/elm_scroller.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elementary/elm_scroller.c 
b/src/lib/elementary/elm_scroller.c
index 731c9af..d14d6b2 100644
--- a/src/lib/elementary/elm_scroller.c
+++ b/src/lib/elementary/elm_scroller.c
@@ -148,7 +148,7 @@ _key_action_move(Evas_Object *obj, const char *params)
 cur_weight += ((f_x - c_x) - x) * ((f_x - c_x) - x);
   if ((f_y - c_y) > y)
 cur_weight += ((f_y - c_y) - y) * ((f_y - c_y) - y);
-  if (cur_weight == 0.0)
+  if (EINA_DBL_CMP(cur_weight, 0.0))
 {
elm_widget_focus_steal(cur, NULL);
eina_list_free(can_focus_list);

-- 




[EGIT] [core/efl] master 15/37: elementary: fix float comparison warning in map.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=5e5da80c62a96f91945dec210ccc7a4c27708fad

commit 5e5da80c62a96f91945dec210ccc7a4c27708fad
Author: Cedric BAIL 
Date:   Tue Dec 20 15:17:01 2016 -0800

elementary: fix float comparison warning in map.
---
 src/lib/elementary/elm_map.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elementary/elm_map.c b/src/lib/elementary/elm_map.c
index 647ea0e..52bd910 100644
--- a/src/lib/elementary/elm_map.c
+++ b/src/lib/elementary/elm_map.c
@@ -2946,7 +2946,7 @@ _kml_parse(Elm_Map_Route *r)
   }
 fclose(f);
 
-if (dump.distance) r->info.distance = dump.distance;
+if (!EINA_DBL_CMP(dump.distance, 0)) r->info.distance = dump.distance;
 if (dump.description)
   {
  eina_stringshare_replace(>info.waypoints, dump.description);

-- 




[EGIT] [core/efl] master 36/37: doxygen: remove reference warnings.

2016-12-20 Thread Jee-Yong Um
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f1ab136abc7bc1b0a075f8da369cd61ab71b3a3b

commit f1ab136abc7bc1b0a075f8da369cd61ab71b3a3b
Author: Jee-Yong Um 
Date:   Tue Dec 20 16:06:20 2016 -0800

doxygen: remove reference warnings.

Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4503

Signed-off-by: Cedric BAIL 
---
 src/lib/ecore_buffer/Ecore_Buffer.h |  2 +-
 src/lib/eet/Eet.h   |  4 ++--
 src/lib/eina/eina_matrix.h  | 13 +++--
 src/lib/eina/eina_rectangle.h   |  2 +-
 src/lib/eina/eina_thread.h  |  2 +-
 src/lib/eio/Eio_Legacy.h|  3 ++-
 src/lib/evas/Evas_GL.h  | 14 ++
 7 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/src/lib/ecore_buffer/Ecore_Buffer.h 
b/src/lib/ecore_buffer/Ecore_Buffer.h
index 36c82da..74a9b3a 100644
--- a/src/lib/ecore_buffer/Ecore_Buffer.h
+++ b/src/lib/ecore_buffer/Ecore_Buffer.h
@@ -393,7 +393,7 @@ typedef enum _Ecore_Export_Type Ecore_Export_Type;
  */
 typedef unsigned int Ecore_Buffer_Format;
 /**
- * @typedef Ecore_Buffer_Pixmap
+ * @typedef Ecore_Pixmap
  * An Id of Pixmap.
  * @since 1.15
  */
diff --git a/src/lib/eet/Eet.h b/src/lib/eet/Eet.h
index 19ab574..f2ef50c 100644
--- a/src/lib/eet/Eet.h
+++ b/src/lib/eet/Eet.h
@@ -478,7 +478,7 @@ typedef enum _Eet_File_Mode
 } Eet_File_Mode; /**< Modes that a file can be opened. */
 
 /**
- * @enum _Eet_Image_Encoding
+ * @enum Eet_Image_Encoding
  * Specify lossy encoding for image
  * @since 1.10
  */
@@ -524,7 +524,7 @@ typedef struct _Eet_File Eet_File;
 typedef struct _Eet_Dictionary Eet_Dictionary;
 
 /**
- * @typedef Eet_Entries
+ * @typedef Eet_Entry
  * Eet files may contains multiple Entries per file, this handle describe 
them. You can get that handle from an iterator given by eet_list_entries().
  *
  * @see eet_list_entries()
diff --git a/src/lib/eina/eina_matrix.h b/src/lib/eina/eina_matrix.h
index 2f9ad21..e851d5c 100644
--- a/src/lib/eina/eina_matrix.h
+++ b/src/lib/eina/eina_matrix.h
@@ -40,7 +40,8 @@
  */
 
 /**
- * @typedef Matrix3 types
+ * @typedef Eina_Matrix_Type
+ * Matrix3 types
  */
 typedef enum _Eina_Matrix_Type
   {
@@ -368,7 +369,7 @@ EAPI void eina_matrix3_scale(Eina_Matrix3 *t, double sx, 
double sy);
 
 /**
  * Set the matrix values for a rotation
- * @param[in] m The matrix to set the rotation values
+ * @param[in] t The matrix to set the rotation values
  * @param[in] rad The radius to rotate the matrix
  *
  * @since 1.14
@@ -500,8 +501,8 @@ EAPI void eina_matrix3_copy(Eina_Matrix3 *dst, const 
Eina_Matrix3 *src);
  * @brief Multiply two matrix
  *
  * @param out The resulting matrix
- * @param a The first member of the multiplication
- * @param b The second member of the multiplication
+ * @param mat_a The first member of the multiplication
+ * @param mat_b The second member of the multiplication
  *
  * @since 1.17
  */
@@ -512,8 +513,8 @@ EAPI void eina_matrix3_multiply(Eina_Matrix3 *out, const 
Eina_Matrix3 *mat_a,
  * @brief Multiply two matrix
  *
  * @param out The resulting matrix
- * @param a The first member of the multiplication
- * @param b The second member of the multiplication
+ * @param mat_a The first member of the multiplication
+ * @param mat_b The second member of the multiplication
  *
  * @since 1.17
  */
diff --git a/src/lib/eina/eina_rectangle.h b/src/lib/eina/eina_rectangle.h
index fce0470..fcde85e 100644
--- a/src/lib/eina/eina_rectangle.h
+++ b/src/lib/eina/eina_rectangle.h
@@ -62,7 +62,7 @@ typedef struct _Eina_Rectangle
 typedef struct _Eina_Rectangle_Pool Eina_Rectangle_Pool;
 
 /**
- * @typedef Eina_Rectangle_Pool_Type
+ * @typedef Eina_Rectangle_Packing
  * Type for an Eina Pool based on packing algorithm.
  * @since 1.11
  */
diff --git a/src/lib/eina/eina_thread.h b/src/lib/eina/eina_thread.h
index d7a9ad3..067e69b 100644
--- a/src/lib/eina/eina_thread.h
+++ b/src/lib/eina/eina_thread.h
@@ -57,7 +57,7 @@ typedef uintptr_t Eina_Thread;
 typedef void *(*Eina_Thread_Cb)(void *data, Eina_Thread t);
 
 /**
- * @typedef Eina_Thead_Priority
+ * @typedef Eina_Thread_Priority
  * Type to enumerate different thread priorities
  */
 typedef enum _Eina_Thread_Priority
diff --git a/src/lib/eio/Eio_Legacy.h b/src/lib/eio/Eio_Legacy.h
index 833a214..571549b 100644
--- a/src/lib/eio/Eio_Legacy.h
+++ b/src/lib/eio/Eio_Legacy.h
@@ -39,7 +39,7 @@ extern "C" {
  *
  * The Eio library is a library that implements an API for asynchronous
  * input/output operation. Most operations are done in a separate thread
- * to prevent lock. See @ref Eio_Group. Some helper to work on data
+ * to prevent lock. See @ref Eio. Some helper to work on data
  * received in Eio callback are also provided see @ref Eio_Helper.
  * It is also possible to work asynchronously on Eina_File with @ref Eio_Map
  * or on Eet_File with @ref Eio_Eet. It comes with 

[EGIT] [core/efl] master 05/37: ethumb: fix float comparison warning.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=fb418debc3a87fb9361d48f7ade10fe0e589e92d

commit fb418debc3a87fb9361d48f7ade10fe0e589e92d
Author: Cedric BAIL 
Date:   Tue Dec 20 14:52:53 2016 -0800

ethumb: fix float comparison warning.
---
 src/lib/ethumb/ethumb.c | 37 +++--
 1 file changed, 23 insertions(+), 14 deletions(-)

diff --git a/src/lib/ethumb/ethumb.c b/src/lib/ethumb/ethumb.c
index b66c3f4..f7b4b46 100644
--- a/src/lib/ethumb/ethumb.c
+++ b/src/lib/ethumb/ethumb.c
@@ -1151,7 +1151,7 @@ ethumb_calculate_aspect_from_ratio(Ethumb *e, float ia, 
int *w, int *h)
*w = e->tw;
*h = e->th;
 
-   if (ia == 0)
+   if (EINA_FLT_CMP(ia, 0))
  return;
 
a = e->tw / (float)e->th;
@@ -1190,7 +1190,7 @@ ethumb_calculate_fill_from_ratio(Ethumb *e, float ia, int 
*fx, int *fy, int *fw,
*fx = 0;
*fy = 0;
 
-   if (ia == 0)
+   if (EINA_FLT_CMP(ia, 0))
  return;
 
a = e->tw / (float)e->th;
@@ -1738,10 +1738,19 @@ ethumb_dup(const Ethumb *e)
 #define CHECK_DELTA(Param)  \
   if (e1->Param != e2->Param)   \
 return EINA_TRUE;
+#define CHECK_FLT_DELTA(Param)  \
+  if (!EINA_FLT_CMP(e1->Param, e2->Param))  \
+return EINA_TRUE;
 
 EAPI Eina_Bool
 ethumb_cmp(const Ethumb *e1, const Ethumb *e2)
 {
+   CHECK_FLT_DELTA(crop_x);
+   CHECK_FLT_DELTA(crop_y);
+   CHECK_FLT_DELTA(video.start);
+   CHECK_FLT_DELTA(video.time);
+   CHECK_FLT_DELTA(video.interval);
+
CHECK_DELTA(thumb_dir);
CHECK_DELTA(category);
CHECK_DELTA(tw);
@@ -1749,15 +1758,10 @@ ethumb_cmp(const Ethumb *e1, const Ethumb *e2)
CHECK_DELTA(format);
CHECK_DELTA(aspect);
CHECK_DELTA(orientation);
-   CHECK_DELTA(crop_x);
-   CHECK_DELTA(crop_y);
CHECK_DELTA(quality);
CHECK_DELTA(compress);
CHECK_DELTA(rw);
CHECK_DELTA(rh);
-   CHECK_DELTA(video.start);
-   CHECK_DELTA(video.time);
-   CHECK_DELTA(video.interval);
CHECK_DELTA(video.ntimes);
CHECK_DELTA(video.fps);
CHECK_DELTA(document.page);
@@ -1771,8 +1775,12 @@ ethumb_length(EINA_UNUSED const void *key)
return sizeof (Ethumb);
 }
 
-#define CMP_PARAM(Param)   \
-  if (e1->Param != e2->Param)  \
+#define CMP_PARAM(Param)\
+  if (e1->Param != e2->Param)   \
+return e1->Param - e2->Param;
+
+#define CMP_FLT_PARAM(Param)\
+  if (!EINA_FLT_CMP(e1->Param, e2->Param))  \
 return e1->Param - e2->Param;
 
 EAPI int
@@ -1782,6 +1790,12 @@ ethumb_key_cmp(const void *key1, EINA_UNUSED int 
key1_length,
const Ethumb *e1 = key1;
const Ethumb *e2 = key2;
 
+   CMP_FLT_PARAM(crop_x);
+   CMP_FLT_PARAM(crop_y);
+   CMP_FLT_PARAM(video.start);
+   CMP_FLT_PARAM(video.time);
+   CMP_FLT_PARAM(video.interval);
+
CMP_PARAM(thumb_dir);
CMP_PARAM(category);
CMP_PARAM(tw);
@@ -1789,15 +1803,10 @@ ethumb_key_cmp(const void *key1, EINA_UNUSED int 
key1_length,
CMP_PARAM(format);
CMP_PARAM(aspect);
CMP_PARAM(orientation);
-   CMP_PARAM(crop_x);
-   CMP_PARAM(crop_y);
CMP_PARAM(quality);
CMP_PARAM(compress);
CMP_PARAM(rw);
CMP_PARAM(rh);
-   CMP_PARAM(video.start);
-   CMP_PARAM(video.time);
-   CMP_PARAM(video.interval);
CMP_PARAM(video.ntimes);
CMP_PARAM(video.fps);
CMP_PARAM(document.page);

-- 




[EGIT] [core/efl] master 33/37: edje: fix float comparison warning in edje programs.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4c465772f9be51da1cdb555d6eb7f60183ed35d9

commit 4c465772f9be51da1cdb555d6eb7f60183ed35d9
Author: Cedric BAIL 
Date:   Tue Dec 20 16:02:02 2016 -0800

edje: fix float comparison warning in edje programs.
---
 src/lib/edje/edje_program.c | 10 +-
 src/lib/edje/edje_var.c |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/lib/edje/edje_program.c b/src/lib/edje/edje_program.c
index a2df439..695f57c 100644
--- a/src/lib/edje/edje_program.c
+++ b/src/lib/edje/edje_program.c
@@ -678,7 +678,7 @@ _edje_program_run(Edje *ed, Edje_Program *pr, Eina_Bool 
force, const char *ssig,
  {
 ERR("Programs recursing up to recursion limit of %i in '%s' with 
sig='%s', src='%s' from '%s', '%s'. Disabled.",
 64, pr->name, ssig, ssrc, ed->path, ed->group);
-if (pr->action == EDJE_ACTION_TYPE_STATE_SET && ((pr->tween.time == 
ZERO) || (ed->no_anim)))
+if (pr->action == EDJE_ACTION_TYPE_STATE_SET && (EQ(pr->tween.time, 
ZERO) || (ed->no_anim)))
   ERR("Possible solution: try adding transition time to prevent 
Schrödinger's part state");
 recursion_limit = 1;
 return;
@@ -1947,7 +1947,7 @@ _edje_param_native_set(Edje *ed, Edje_Real_Part *rp, 
const char *name, const Edj
   if (rp->part->dragable.confine_id != -1)
 d = CLAMP(d, 0.0, 1.0);
   if (rp->part->dragable.x < 0) d = 1.0 - d;
-  if (rp->drag->val.x == FROM_DOUBLE(d)) return EINA_TRUE;
+  if (EQ(rp->drag->val.x, FROM_DOUBLE(d))) return EINA_TRUE;
   rp->drag->val.x = FROM_DOUBLE(d);
 #ifdef EDJE_CALC_CACHE
   rp->invalidate = EINA_TRUE;
@@ -1966,7 +1966,7 @@ _edje_param_native_set(Edje *ed, Edje_Real_Part *rp, 
const char *name, const Edj
   if (rp->part->dragable.confine_id != -1)
 d = CLAMP(d, 0.0, 1.0);
   if (rp->part->dragable.y < 0) d = 1.0 - d;
-  if (rp->drag->val.y == FROM_DOUBLE(d)) return EINA_TRUE;
+  if (EQ(rp->drag->val.y, FROM_DOUBLE(d))) return EINA_TRUE;
   rp->drag->val.y = FROM_DOUBLE(d);
 #ifdef EDJE_CALC_CACHE
   rp->invalidate = EINA_TRUE;
@@ -2286,11 +2286,11 @@ _edje_param_validate(const Edje_External_Param *param, 
const Edje_External_Param
 return EINA_TRUE;
 
   case EDJE_EXTERNAL_PARAM_TYPE_DOUBLE:
-if ((info->info.d.min != EDJE_EXTERNAL_DOUBLE_UNSET) &&
+if (!EINA_DBL_CMP(info->info.d.min, EDJE_EXTERNAL_DOUBLE_UNSET) &&
 (info->info.d.min > param->d))
   return EINA_FALSE;
 
-if ((info->info.d.max != EDJE_EXTERNAL_DOUBLE_UNSET) &&
+if (!EINA_DBL_CMP(info->info.d.max, EDJE_EXTERNAL_DOUBLE_UNSET) &&
 (info->info.d.max < param->d))
   return EINA_FALSE;
 
diff --git a/src/lib/edje/edje_var.c b/src/lib/edje/edje_var.c
index 6c2ddf2..3bc3ebf 100644
--- a/src/lib/edje/edje_var.c
+++ b/src/lib/edje/edje_var.c
@@ -134,7 +134,7 @@ _edje_var_anim_cb(void *data EINA_UNUSED)
   embryo_program_vm_pop(ed->collection->script);
   _edje_recalc(ed);
}
-   if (v == 1.0) ea->delete_me = 1;
+   if (EQ(v, FROM_INT(1))) ea->delete_me = 1;
 }
}
  tl2 = eina_list_remove(tl2, ea);

-- 




[EGIT] [core/efl] master 24/37: edje: fix float comparison warning in edje_pick.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=6e40fd890b5dc0218c8edb195003eb95c5bf5ac1

commit 6e40fd890b5dc0218c8edb195003eb95c5bf5ac1
Author: Cedric BAIL 
Date:   Tue Dec 20 15:46:43 2016 -0800

edje: fix float comparison warning in edje_pick.
---
 src/bin/edje/edje_pick.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/edje/edje_pick.c b/src/bin/edje/edje_pick.c
index a4a2b22..79a361c 100644
--- a/src/bin/edje/edje_pick.c
+++ b/src/bin/edje/edje_pick.c
@@ -558,7 +558,7 @@ _edje_pick_output_prepare(Edje_File *o, Edje_File *edf, 
char *name)
  if (o->feature_ver < edf->feature_ver)
o->feature_ver = edf->feature_ver;
   }
-if (o->base_scale != edf->base_scale)
+if (NEQ(o->base_scale, edf->base_scale))
   {
  EINA_LOG_ERR("Error: Merging files of various base scale. Base 
scale of the files should be same.\n");
  free(o);

-- 




[EGIT] [core/efl] master 09/37: elementary: fix float warning in Efl.Ui.Box_Layout.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=30ff98f8fd46b54fa1459db69ac93d8a3b77505d

commit 30ff98f8fd46b54fa1459db69ac93d8a3b77505d
Author: Cedric BAIL 
Date:   Tue Dec 20 14:58:57 2016 -0800

elementary: fix float warning in Efl.Ui.Box_Layout.
---
 src/lib/elementary/efl_ui_box_layout.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elementary/efl_ui_box_layout.c 
b/src/lib/elementary/efl_ui_box_layout.c
index 6556654..50d5cef 100644
--- a/src/lib/elementary/efl_ui_box_layout.c
+++ b/src/lib/elementary/efl_ui_box_layout.c
@@ -156,7 +156,7 @@ _efl_ui_box_custom_layout(Efl_Ui_Box *ui_box, 
Evas_Object_Box_Data *bd)
 
if (extra < 0) extra = 0;
 
-   if (!weight[!horiz])
+   if (!EINA_DBL_CMP(weight[!horiz], 0))
  {
 if (box_fill[!horiz])
   {

-- 




[EGIT] [core/efl] master 18/37: elementary: fix float comparison warning in c.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a07a2671450a875026af50e6bc74db488a90618b

commit a07a2671450a875026af50e6bc74db488a90618b
Author: Cedric BAIL 
Date:   Tue Dec 20 15:41:23 2016 -0800

elementary: fix float comparison warning in c
---
 src/lib/elementary/elm_cnp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elementary/elm_cnp.c b/src/lib/elementary/elm_cnp.c
index 64f4cba..06d260e 100644
--- a/src/lib/elementary/elm_cnp.c
+++ b/src/lib/elementary/elm_cnp.c
@@ -5499,7 +5499,7 @@ _cont_obj_anim_start(void *data)
_drag_anim_start(st);
  else
{
-  if (st->anim_tm)
+  if (!EINA_DBL_CMP(st->anim_tm, 0.0))
 {
// even if we don't manage the icons animation, we have
// to wait until it is finished before beginning drag.

-- 




[EGIT] [core/efl] master 23/37: edje: add infrastructure to test value.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a27561b5f55b34581332608ee03a74b7a6fa7e17

commit a27561b5f55b34581332608ee03a74b7a6fa7e17
Author: Cedric BAIL 
Date:   Tue Dec 20 16:01:28 2016 -0800

edje: add infrastructure to test value.
---
 src/lib/edje/edje_private.h | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index 93b131c..f04be21 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -153,6 +153,8 @@ EAPI extern int _edje_default_log_dom ;
 #define COS(a) eina_f32p32_cos(a)
 #define SIN(a) eina_f32p32_sin(a)
 #define PI EINA_F32P32_PI
+#define EQ(a, b) a == b
+#define NEQ(a, b) a != b
 
 #else
 
@@ -174,6 +176,8 @@ EAPI extern int _edje_default_log_dom ;
 #define COS(a) cos(a)
 #define SIN(a) sin(a)
 #define PI 3.14159265358979323846
+#define EQ(a, b) EINA_DBL_CMP(a, b)
+#define NEQ(a, b) !EINA_DBL_CMP(a, b)
 
 #endif
 

-- 




[EGIT] [core/efl] master 25/37: edje: fix float comparison warning in edje SVG loader.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f89cc21ef0e800d00062ecda8ce2981b32d512c5

commit f89cc21ef0e800d00062ecda8ce2981b32d512c5
Author: Cedric BAIL 
Date:   Tue Dec 20 15:47:06 2016 -0800

edje: fix float comparison warning in edje SVG loader.
---
 src/bin/edje/edje_svg_loader.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/edje/edje_svg_loader.c b/src/bin/edje/edje_svg_loader.c
index c9b4165..0d8c5e5 100644
--- a/src/bin/edje/edje_svg_loader.c
+++ b/src/bin/edje/edje_svg_loader.c
@@ -1233,8 +1233,8 @@ _attr_parse_rect_node(void *data, const char *key, const 
char *value)
 _parse_style_attr(node, key, value);
  }
 
-   if (rect->rx != 0 && rect->ry == 0) rect->ry = rect->rx;
-   if (rect->ry != 0 && rect->rx == 0) rect->rx = rect->ry;
+   if (!EINA_DBL_CMP(rect->rx, 0) && EINA_DBL_CMP(rect->ry, 0)) rect->ry = 
rect->rx;
+   if (!EINA_DBL_CMP(rect->ry, 0) && EINA_DBL_CMP(rect->rx, 0)) rect->rx = 
rect->ry;
 
return EINA_TRUE;
 }

-- 





[EGIT] [core/efl] master 04/37: ecore_input_evas: fix float comparison warning.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4a7954248037015c900e03669ad0180691f40e2e

commit 4a7954248037015c900e03669ad0180691f40e2e
Author: Cedric BAIL 
Date:   Tue Dec 20 10:22:37 2016 -0800

ecore_input_evas: fix float comparison warning.
---
 src/lib/ecore_input_evas/ecore_input_evas.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore_input_evas/ecore_input_evas.c 
b/src/lib/ecore_input_evas/ecore_input_evas.c
index 735ad27..d10cb9e 100644
--- a/src/lib/ecore_input_evas/ecore_input_evas.c
+++ b/src/lib/ecore_input_evas/ecore_input_evas.c
@@ -220,7 +220,8 @@ 
_ecore_event_evas_push_mouse_button(Ecore_Event_Mouse_Button *e, Ecore_Event_Pre
 
//if up event not occurs from under layers of ecore
//up event is generated by ecore
-   if (_last_events_enable && _last_events_timeout)
+   if (_last_events_enable &&
+   !EINA_DBL_CMP(_last_events_timeout, 0))
  {
 if (eel->timer) ecore_timer_del(eel->timer);
 eel->timer = NULL;

-- 




[EGIT] [core/efl] master 29/37: edje: fix float comparison warning in edje calc.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b3ce8381e2c36732802c4f73f5f98ce8f71b554d

commit b3ce8381e2c36732802c4f73f5f98ce8f71b554d
Author: Cedric BAIL 
Date:   Tue Dec 20 15:59:46 2016 -0800

edje: fix float comparison warning in edje calc.
---
 src/lib/edje/edje_calc.c | 130 +--
 1 file changed, 70 insertions(+), 60 deletions(-)

diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index dc99493..277321a 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -241,7 +241,7 @@ _edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, 
FLOAT_T pos, FLOAT_T
 break;
  }
 #endif
-   if (npos == ep->description_pos) return;
+   if (EQ(npos, ep->description_pos)) return;
 
ep->description_pos = npos;
 
@@ -468,7 +468,7 @@ _edje_part_description_find(Edje *ed, Edje_Real_Part *rp, 
const char *state_name
   sizeof (Edje_Part_Description_Common *));
  }
 
-   if (!strcmp(state_name, "default") && state_val == 0.0)
+   if (!strcmp(state_name, "default") && EQ(state_val, ZERO))
  return _edje_get_description_by_orientation(ed,
  ep->default_desc, 
>default_desc_rtl, ep->type);
 
@@ -495,7 +495,7 @@ _edje_part_description_find(Edje *ed, Edje_Real_Part *rp, 
const char *state_name
   {
  if (!approximate)
{
-  if (d->state.value == state_val)
+  if (EQ(d->state.value, state_val))
 return _edje_get_description_by_orientation(ed, d,
 
>other.desc_rtl[i], ep->type);
   else
@@ -1042,12 +1042,12 @@ _edje_part_dragable_calc(Edje *ed EINA_UNUSED, 
Edje_Real_Part *ep, FLOAT_T *x, F
 
  dx = FROM_INT(ep->x - ep->drag->confine_to->x);
  dw = FROM_INT(ep->drag->confine_to->w - ep->w);
- if (dw != ZERO) dx = DIV(dx, dw);
+ if (NEQ(dw, ZERO)) dx = DIV(dx, dw);
  else dx = ZERO;
 
  dy = FROM_INT(ep->y - ep->drag->confine_to->y);
  dh = FROM_INT(ep->drag->confine_to->h - ep->h);
- if (dh != ZERO) dy = DIV(dy, dh);
+ if (NEQ(dh, ZERO)) dy = DIV(dy, dh);
  else dy = ZERO;
 
  if (x) *x = tx ? ep->drag->x : dx;
@@ -1078,7 +1078,7 @@ _edje_dragable_pos_set(Edje *ed, Edje_Real_Part *ep, 
FLOAT_T x, FLOAT_T y)
 * value we would set foo to, because it would depend on the
 * size of the dragable...
 */
-   if (ep->drag->x != x || ep->drag->tmp.x)
+   if (NEQ(ep->drag->x, x) || ep->drag->tmp.x)
  {
 ep->drag->x = x;
 ep->drag->tmp.x = 0;
@@ -1087,7 +1087,7 @@ _edje_dragable_pos_set(Edje *ed, Edje_Real_Part *ep, 
FLOAT_T x, FLOAT_T y)
 ed->recalc_call = EINA_TRUE;
  }
 
-   if (ep->drag->y != y || ep->drag->tmp.y)
+   if (NEQ(ep->drag->y, y) || ep->drag->tmp.y)
  {
 ep->drag->y = y;
 ep->drag->tmp.y = 0;
@@ -1566,7 +1566,7 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
  double tmp_s = 
_edje_part_recalc_single_textblock_scale_range_adjust(chosen_desc, base_s, s * 
0.95);
 
  /* Break if we are not making any progress. */
- if (tmp_s == s)
+ if (EQ(tmp_s, s))
break;
  s = tmp_s;
 
@@ -1657,7 +1657,7 @@ _edje_textblock_recalc_apply(Edje *ed, Edje_Real_Part *ep,
/* FIXME: this is just an hack. */
FLOAT_T sc;
sc = DIV(ed->scale, ed->file->base_scale);
-   if (sc == ZERO) sc = DIV(_edje_scale, ed->file->base_scale);
+   if (EQ(sc, ZERO)) sc = DIV(_edje_scale, ed->file->base_scale);
if (chosen_desc->text.fit_x || chosen_desc->text.fit_y)
  {
 _edje_part_recalc_single_textblock(sc, ed, ep, chosen_desc, params,
@@ -1944,8 +1944,8 @@ _edje_part_recalc_single_min(Edje_Part_Description_Common 
*desc,
FLOAT_T w;
FLOAT_T h;
 
-   w = params->eval.w ? params->eval.w : FROM_INT(9);
-   h = params->eval.h ? params->eval.h : FROM_INT(9);
+   w = NEQ(params->eval.w, ZERO) ? params->eval.w : FROM_INT(9);
+   h = NEQ(params->eval.h, ZERO) ? params->eval.h : FROM_INT(9);
 
switch (aspect)
  {
@@ -2014,8 +2014,8 @@ _edje_part_recalc_single_max(Edje_Part_Description_Common 
*desc,
FLOAT_T w;
FLOAT_T h;
 
-   w = params->eval.w ? params->eval.w : FROM_INT(9);
-   h = params->eval.h ? params->eval.h : FROM_INT(9);
+   w = NEQ(params->eval.w, 0) ? params->eval.w : FROM_INT(9);
+   h = NEQ(params->eval.h, 0) ? params->eval.h : FROM_INT(9);
 
switch (aspect)
  {
@@ -2274,7 +2274,7 @@ _edje_part_recalc_single_min_max(FLOAT_T sc,
 if (desc->minmul.have)
   {
  FLOAT_T mmw = desc->minmul.w;
- if (mmw != FROM_INT(1)) 

[EGIT] [core/efl] master 37/37: elmentary: prevent crash in multibuttonentry.

2016-12-20 Thread Woochan Lee
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=01d3139dbaebc19f72045c638cd786d4f3bcdbe7

commit 01d3139dbaebc19f72045c638cd786d4f3bcdbe7
Author: Woochan Lee 
Date:   Tue Dec 20 16:08:42 2016 -0800

elmentary: prevent crash in multibuttonentry.

Summary: Do Null checking to prevent crash, if 'elm_object_text_get()' 
return NULL here.

Reviewers: Hermet, woohyun, jpeg, cedric

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4501

Signed-off-by: Cedric BAIL 
---
 src/lib/elementary/elc_multibuttonentry.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/elementary/elc_multibuttonentry.c 
b/src/lib/elementary/elc_multibuttonentry.c
index a78f176..68cf107 100644
--- a/src/lib/elementary/elc_multibuttonentry.c
+++ b/src/lib/elementary/elc_multibuttonentry.c
@@ -1179,6 +1179,7 @@ _entry_key_up_cb(void *data,
if (!sd->box) return;
 
str = elm_object_text_get(sd->entry);
+   if (!str) return;
 
if (strlen(str) &&
(!strcmp(ev->key, "KP_Enter") || !strcmp(ev->key, "Return")))

-- 




[EGIT] [core/efl] master 06/37: evas_cserve2: fix float comparison warning.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=233cb77c1e8c86052cd450ae37579d85b65181a0

commit 233cb77c1e8c86052cd450ae37579d85b65181a0
Author: Cedric BAIL 
Date:   Tue Dec 20 14:53:32 2016 -0800

evas_cserve2: fix float comparison warning.
---
 src/bin/evas/evas_cserve2_shm_debug.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/bin/evas/evas_cserve2_shm_debug.c 
b/src/bin/evas/evas_cserve2_shm_debug.c
index 341d8ed..f368986 100644
--- a/src/bin/evas/evas_cserve2_shm_debug.c
+++ b/src/bin/evas/evas_cserve2_shm_debug.c
@@ -431,7 +431,7 @@ _files_all_print_all(void)
_shared_string_get(fd->path), _shared_string_get(fd->key));
 printf("LoadOpts:  Region:  %d,%d-%dx%d\n",
fd->lo.region.x, fd->lo.region.y, fd->lo.region.w, 
fd->lo.region.h);
-if (fd->lo.dpi != 0)
+if (!EINA_DBL_CMP(fd->lo.dpi, 0))
   printf("   DPI: %f\n");
 else
   printf("   DPI: 0\n");
@@ -519,7 +519,7 @@ _images_all_print_full(void)
 printf("  height %d\n", id->opts.h);
 printf("  degree %d\n", id->opts.degree);
 printf("  scale_down_by  %d\n", id->opts.scale_down_by);
-if (id->opts.dpi)
+if (!EINA_DBL_CMP(id->opts.dpi, 0.0))
   printf("  dpi%.2f\n", id->opts.dpi);
 else
   printf("  dpi0\n");

-- 




[EGIT] [core/efl] master 32/37: edje: fix float comparison warning in edje text logic.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=48fb9856c03a4a9b15abf85c948e23814bb38174

commit 48fb9856c03a4a9b15abf85c948e23814bb38174
Author: Cedric BAIL 
Date:   Tue Dec 20 16:01:01 2016 -0800

edje: fix float comparison warning in edje text logic.
---
 src/lib/edje/edje_entry.c|  2 +-
 src/lib/edje/edje_text.c | 10 +-
 src/lib/edje/edje_textblock_styles.c |  2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/lib/edje/edje_entry.c b/src/lib/edje/edje_entry.c
index b836e95..b9fb8b8 100644
--- a/src/lib/edje/edje_entry.c
+++ b/src/lib/edje/edje_entry.c
@@ -2582,7 +2582,7 @@ _edje_part_mouse_down_cb(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EINA_
d = (r2->y + (r2->h / 2)) - cy;
d2 += d * d;
sc = DIV(en->ed->scale, en->ed->file->base_scale);
-   if (sc == ZERO) sc = DIV(_edje_scale, 
en->ed->file->base_scale);
+   if (EQ(sc, ZERO)) sc = DIV(_edje_scale, 
en->ed->file->base_scale);
d = (Evas_Coord)MUL(FROM_INT(20), sc); // FIXME: maxing 
number!
d = d * d;
if (d1 < d2)
diff --git a/src/lib/edje/edje_text.c b/src/lib/edje/edje_text.c
index 33b83f4..3c3e1c1 100644
--- a/src/lib/edje/edje_text.c
+++ b/src/lib/edje/edje_text.c
@@ -125,7 +125,7 @@ _edje_text_fit_x(Edje *ed, Edje_Real_Part *ep,
FLOAT_T sc;
 
sc = DIV(ed->scale, ed->file->base_scale);
-   if (sc == ZERO) sc = DIV(_edje_scale, ed->file->base_scale);
+   if (EQ(sc, ZERO)) sc = DIV(_edje_scale, ed->file->base_scale);
 
*free_text = 0;
if (sw <= 1) return "";
@@ -217,7 +217,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
if ((ep->type != EDJE_RP_TYPE_TEXT) ||
(!ep->typedata.text)) return;
sc = DIV(ed->scale, ed->file->base_scale);
-   if (sc == ZERO) sc = DIV(_edje_scale, ed->file->base_scale);
+   if (EQ(sc, ZERO)) sc = DIV(_edje_scale, ed->file->base_scale);
 
if (chosen_desc->text.domain)
  {
@@ -310,9 +310,9 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
(ep->typedata.text->cache.in_h == sh) &&
(ep->typedata.text->cache.in_str) &&
same_text &&
-   (ep->typedata.text->cache.align_x == params->type.text->align.x) &&
-   (ep->typedata.text->cache.align_y == params->type.text->align.y) &&
-   (ep->typedata.text->cache.ellipsis == params->type.text->ellipsis) &&
+   (EQ(ep->typedata.text->cache.align_x, params->type.text->align.x)) &&
+   (EQ(ep->typedata.text->cache.align_y, params->type.text->align.y)) &&
+   (EQ(ep->typedata.text->cache.ellipsis, params->type.text->ellipsis)) &&
(ep->typedata.text->cache.fit_x == chosen_desc->text.fit_x) &&
(ep->typedata.text->cache.fit_y == chosen_desc->text.fit_y) &&
(ep->typedata.text->cache.in_font == font))
diff --git a/src/lib/edje/edje_textblock_styles.c 
b/src/lib/edje/edje_textblock_styles.c
index e4d1851..06cd8cd 100644
--- a/src/lib/edje/edje_textblock_styles.c
+++ b/src/lib/edje/edje_textblock_styles.c
@@ -220,7 +220,7 @@ _edje_textblock_style_update(Edje *ed, Edje_Style *stl, 
Eina_Bool force)
  eina_strbuf_append(txt, "font_source=");
  eina_strbuf_append(txt, fontsource);
   }
-if (tag->font_size != 0)
+if (!EINA_DBL_CMP(tag->font_size, 0))
   {
  char font_size[32];
 

-- 




[EGIT] [core/efl] master 11/37: elementary: fix float warning in Efl.Ui.Image.

2016-12-20 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=c994976cdbff120424ca1df63c86d16dd730222a

commit c994976cdbff120424ca1df63c86d16dd730222a
Author: Cedric BAIL 
Date:   Tue Dec 20 15:12:33 2016 -0800

elementary: fix float warning in Efl.Ui.Image.
---
 src/lib/elementary/efl_ui_image.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elementary/efl_ui_image.c 
b/src/lib/elementary/efl_ui_image.c
index 34b8e4a..264f6ce 100644
--- a/src/lib/elementary/efl_ui_image.c
+++ b/src/lib/elementary/efl_ui_image.c
@@ -1506,7 +1506,7 @@ _efl_ui_image_align_set(Eo *obj, Efl_Ui_Image_Data *sd, 
double align_x, double a
else if (align_y < 0.0)
  align_y = 0.0;
 
-   if ((align_x == sd->align_x) && (align_y == sd->align_y)) return;
+   if ((EINA_DBL_CMP(align_x, sd->align_x)) && (EINA_DBL_CMP(align_y, 
sd->align_y))) return;
 
sd->align_x = align_x;
sd->align_y = align_y;

-- 




Re: [E-devel] [EGIT] [core/efl] master 01/21: eina: add general purpose function to compar float and double.

2016-12-20 Thread Cedric BAIL
On Mon, Dec 19, 2016 at 6:52 PM, Jean-Philippe André  wrote:
> On 20 December 2016 at 10:43, Cedric BAIL  wrote:
>> On Dec 19, 2016 16:49, "Jean-Philippe André"  wrote:
>> On 20 December 2016 at 09:40, Cedric BAIL  wrote:
>> > cedric pushed a commit to branch master.
>> >
>> > http://git.enlightenment.org/core/efl.git/commit/?id=
>> > 7bb229d4be23ffcc4947b453880a5c0f9f7a12c6
>> >
>> > commit 7bb229d4be23ffcc4947b453880a5c0f9f7a12c6
>> > Author: Cedric BAIL 
>> > Date:   Mon Dec 19 12:03:49 2016 -0800
>> >
>> > eina: add general purpose function to compar float and double.
>> > ---
>> >  src/lib/eina/eina_util.h | 20 
>> >  1 file changed, 20 insertions(+)
>> >
>> > diff --git a/src/lib/eina/eina_util.h b/src/lib/eina/eina_util.h
>> > index c1ea02f..66e0d17 100644
>> > --- a/src/lib/eina/eina_util.h
>> > +++ b/src/lib/eina/eina_util.h
>> > @@ -19,6 +19,8 @@
>> >  #ifndef EINA_UTIL_H_
>> >  #define EINA_UTIL_H_
>> >
>> > +#include 
>> > +
>> >  /**
>> >   * @addtogroup Eina_Tools_Group Tools
>> >   *
>> > @@ -48,6 +50,24 @@ EAPI const char *eina_environment_home_get(void);
>> >  EAPI const char *eina_environment_tmp_get(void);
>> >
>> >  /**
>> > + * @brief Safe comparison of float
>> > + * @param a First member to compar
>> > + * @param b Second member to compar
>> > + *
>> > + * @return @c true if two floats match
>> > + */
>> > +#define EINA_FLT_CMP(a, b) (fabsf((float)a - (float)b) <= FLT_EPSILON)
>> > +
>> > +/**
>> > + * @brief Safe comparison of double
>> > + * @param a First member to compar
>> > + * @param b Second member to compar
>> > + *
>> > + * @return @c true if two double match
>> > + */
>> > +#define EINA_DBL_CMP(a, b) (fabs((double)a - (double)b) <= DBL_EPSILON)
>> >
>>
>> Besides the missing @since tag, I think the names are poorly chosen. I
>> would expect a "cmp" function to return -1, 0 or 1 like strcmp().
>> How about renaming to _EQ?
>>
>> Sounds indeed like a better idea. Will update tomorrow with it.
>>
>> Also, do we really need/want the cast?
>>
>> I did think about it, and I think we need, because quite a few time we do
>> compare with integer value and that may not give the intended result. I may
>> be wrong there, but that was the logic.
>
> Yep but then I thought maybe it's better to have the cast be explicit where
> the macro is called, rather than implicitely inside the macro.
> Anyway not a big deal.

I did think about it a little bit more and there is so many place in
our code without a cast where there should be a cast, that I think it
is safer and better to actually have it in the macro. My current plan
is to rename the macro once everyone is ok with the name and do just
one patch for the rename as it won't be a behavior change.
-- 
Cedric BAIL

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 01/21: eina: add general purpose function to compar float and double.

2016-12-20 Thread Cedric BAIL
On Mon, Dec 19, 2016 at 10:06 PM, Vincent Torri  wrote:
> last thing : for now, mingw-w64 does not define FLT_EPSILON. It should
> be added soon as it is part of the API of win32.

Oh, thanks. Will add some fallback then.

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 04/06: eina: add a test for eina_stringshare_refplace.

2016-12-20 Thread Cedric BAIL
On Mon, Dec 19, 2016 at 3:31 AM, Gustavo Sverzut Barbieri
 wrote:
> On Thu, Dec 15, 2016 at 9:24 PM, Cedric BAIL  wrote:
>> cedric pushed a commit to branch master.
>>
>> http://git.enlightenment.org/core/efl.git/commit/?id=0ff7bf3611d3769d2da0bc2521586dc285d5765e
>>
>> commit 0ff7bf3611d3769d2da0bc2521586dc285d5765e
>> Author: Cedric BAIL 
>> Date:   Thu Dec 15 15:00:58 2016 -0800
>>
>> eina: add a test for eina_stringshare_refplace.
>> ---
>>  src/tests/eina/eina_test_stringshare.c | 36 
>> ++
>>  1 file changed, 36 insertions(+)
>>
>> diff --git a/src/tests/eina/eina_test_stringshare.c 
>> b/src/tests/eina/eina_test_stringshare.c
>> index 02e5c81..0aa1beb 100644
>> --- a/src/tests/eina/eina_test_stringshare.c
>> +++ b/src/tests/eina/eina_test_stringshare.c
>> @@ -66,6 +66,41 @@ START_TEST(eina_stringshare_simple)
>>  }
>>  END_TEST
>>
>> +START_TEST(eina_stringshare_simple_refplace)
>> +{
>> +   const char *t0;
>> +   const char *t1;
>> +   Eina_Slice slice;
>> +
>> +   eina_init();
>> +
>> +   t0 = eina_stringshare_add(TEST0);
>> +   t1 = eina_stringshare_add(TEST1);
>> +
>> +   fail_if(t0 == NULL);
>> +   fail_if(t1 == NULL);
>> +   fail_if(strcmp(t0, TEST0) != 0);
>> +   fail_if(strcmp(t1, TEST1) != 0);
>> +   fail_if((int)strlen(TEST0) != eina_stringshare_strlen(t0));
>> +   fail_if((int)strlen(TEST1) != eina_stringshare_strlen(t1));
>
> see, these things I was talking about the other day.
>
> ck_assert_str_eq() and ck_assert_int_eq() are as simple and produces
> much better results.

This was mostly a copy and paste of an existing test with very little
change. That's why all the fail_if are there. Will try to take
stringshare as an example for how to improve test suite.
-- 
Cedric BAIL

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 01/01: build: enable -Wfloat-equal for compiling

2016-12-20 Thread Cedric BAIL
On Mon, Dec 19, 2016 at 11:12 PM, Jean-Philippe André  wrote:
> Hey Mike,
>
> On 20 December 2016 at 01:12, Mike Blumenkrantz <
> michael.blumenkra...@gmail.com> wrote:
>> discomfitor pushed a commit to branch master.
>>
>> http://git.enlightenment.org/core/efl.git/commit/?id=
>> 25792d64165ad4f5f647a36f087af2d2206a6618
>>
>> commit 25792d64165ad4f5f647a36f087af2d2206a6618
>> Author: Mike Blumenkrantz 
>> Date:   Mon Dec 19 11:08:43 2016 -0500
>>
>> build: enable -Wfloat-equal for compiling
>>
>>  #WarningOfTheMonth
>>
>
> Urgh. What the hell.
>
> Those warnings have a very limited value. How many real issues have you
> seen that resulted from this unsafe comparison? I'm pretty sure that float
> == 0 or float != 0 will succeed when we expect them to, and the equality
> tests will also work whenever we do direct assignments (without arithmetic).

I have found some real issue already in edje_calc, edje_load and
edje_edit (I believe some of the logic in eina matrix and quaternion
where also buggy in that regard, but less sure of it as I don't know
the user of the API that well). Overall, I wouldn't have even looked
for a problem there and did react at first like you when I saw those
warning. Still I realize that there was potential for edje and
ephysics to actually have bugs due to this that most people wouldn't
even know where to start looking at. Basically there is benefit for
this flag, but mostly in place where we are barelly looking.

> Now I understand why cedric made a series of patches with the float
> comparison thing. I'm sure he didn't have anything more important to do.
> Are you going to fix the remaining 523 warnings? Please don't send 100
> patches for that...

We really should. I have no idea at this point which one are real
potential bug and which one aren't. Now why I am doing it per files
and not as a huge batch, because if we do get it wrong for one widget
or one feature it is easier to just revert that file that the entire
patch. I am not sure it is a good idea to do it in one go.

> PS: I had only 2 warnings before that. Potentially not fixable (va_start
> with char arguments in EAPI functions). But at least I could easily spot
> anything new.

I am hoping to get it to a manageable level today and may switch to
more important work after that. Hopefully some more people can look at
it and fix the part that they feel confortable with.
-- 
Cedric BAIL

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [apps/terminology] master 01/01: termptyesc: support DECSED3 to erase the backlog. Closes T3713

2016-12-20 Thread Boris Faure
billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=99f55b7bbc4d375d3b4525e449001dad6e536cdd

commit 99f55b7bbc4d375d3b4525e449001dad6e536cdd
Author: Boris Faure 
Date:   Tue Dec 20 22:43:37 2016 +0100

termptyesc: support DECSED3 to erase the backlog. Closes T3713
---
 src/bin/termptyesc.c | 58 +---
 src/bin/termptyops.c | 43 +-
 src/bin/termptyops.h |  1 +
 3 files changed, 67 insertions(+), 35 deletions(-)

diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index 774bc79..7cb1357 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -980,30 +980,56 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, 
Eina_Unicode *ce)
  termpty_write(ty, bf, strlen(bf));
   }
 break;
-  case 'J': // "2j" erases the screen, 1j erase from screen start to curs, 
0j erase cursor to end of screen
-DBG("2j erases the screen, 1j erase from screen start to curs, 0j 
erase cursor to end of screen");
-arg = _csi_arg_get();
-if (b)
+  case 'J':
+if (*b == '?')
   {
- if ((arg >= TERMPTY_CLR_END) && (arg <= TERMPTY_CLR_ALL))
-   termpty_clear_screen(ty, arg);
- else
-   WRN("invalid clr scr %i", arg);
+ b++;
+ arg = _csi_arg_get();
+ WRN("Unsupported selected erase in display %d", arg);
   }
 else
-  termpty_clear_screen(ty, TERMPTY_CLR_END);
+  arg = _csi_arg_get();
+if (arg < 1) arg = 0;
+/* 3J erases the backlog,
+ * 2J erases the screen,
+ * 1J erase from screen start to cursor,
+ * 0J erase form cursor to end of screen
+ */
+DBG("ED/DECSED %d: erase in display", arg);
+switch (arg)
+  {
+   case TERMPTY_CLR_END:
+   case TERMPTY_CLR_BEGIN:
+   case TERMPTY_CLR_ALL:
+  termpty_clear_screen(ty, arg);
+  break;
+   case 3:
+  termpty_clear_backlog(ty);
+  break;
+   default:
+  ERR("invalid EL/DECSEL argument %d", arg);
+  }
 break;
   case 'K': // 0K erase to end of line, 1K erase from screen start to 
cursor, 2K erase all of line
+if (*b == '?')
+  {
+ b++;
+ arg = _csi_arg_get();
+ WRN("Unsupported selected erase in line %d", arg);
+  }
 arg = _csi_arg_get();
-DBG("0K erase to end of line, 1K erase from screen start to cursor, 2K 
erase all of line: %d", arg);
-if (b)
+if (arg < 1) arg = 0;
+DBG("EL/DECSEL %d: erase in line", arg);
+switch (arg)
   {
- if ((arg >= TERMPTY_CLR_END) && (arg <= TERMPTY_CLR_ALL))
-   termpty_clear_line(ty, arg, ty->w);
- else
-   WRN("invalid clr lin %i", arg);
+   case TERMPTY_CLR_END:
+   case TERMPTY_CLR_BEGIN:
+   case TERMPTY_CLR_ALL:
+  termpty_clear_line(ty, arg, ty->w);
+  break;
+   default:
+  ERR("invalid EL/DECSEL argument %d", arg);
   }
-else termpty_clear_line(ty, TERMPTY_CLR_END, ty->w);
 break;
   case 'h':
   case 'l':
diff --git a/src/bin/termptyops.c b/src/bin/termptyops.c
index 0a69ed2..698efbb 100644
--- a/src/bin/termptyops.c
+++ b/src/bin/termptyops.c
@@ -275,6 +275,29 @@ termpty_clear_tabs_on_screen(Termpty *ty)
  }
 }
 
+void
+termpty_clear_backlog(Termpty *ty)
+{
+   int backsize;
+
+   ty->backlog_beacon.screen_y = 0;
+   ty->backlog_beacon.backlog_y = 0;
+
+   termpty_backlog_lock();
+   if (ty->back)
+ {
+size_t i;
+for (i = 0; i < ty->backsize; i++)
+  termpty_save_free(>back[i]);
+free(ty->back);
+ty->back = NULL;
+ }
+   ty->backpos = 0;
+   backsize = ty->backsize;
+   ty->backsize = 0;
+   termpty_backlog_size_set(ty, backsize);
+   termpty_backlog_unlock();
+}
 
 void
 termpty_clear_screen(Termpty *ty, Termpty_Clear mode)
@@ -370,7 +393,6 @@ termpty_reset_att(Termatt *att)
 void
 termpty_reset_state(Termpty *ty)
 {
-   int backsize;
int i;
 
ty->cursor_state.cx = 0;
@@ -403,24 +425,7 @@ termpty_reset_state(Termpty *ty)
ty->mouse_ext = MOUSE_EXT_NONE;
ty->bracketed_paste = 0;
 
-   ty->backlog_beacon.screen_y = 0;
-   ty->backlog_beacon.backlog_y = 0;
-
-   termpty_backlog_lock();
-   if (ty->back)
- {
-size_t j;
-for (j = 0; j < ty->backsize; j++)
-  termpty_save_free(>back[j]);
-free(ty->back);
-ty->back = NULL;
- }
-   ty->backpos = 0;
-   backsize = ty->backsize;
-   ty->backsize = 0;
-   termpty_backlog_size_set(ty, backsize);
-   termpty_backlog_unlock();
-
+   termpty_clear_backlog(ty);
termpty_clear_tabs_on_screen(ty);
for 

[EGIT] [core/efl] master 05/07: Ecore Evas: Add support for multiple mouse positions.

2016-12-20 Thread Guilherme Iscaro
bdilly pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=044219226cf171aec201a9c4ee05b6e14e565e00

commit 044219226cf171aec201a9c4ee05b6e14e565e00
Author: Guilherme Iscaro 
Date:   Wed Nov 30 13:29:19 2016 -0200

Ecore Evas: Add support for multiple mouse positions.

Since it's possible to have more than one mouse, Ecore Evas
must take into account the position of all mouses and update them
correctly.
---
 src/lib/ecore_evas/ecore_evas.c  |  4 ++--
 src/lib/ecore_evas/ecore_evas_private.h  |  6 ++
 src/modules/ecore_evas/engines/fb/ecore_evas_fb.c| 13 +
 .../ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c  |  8 +++-
 .../engines/wayland/ecore_evas_wayland_common.c  | 20 
 .../ecore_evas/engines/win32/ecore_evas_win32.c  | 19 ---
 src/modules/ecore_evas/engines/x/ecore_evas_x.c  | 19 ---
 7 files changed, 68 insertions(+), 21 deletions(-)

diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index da485a8..15217ce 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -3140,8 +3140,6 @@ _ecore_evas_mouse_move_process_internal(Ecore_Evas *ee,
Eina_Bool send_event = EINA_TRUE;
Ecore_Evas_Cursor *cursor;
int fx, fy, fw, fh, evt_x, evt_y;
-   ee->mouse.x = x;
-   ee->mouse.y = y;
 
evas_output_framespace_get(ee->evas, , , , );
 
@@ -3149,6 +3147,8 @@ _ecore_evas_mouse_move_process_internal(Ecore_Evas *ee,
  pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_MOUSE);
cursor = eina_hash_find(ee->prop.cursors, );
EINA_SAFETY_ON_NULL_RETURN(cursor);
+   cursor->pos_x = x;
+   cursor->pos_y = y;
if (cursor->object)
  {
 evas_object_show(cursor->object);
diff --git a/src/lib/ecore_evas/ecore_evas_private.h 
b/src/lib/ecore_evas/ecore_evas_private.h
index 74af4dc..aa1d795 100644
--- a/src/lib/ecore_evas/ecore_evas_private.h
+++ b/src/lib/ecore_evas/ecore_evas_private.h
@@ -194,6 +194,8 @@ struct _Ecore_Evas_Cursor {
struct {
   int   x, y;
} hot;
+   int pos_x;
+   int pos_y;
 };
 
 struct _Ecore_Evas
@@ -228,10 +230,6 @@ struct _Ecore_Evas
} shadow;
 
struct {
-  int  x, y;
-   } mouse;
-
-   struct {
   int  w, h;
} expecting_resize;
 
diff --git a/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c 
b/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c
index d1ab63a..3ab0cdf 100644
--- a/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c
+++ b/src/modules/ecore_evas/engines/fb/ecore_evas_fb.c
@@ -60,14 +60,13 @@ _ecore_evas_mouse_move_process_fb(Ecore_Evas *ee, int x, 
int y)
Ecore_Evas_Cursor *cursor;
int fbw, fbh;
 
-   ee->mouse.x = x;
-   ee->mouse.y = y;
ecore_fb_size_get(, );
 
pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_MOUSE);
cursor = eina_hash_find(ee->prop.cursors, );
EINA_SAFETY_ON_NULL_RETURN(cursor);
-
+   cursor->pos_x = x;
+   cursor->pos_y = y;
if (cursor->object)
  {
 evas_object_show(cursor->object);
@@ -361,9 +360,15 @@ _ecore_evas_move_resize(Ecore_Evas *ee, int x EINA_UNUSED, 
int y EINA_UNUSED, in
 static void
 _ecore_evas_rotation_set(Ecore_Evas *ee, int rotation, int resize EINA_UNUSED)
 {
+   Evas_Device *pointer;
+   Ecore_Evas_Cursor *cursor;
Evas_Engine_Info_FB *einfo;
int rot_dif;
 
+   pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_MOUSE);
+   cursor = eina_hash_find(ee->prop.cursors, );
+   EINA_SAFETY_ON_NULL_RETURN(cursor);
+
if (ee->rotation == rotation) return;
einfo = (Evas_Engine_Info_FB *)evas_engine_info_get(ee->evas);
if (!einfo) return;
@@ -416,7 +421,7 @@ _ecore_evas_rotation_set(Ecore_Evas *ee, int rotation, int 
resize EINA_UNUSED)
else
  evas_damage_rectangle_add(ee->evas, 0, 0, ee->h, ee->w);
 
-   _ecore_evas_mouse_move_process_fb(ee, ee->mouse.x, ee->mouse.y);
+   _ecore_evas_mouse_move_process_fb(ee, cursor->pos_x, cursor->pos_y);
if (ee->func.fn_resize) ee->func.fn_resize(ee);
 }
 
diff --git a/src/modules/ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c 
b/src/modules/ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c
index 935a757..2ea7429 100644
--- a/src/modules/ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c
+++ b/src/modules/ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c
@@ -255,6 +255,8 @@ _ecore_evas_psl1ght_callback_delete_request_set(Ecore_Evas 
*ee, Ecore_Evas_Event
 static void
 _ecore_evas_screen_resized(Ecore_Evas *ee)
 {
+   Evas_Device *pointer;
+   Ecore_Evas_Cursor *cursor;
int w, h;
 
/* Do not resize if the window is not fullscreen */
@@ -262,6 +264,10 @@ _ecore_evas_screen_resized(Ecore_Evas *ee)
 
ecore_psl1ght_screen_resolution_get (, );
 
+   pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_MOUSE);
+   cursor = eina_hash_find(ee->prop.cursors, );
+   

[EGIT] [core/efl] master 03/07: Ecore Evas VNC: Add support for ecore_evas_pointer_device_xy_get().

2016-12-20 Thread Guilherme Iscaro
bdilly pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2e527851cfdfaa6efc0e261cea978e5cf11afac2

commit 2e527851cfdfaa6efc0e261cea978e5cf11afac2
Author: Guilherme Iscaro 
Date:   Mon Nov 21 17:05:18 2016 -0200

Ecore Evas VNC: Add support for ecore_evas_pointer_device_xy_get().

This commit adds the support to fetch the mouse position of a VNC
client.
---
 src/lib/ecore_evas/ecore_evas.c| 14 -
 .../ecore_evas/vnc_server/ecore_evas_vnc_server.c  | 33 ++
 2 files changed, 46 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 43ec72a..b493383 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -2393,7 +2393,19 @@ ecore_evas_pointer_device_xy_get(const Ecore_Evas *ee,
 if (x) *x = 0;
 if (y) *y = 0;
 ECORE_EVAS_CHECK(ee);
-if (ee->engine.func->fn_pointer_device_xy_get)
+if (ee->vnc_server)
+  {
+ Eina_Module *mod;
+ void (*pointer_xy_get)(const void *, const Efl_Input_Device *, 
Evas_Coord *, Evas_Coord *y);
+
+ mod = _ecore_evas_vnc_server_module_load();
+ EINA_SAFETY_ON_NULL_RETURN(mod);
+
+ pointer_xy_get = eina_module_symbol_get(mod, 
"ecore_evas_vnc_server_pointer_xy_get");
+ EINA_SAFETY_ON_NULL_RETURN(pointer_xy_get);
+ pointer_xy_get(ee->vnc_server, pointer, x, y);
+  }
+else if (ee->engine.func->fn_pointer_device_xy_get)
   ee->engine.func->fn_pointer_device_xy_get(ee, pointer, x, y);
  }
 }
diff --git a/src/modules/ecore_evas/vnc_server/ecore_evas_vnc_server.c 
b/src/modules/ecore_evas/vnc_server/ecore_evas_vnc_server.c
index c55fb9c..88c02d2 100644
--- a/src/modules/ecore_evas/vnc_server/ecore_evas_vnc_server.c
+++ b/src/modules/ecore_evas/vnc_server/ecore_evas_vnc_server.c
@@ -893,5 +893,38 @@ ecore_evas_vnc_server_del(Ecore_Evas_Vnc_Server *server)
free(server);
 }
 
+EAPI void
+ecore_evas_vnc_server_pointer_xy_get(const Ecore_Evas_Vnc_Server *server,
+ const Evas_Device *pointer,
+ Evas_Coord *x, Evas_Coord *y)
+{
+   Evas_Coord sx, sy;
+   rfbClientIteratorPtr itr;
+   rfbClientRec *client;
+   Ecore_Evas_Vnc_Server_Client_Data *cdata;
+
+   EINA_SAFETY_ON_NULL_RETURN(server);
+   EINA_SAFETY_ON_NULL_RETURN(pointer);
+
+   sx = sy = 0;
+   itr = rfbGetClientIterator(server->vnc_screen);
+
+   while ((client = rfbClientIteratorNext(itr)))
+ {
+cdata = client->clientData;
+
+if (cdata->mouse == pointer)
+  {
+ sx = client->lastPtrX;
+ sy = client->lastPtrY;
+ break;
+  }
+ }
+
+   rfbReleaseClientIterator(itr);
+   if (x) *x = sx;
+   if (y) *y = sy;
+}
+
 EINA_MODULE_INIT(_ecore_evas_vnc_server_init);
 EINA_MODULE_SHUTDOWN(_ecore_evas_vnc_server_shutdown);

-- 




[EGIT] [core/efl] master 02/07: Ecore Wl2: Add ecore_wl2_window_pointer_device_xy_get() API.

2016-12-20 Thread Guilherme Iscaro
bdilly pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=133b4fa65bc92baa3775e178e5e19521da0d7f78

commit 133b4fa65bc92baa3775e178e5e19521da0d7f78
Author: Guilherme Iscaro 
Date:   Mon Nov 21 15:57:05 2016 -0200

Ecore Wl2: Add ecore_wl2_window_pointer_device_xy_get() API.

This commit adds a Wayland specific function to fetch a mouse
position.
---
 src/lib/ecore_wl2/Ecore_Wl2.h  | 13 +
 src/lib/ecore_wl2/ecore_wl2_input.c|  9 --
 src/lib/ecore_wl2/ecore_wl2_private.h  |  9 ++
 src/lib/ecore_wl2/ecore_wl2_window.c   | 32 ++
 .../engines/wayland/ecore_evas_wayland_common.c| 15 +-
 .../engines/wayland/ecore_evas_wayland_private.h   |  2 ++
 6 files changed, 70 insertions(+), 10 deletions(-)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index 37a0ed1..b499e46 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -837,11 +837,24 @@ EAPI void ecore_wl2_window_iconified_set(Ecore_Wl2_Window 
*window, Eina_Bool ico
  * @param y where to return the vertical position. May be NULL. Returns 0 on 
error.
  *
  * @ingroup Ecore_Wl2_Window_Group
+ * @see ecore_wl2_window_pointer_device_xy_get
  * @since 1.17
  */
 EAPI void ecore_wl2_window_pointer_xy_get(Ecore_Wl2_Window *window, int *x, 
int *y);
 
 /**
+ * Retrieves the mouse position of the current window.
+ *
+ * @param window The window on which to retrieve the mouse position.
+ * @param pointer The Efl.Input.Pointer device to fetch the position.
+ * @param x where to return the horizontal position. May be NULL. Returns 0 on 
error.
+ * @param y where to return the vertical position. May be NULL. Returns 0 on 
error.
+ * @ingroup Ecore_Wl2_Window_Group
+ * @since 1.19
+ */
+EAPI void ecore_wl2_window_pointer_device_xy_get(Ecore_Wl2_Window *window, 
const Eo *pointer, int *x, int *y);
+
+/**
  * Set a given wl_surface to use as the pointer on a window
  *
  * @param window The window to set this surface as the pointer on
diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c 
b/src/lib/ecore_wl2/ecore_wl2_input.c
index 4e24d1f..91ed398 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -18,15 +18,6 @@
 #include 
 #include "ecore_wl2_private.h"
 
-typedef struct _Ecore_Wl2_Input_Devices
-{
-   Eo *pointer_dev;
-   Eo *keyboard_dev;
-   Eo *touch_dev;
-   Eo *seat_dev;
-   int window_id;
-} Ecore_Wl2_Input_Devices;
-
 typedef struct _Ecore_Wl2_Mouse_Down_Info
 {
EINA_INLIST;
diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h 
b/src/lib/ecore_wl2/ecore_wl2_private.h
index 316c79e..a783b0c 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -67,6 +67,15 @@ extern Eina_Bool no_session_recovery;
 # endif
 # define CRI(...) EINA_LOG_DOM_CRIT(_ecore_wl2_log_dom, __VA_ARGS__)
 
+typedef struct _Ecore_Wl2_Input_Devices
+{
+   Eo *pointer_dev;
+   Eo *keyboard_dev;
+   Eo *touch_dev;
+   Eo *seat_dev;
+   int window_id;
+} Ecore_Wl2_Input_Devices;
+
 struct _Ecore_Wl2_Display
 {
int refs;
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c 
b/src/lib/ecore_wl2/ecore_wl2_window.c
index 944324a..253d598 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -942,6 +942,38 @@ ecore_wl2_window_pointer_xy_get(Ecore_Wl2_Window *window, 
int *x, int *y)
 }
 
 EAPI void
+ecore_wl2_window_pointer_device_xy_get(Ecore_Wl2_Window *window,
+   const Eo *pointer,
+   int *x, int *y)
+{
+   Ecore_Wl2_Input_Devices *devs;
+   Eina_List *l;
+   Ecore_Wl2_Input *input;
+
+   EINA_SAFETY_ON_NULL_RETURN(window);
+   EINA_SAFETY_ON_NULL_RETURN(pointer);
+
+   if (x) *x = 0;
+   if (y) *y = 0;
+
+   EINA_INLIST_FOREACH(window->display->inputs, input)
+ {
+if (!input->wl.pointer)
+  continue;
+
+EINA_LIST_FOREACH(input->devices_list, l, devs)
+  {
+ if ((devs->window_id == window->id) &&
+ (devs->pointer_dev == pointer))
+   {
+  if (x) *x = input->pointer.sx;
+  if (y) *y = input->pointer.sy;
+   }
+  }
+ }
+}
+
+EAPI void
 ecore_wl2_window_pointer_set(Ecore_Wl2_Window *window, struct wl_surface 
*surface, int hot_x, int hot_y)
 {
Ecore_Wl2_Input *input;
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c 
b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
index 565ff81..6bd4528 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
@@ -90,7 +90,7 @@ static Ecore_Evas_Engine_Func _ecore_wl_engine_func =
NULL, //fn_callback_focus_device_out_set
NULL, 

[EGIT] [core/efl] master 06/07: Ecore Evas: Add a new cursor example.

2016-12-20 Thread Guilherme Iscaro
bdilly pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=87e458838dd4f5edff6b8ac9dae21380d69fa4ea

commit 87e458838dd4f5edff6b8ac9dae21380d69fa4ea
Author: Guilherme Iscaro 
Date:   Fri Dec 2 17:17:53 2016 -0200

Ecore Evas: Add a new cursor example.

This example sets the cursor image of each available mouse and
report its position every one second.
---
 src/examples/ecore/.gitignore  |   1 +
 src/examples/ecore/Makefile.am |  12 +-
 src/examples/ecore/ecore_evas_cursor_example.c | 166 +
 3 files changed, 175 insertions(+), 4 deletions(-)

diff --git a/src/examples/ecore/.gitignore b/src/examples/ecore/.gitignore
index eeaf839..5d577a6 100644
--- a/src/examples/ecore/.gitignore
+++ b/src/examples/ecore/.gitignore
@@ -20,6 +20,7 @@
 /ecore_evas_buffer_example_01
 /ecore_evas_buffer_example_02
 /ecore_evas_callbacks
+/ecore_evas_cursor_example
 /ecore_evas_ews_example
 /ecore_evas_extn_plug_example
 /ecore_evas_extn_socket_example
diff --git a/src/examples/ecore/Makefile.am b/src/examples/ecore/Makefile.am
index f0f4557..c90e0c6 100644
--- a/src/examples/ecore/Makefile.am
+++ b/src/examples/ecore/Makefile.am
@@ -57,9 +57,10 @@ ecore_con_url_ftp_example \
 ecore_evas_basics_example \
 ecore_evas_buffer_example_01 \
 ecore_evas_buffer_example_02 \
+ecore_evas_callbacks \
+ecore_evas_cursor_example \
 ecore_evas_extn_socket_example \
 ecore_evas_extn_plug_example \
-ecore_evas_callbacks \
 ecore_evas_ews_example \
 ecore_evas_object_example \
 ecore_evas_wayland_multiseat_example \
@@ -209,15 +210,18 @@ ecore_evas_buffer_example_01_LDADD = 
$(ECORE_EVAS_COMMON_LDADD)
 ecore_evas_buffer_example_02_SOURCES = ecore_evas_buffer_example_02.c
 ecore_evas_buffer_example_02_LDADD = $(ECORE_EVAS_COMMON_LDADD)
 
+ecore_evas_callbacks_SOURCES = ecore_evas_callbacks.c
+ecore_evas_callbacks_LDADD = $(ECORE_EVAS_COMMON_LDADD)
+
+ecore_evas_cursor_example_SOURCES = ecore_evas_cursor_example.c
+ecore_evas_cursor_example_LDADD = $(ECORE_EVAS_COMMON_LDADD)
+
 ecore_evas_extn_socket_example_SOURCES = ecore_evas_extn_socket_example.c
 ecore_evas_extn_socket_example_LDADD = $(ECORE_EVAS_COMMON_LDADD)
 
 ecore_evas_extn_plug_example_SOURCES = ecore_evas_extn_plug_example.c
 ecore_evas_extn_plug_example_LDADD = $(ECORE_EVAS_COMMON_LDADD)
 
-ecore_evas_callbacks_SOURCES = ecore_evas_callbacks.c
-ecore_evas_callbacks_LDADD = $(ECORE_EVAS_COMMON_LDADD)
-
 ecore_evas_ews_example_SOURCES = ecore_evas_ews_example.c
 ecore_evas_ews_example_LDADD = $(ECORE_EVAS_COMMON_LDADD)
 
diff --git a/src/examples/ecore/ecore_evas_cursor_example.c 
b/src/examples/ecore/ecore_evas_cursor_example.c
new file mode 100644
index 000..e5e83c5
--- /dev/null
+++ b/src/examples/ecore/ecore_evas_cursor_example.c
@@ -0,0 +1,166 @@
+/**
+ * Ecore Evas example illustrating how to set a new cursor image for a pointer 
device.
+ *
+ * @verbatim
+ * gcc -o ecore_evas_cursor_example ecore_evas_cursor_example.c `pkg-config 
--libs --cflags evas ecore ecore-evas`
+ * @endverbatim
+ */
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+#define W (200)
+#define H (200)
+#define TIMEOUT (1.0)
+
+static void
+_delete_request_cb(Ecore_Evas *ee EINA_UNUSED)
+{
+   ecore_main_loop_quit();
+}
+
+static void
+_resize_cb(Ecore_Evas *ee)
+{
+   int w, h;
+
+   ecore_evas_geometry_get(ee, NULL, NULL, , );
+   evas_object_resize(ecore_evas_data_get(ee, "bg"), w, h);
+}
+
+static Eina_Bool
+_mouse_pos_print(void *data)
+{
+   Efl_Input_Device *pointer;
+   const Eina_List *devs, *l;
+
+   devs = evas_device_list(ecore_evas_get(data), NULL);
+
+   EINA_LIST_FOREACH(devs, l, pointer)
+ {
+Evas_Coord x, y;
+Efl_Input_Device *seat;
+
+if (efl_input_device_type_get(pointer) != EFL_INPUT_DEVICE_CLASS_MOUSE)
+  continue;
+ecore_evas_pointer_device_xy_get(data, pointer, , );
+seat = efl_input_device_seat_get(pointer);
+if (!seat)
+  {
+ fprintf(stderr, "Could not fetch the seat from mouse '%s'\n",
+ efl_input_device_name_get(pointer));
+ continue;
+  }
+printf("Mouse from seat '%s' is at (%d, %d)\n",
+   efl_input_device_name_get(seat), x, y);
+ }
+   return EINA_TRUE;
+}
+
+static void
+_cursor_set(Ecore_Evas *ee, Efl_Input_Device *pointer)
+{
+   Evas_Object *obj;
+
+   obj = evas_object_rectangle_add(ecore_evas_get(ee));
+   evas_object_color_set(obj, rand() % 256, rand() % 256, rand() % 256, 255);
+   evas_object_resize(obj, 30, 30);
+   evas_object_show(obj);
+   ecore_evas_object_cursor_device_set(ee, pointer, obj, 0, 10, 10);
+}
+
+static void
+_device_added(void *data, const Efl_Event *event)
+{
+   Efl_Input_Device *pointer = event->info;
+   Efl_Input_Device *seat;
+
+   if (efl_input_device_type_get(pointer) != 

[EGIT] [core/efl] master 01/07: Ecore Evas: Add API to set/get the pointer position per device.

2016-12-20 Thread Guilherme Iscaro
bdilly pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=64986bccac5bdaddaa46dc1b9c411e00191f6590

commit 64986bccac5bdaddaa46dc1b9c411e00191f6590
Author: Guilherme Iscaro 
Date:   Mon Nov 21 15:11:08 2016 -0200

Ecore Evas: Add API to set/get the pointer position per device.

Since Ecore Evas now support multiple mouse devices new APIs were
added in order to fetch the mouse position.
---
 src/lib/ecore_evas/Ecore_Evas.h | 14 +-
 src/lib/ecore_evas/ecore_evas.c | 17 +
 src/lib/ecore_evas/ecore_evas_buffer.c  |  1 +
 src/lib/ecore_evas/ecore_evas_ews.c |  1 +
 src/lib/ecore_evas/ecore_evas_private.h |  1 +
 src/modules/ecore_evas/engines/cocoa/ecore_evas_cocoa.c |  1 +
 src/modules/ecore_evas/engines/drm/ecore_evas_drm.c |  1 +
 src/modules/ecore_evas/engines/extn/ecore_evas_extn.c   |  1 +
 src/modules/ecore_evas/engines/fb/ecore_evas_fb.c   |  1 +
 .../ecore_evas/engines/psl1ght/ecore_evas_psl1ght.c |  1 +
 src/modules/ecore_evas/engines/sdl/ecore_evas_sdl.c |  1 +
 .../engines/wayland/ecore_evas_wayland_common.c |  1 +
 src/modules/ecore_evas/engines/win32/ecore_evas_win32.c |  1 +
 src/modules/ecore_evas/engines/x/ecore_evas_x.c |  1 +
 14 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore_evas/Ecore_Evas.h b/src/lib/ecore_evas/Ecore_Evas.h
index c2295f8..19493f8 100644
--- a/src/lib/ecore_evas/Ecore_Evas.h
+++ b/src/lib/ecore_evas/Ecore_Evas.h
@@ -2917,12 +2917,13 @@ EAPI Evas_Object *ecore_evas_extn_plug_new(Ecore_Evas 
*ee_target);
 EAPI Eina_Bool ecore_evas_extn_plug_connect(Evas_Object *obj, const char 
*svcname, int svcnum, Eina_Bool svcsys);
 
 /**
- * @brief Retrieve the coordinates of the mouse pointer
+ * @brief Retrieve the coordinates of the default mouse pointer
  *
  * @param ee The Ecore_Evas containing the pointer
  * @param x Pointer to integer to store horizontal coordinate. May be @c NULL.
  * @param y Pointer to integer to store vertical coordinate. May be @c NULL.
  *
+ * @see ecore_evas_pointer_device_xy_get
  * @since 1.8
  */
 EAPI void ecore_evas_pointer_xy_get(const Ecore_Evas *ee, Evas_Coord *x, 
Evas_Coord *y);
@@ -2941,6 +2942,17 @@ EAPI void ecore_evas_pointer_xy_get(const Ecore_Evas 
*ee, Evas_Coord *x, Evas_Co
 EAPI Eina_Bool ecore_evas_pointer_warp(const Ecore_Evas *ee, Evas_Coord x, 
Evas_Coord y);
 
 /**
+ * @brief Retrieve the coordinates of the mouse pointer
+ *
+ * @param ee The Ecore_Evas containing the pointer
+ * @param pointer The pointer device, use @c NULL for the default pointer.
+ * @param x Pointer to integer to store horizontal coordinate. May be @c NULL.
+ * @param y Pointer to integer to store vertical coordinate. May be @c NULL.
+ * @since 1.19
+ */
+EAPI void ecore_evas_pointer_device_xy_get(const Ecore_Evas *ee, const 
Efl_Input_Device *pointer, Evas_Coord *x, Evas_Coord *y);
+
+/**
  * @brief Retrieve the Visual used for pixmap creation
  *
  * @param ee The Ecore_Evas containing the pixmap
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index ea4ce4b..43ec72a 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -2381,6 +2381,23 @@ ecore_evas_pointer_warp(const Ecore_Evas *ee, Evas_Coord 
x, Evas_Coord y)
return EINA_FALSE;
 }
 
+EAPI void
+ecore_evas_pointer_device_xy_get(const Ecore_Evas *ee,
+ const Efl_Input_Device *pointer, Evas_Coord 
*x,
+ Evas_Coord *y)
+{
+   if (!pointer || pointer == evas_default_device_get(ee->evas, 
EFL_INPUT_DEVICE_CLASS_MOUSE))
+ ecore_evas_pointer_xy_get(ee, x, y);
+   else
+ {
+if (x) *x = 0;
+if (y) *y = 0;
+ECORE_EVAS_CHECK(ee);
+if (ee->engine.func->fn_pointer_device_xy_get)
+  ee->engine.func->fn_pointer_device_xy_get(ee, pointer, x, y);
+ }
+}
+
 EAPI void *
 ecore_evas_pixmap_visual_get(const Ecore_Evas *ee)
 {
diff --git a/src/lib/ecore_evas/ecore_evas_buffer.c 
b/src/lib/ecore_evas/ecore_evas_buffer.c
index 0d1643c..979f925 100644
--- a/src/lib/ecore_evas/ecore_evas_buffer.c
+++ b/src/lib/ecore_evas/ecore_evas_buffer.c
@@ -607,6 +607,7 @@ static Ecore_Evas_Engine_Func _ecore_buffer_engine_func =
  NULL, //fn_callback_focus_device_out_set
  NULL, //fn_callback_device_mouse_in_set
  NULL, //fn_callback_device_mouse_out_set
+ NULL, //fn_pointer_device_xy_get
 };
 
 static void *
diff --git a/src/lib/ecore_evas/ecore_evas_ews.c 
b/src/lib/ecore_evas/ecore_evas_ews.c
index 693e9db..719d5ea 100644
--- a/src/lib/ecore_evas/ecore_evas_ews.c
+++ b/src/lib/ecore_evas/ecore_evas_ews.c
@@ -719,6 +719,7 @@ static const Ecore_Evas_Engine_Func _ecore_ews_engine_func =
  NULL, //fn_callback_focus_device_out_set
  NULL, //fn_callback_device_mouse_in_set
  NULL, 

[EGIT] [core/efl] master 04/07: Ecore Evas: Add support to set cursor icon per mouse device.

2016-12-20 Thread Guilherme Iscaro
bdilly pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e5acc5604a5bb728f1affc0a839878de55f5dafc

commit e5acc5604a5bb728f1affc0a839878de55f5dafc
Author: Guilherme Iscaro 
Date:   Tue Nov 22 16:14:03 2016 -0200

Ecore Evas: Add support to set cursor icon per mouse device.

Since Ecore Evas now supports multiple mouses new APIs were added
in order to be able to set the cursor image to any device.
---
 src/lib/ecore_evas/Ecore_Evas.h|  50 +-
 src/lib/ecore_evas/ecore_evas.c| 530 ++---
 src/lib/ecore_evas/ecore_evas_buffer.c |   5 +
 src/lib/ecore_evas/ecore_evas_ews.c|  56 +--
 src/lib/ecore_evas/ecore_evas_private.h|  27 +-
 .../ecore_evas/engines/cocoa/ecore_evas_cocoa.c|  69 +--
 .../ecore_evas/engines/drm/ecore_evas_drm.c|  66 +--
 src/modules/ecore_evas/engines/fb/ecore_evas_fb.c  | 100 +---
 .../engines/psl1ght/ecore_evas_psl1ght.c   |  64 +--
 .../ecore_evas/engines/sdl/ecore_evas_sdl.c|  64 +--
 .../engines/wayland/ecore_evas_wayland_common.c|  74 +--
 .../ecore_evas/engines/win32/ecore_evas_win32.c|  67 +--
 src/modules/ecore_evas/engines/x/ecore_evas_x.c|  67 +--
 13 files changed, 607 insertions(+), 632 deletions(-)

diff --git a/src/lib/ecore_evas/Ecore_Evas.h b/src/lib/ecore_evas/Ecore_Evas.h
index 19493f8..0af4bcc 100644
--- a/src/lib/ecore_evas/Ecore_Evas.h
+++ b/src/lib/ecore_evas/Ecore_Evas.h
@@ -2143,7 +2143,7 @@ EAPI voidecore_evas_size_step_set(Ecore_Evas *ee, 
int w, int h);
 EAPI voidecore_evas_size_step_get(const Ecore_Evas *ee, int *w, int 
*h);
 
 /**
- * @brief Set the cursor of an Ecore_Evas.
+ * @brief Set the cursor for the default pointer device.
  *
  * @param ee The Ecore_Evas
  * @param file  The path to an image file for the cursor.
@@ -2166,9 +2166,9 @@ EAPI voidecore_evas_size_step_get(const 
Ecore_Evas *ee, int *w, int *h);
  */
 EAPI voidecore_evas_cursor_set(Ecore_Evas *ee, const char *file, int 
layer, int hot_x, int hot_y);
 /**
- * @brief Get information about an Ecore_Evas' cursor
+ * @brief Get information about an Ecore_Evas' default pointer device.
  *
- * @param ee The Ecore_Evas to set
+ * @param ee The Ecore_Evas to get
  * @param obj A pointer to an Evas_Object to place the cursor Evas_Object.
  * @param layer A pointer to an int to place the cursor's layer in.
  * @param hot_x A pointer to an int to place the cursor's hot_x coordinate in.
@@ -2183,10 +2183,9 @@ EAPI voidecore_evas_cursor_set(Ecore_Evas *ee, 
const char *file, int lay
 EAPI voidecore_evas_cursor_get(const Ecore_Evas *ee, Evas_Object 
**obj, int *layer, int *hot_x, int *hot_y);
 
 /**
- * @brief Set the cursor of an Ecore_Evas
+ * @brief Set the cursor for the default pointer device.
  *
  * @param ee The Ecore_Evas
- *
  * @param obj The Evas_Object which will be the cursor.
  * @param layer The layer in which the cursor will appear.
  * @param hot_x The x coordinate of the cursor's hot spot.
@@ -2202,7 +2201,7 @@ EAPI voidecore_evas_cursor_get(const Ecore_Evas 
*ee, Evas_Object **obj,
 EAPI voidecore_evas_object_cursor_set(Ecore_Evas *ee, Evas_Object 
*obj, int layer, int hot_x, int hot_y);
 
 /**
- * @brief Unset the Ecore_Evas cursor
+ * @brief Unset the cursor of the default pointer device.
  *
  * @param ee The Ecore_Evas to unset the cursor.
  *
@@ -2218,6 +2217,45 @@ EAPI voidecore_evas_object_cursor_set(Ecore_Evas 
*ee, Evas_Object *obj,
 EAPI Evas_Object*ecore_evas_cursor_unset(Ecore_Evas *ee);
 
 /**
+ * @brief Set the cursor of an Ecore_Evas specified pointer device.
+ *
+ * @param ee The Ecore_Evas
+ * @param pointer A pointer device to set the cursor. Use @c NULL for the 
default.
+ * @param obj The Evas_Object which will be the cursor.
+ * @param layer The layer in which the cursor will appear.
+ * @param hot_x The x coordinate of the cursor's hot spot.
+ * @param hot_y The y coordinate of the cursor's hot spot.
+ *
+ * This function makes the mouse cursor over @p ee be the object specified by
+ * @p obj. The actual point within the object that the mouse is at is specified
+ * by @p hot_x and @p hot_y, which are coordinates with respect to the top left
+ * corner of the cursor object. Cursor object will be delete with the 
Ecore_Evas.
+ *
+ * @since 1.19
+ */
+EAPI void ecore_evas_object_cursor_device_set(Ecore_Evas *ee, Efl_Input_Device 
*pointer,
+  Evas_Object *obj, int layer,
+  int hot_x, int hot_y);
+/**
+ * @brief Get information about an Ecore_Evas' specified pointer device.
+ *
+ * @param ee The Ecore_Evas
+ * @param pointer A pointer device to set the cursor. Use @c NULL for the 
default.
+ * @param obj A pointer to an Evas_Object to place the cursor Evas_Object.
+ * @param layer A pointer to 

[EGIT] [core/efl] master 07/07: Merge branch 'devs/iscaro/ecore_evas_cursor'

2016-12-20 Thread Bruno Dilly
bdilly pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e254e50ae556d178449ddc12bda321c9d538e750

commit e254e50ae556d178449ddc12bda321c9d538e750
Merge: e64327b 87e4588
Author: Bruno Dilly 
Date:   Tue Dec 20 18:35:14 2016 -0200

Merge branch 'devs/iscaro/ecore_evas_cursor'

This series add new APIs to get the pointer position and set the
pointer icon by device

Patches by Guilherme Iscaro 

Reviewed By: bdilly, jpeg, zmike

Differential Revision: https://phab.enlightenment.org/D4450

 src/examples/ecore/.gitignore  |   1 +
 src/examples/ecore/Makefile.am |  12 +-
 src/examples/ecore/ecore_evas_cursor_example.c | 166 ++
 src/lib/ecore_evas/Ecore_Evas.h|  64 ++-
 src/lib/ecore_evas/ecore_evas.c| 561 ++---
 src/lib/ecore_evas/ecore_evas_buffer.c |   6 +
 src/lib/ecore_evas/ecore_evas_ews.c|  57 +--
 src/lib/ecore_evas/ecore_evas_private.h|  34 +-
 src/lib/ecore_wl2/Ecore_Wl2.h  |  13 +
 src/lib/ecore_wl2/ecore_wl2_input.c|   9 -
 src/lib/ecore_wl2/ecore_wl2_private.h  |   9 +
 src/lib/ecore_wl2/ecore_wl2_window.c   |  32 ++
 .../ecore_evas/engines/cocoa/ecore_evas_cocoa.c|  70 +--
 .../ecore_evas/engines/drm/ecore_evas_drm.c|  67 +--
 .../ecore_evas/engines/extn/ecore_evas_extn.c  |   1 +
 src/modules/ecore_evas/engines/fb/ecore_evas_fb.c  | 112 ++--
 .../engines/psl1ght/ecore_evas_psl1ght.c   |  73 +--
 .../ecore_evas/engines/sdl/ecore_evas_sdl.c|  65 +--
 .../engines/wayland/ecore_evas_wayland_common.c| 108 ++--
 .../engines/wayland/ecore_evas_wayland_private.h   |   2 +
 .../ecore_evas/engines/win32/ecore_evas_win32.c|  87 +---
 src/modules/ecore_evas/engines/x/ecore_evas_x.c|  87 +---
 .../ecore_evas/vnc_server/ecore_evas_vnc_server.c  |  33 ++
 23 files changed, 1004 insertions(+), 665 deletions(-)

-- 




[EGIT] [apps/terminology] master 01/01: termio: fix getting selection of known link. CID1367486

2016-12-20 Thread Boris Faure
billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=e5f3676e32d15e4763cfdbbef0b1fbac194ea554

commit e5f3676e32d15e4763cfdbbef0b1fbac194ea554
Author: Boris Faure 
Date:   Tue Dec 20 20:20:34 2016 +0100

termio: fix getting selection of known link. CID1367486
---
 src/bin/termio.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/bin/termio.c b/src/bin/termio.c
index f2dfaa9..507e7f6 100644
--- a/src/bin/termio.c
+++ b/src/bin/termio.c
@@ -2351,7 +2351,7 @@ termio_take_selection(Evas_Object *obj, Elm_Sel_Type type)
  len = strlen(sd->link.string);
  s = strndup(sd->link.string, len);
   }
-return EINA_FALSE;
+goto end;
  }
 
if (sd->pty->selection.is_box)
@@ -2384,6 +2384,7 @@ termio_take_selection(Evas_Object *obj, Elm_Sel_Type type)
  EINA_TRUE);
  }
 
+end:
if (s)
  {
 if ((sd->win) && (len > 0))

-- 




Re: [E-devel] Open Coveritty isues in efl

2016-12-20 Thread Felipe Magno de Almeida
On Fri, Dec 16, 2016 at 7:08 AM, Stefan Schmidt  wrote:
> Hello.
>
> On 22/11/16 17:38, Stefan Schmidt wrote:
>>
>>
>> CXX: (Felipe could you have a look?)
>> 1361235 Big parameter passed by value
>> 1361234 Big parameter passed by value
>> 1361233 Big parameter passed by value
>> 1361232 Big parameter passed by value
>> 1361231 Big parameter passed by value
>> 1361230 Big parameter passed by value
>> 1361229 Big parameter passed by value
>> 1361228 Big parameter passed by value
>> 1361227 Big parameter passed by value
>> 1361226 Big parameter passed by value
>> 1361225 Big parameter passed by value
>
> Felipe,

Hello Stefan,

> could you have a look at these bunch? From what I can see some of
> the parameters are as big as 460 bytes. Why would we need to pass them as a
> value?

I've modified the ones that aren't necessary. Others are because they
can't guarantee the lifetime of the object, which is likely to be a
temporary. They could be passed as reference and then copied, but
that eliminates the RVO optimization, so it is actually better to
pass by-value. BTW, this code is only ran by the C++ generator, so
its efficiency is not really relevant too because it runs extremely fast
already and only runs when building. I also took care of of another
two CIDs related to eina-cxx.

> regards
> Stefan Schmidt

Regards,
-- 
Felipe Magno de Almeida

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 02/04: eina-cxx: Add visit_unsafe to eina::variant and make ~variant possibly noexcept

2016-12-20 Thread Felipe Magno de Almeida
felipealmeida pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ae822a396ce253d563ecbaf4965cc22c6894b764

commit ae822a396ce253d563ecbaf4965cc22c6894b764
Author: Felipe Magno de Almeida 
Date:   Tue Dec 20 15:33:57 2016 -0300

eina-cxx: Add visit_unsafe to eina::variant and make ~variant possibly 
noexcept

visit_unsafe member function visits the variant but assumes the
pre-condition that the variant is not empty. This avoids the
possibility of throwing an exception when the destructors
of the types used in variant are also guaranteed to be
noexcept.

CID 1367508
---
 src/bindings/cxx/eina_cxx/eina_variant.hh | 23 +++
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/src/bindings/cxx/eina_cxx/eina_variant.hh 
b/src/bindings/cxx/eina_cxx/eina_variant.hh
index df24aea..358688a 100644
--- a/src/bindings/cxx/eina_cxx/eina_variant.hh
+++ b/src/bindings/cxx/eina_cxx/eina_variant.hh
@@ -142,7 +142,7 @@ struct destroy_visitor
 {
typedef void result_type;
template 
-   void operator()(T&& other) const
+   void operator()(T&& other) const noexcept
{
   typedef typename std::remove_cv::type>::type type;
   other.~type();
@@ -229,13 +229,16 @@ struct variant
 
void destroy()
{
- destroy_unsafe();
- type = -1;
+ if(type != -1)
+   {
+ destroy_unsafe();
+ type = -1;
+   }
}
 
void destroy_unsafe()
{
- visit(destroy_visitor());
+ visit_unsafe(destroy_visitor());
}
 
bool empty() const
@@ -264,6 +267,18 @@ struct variant
   else
 return call_visitor<0u, sizeof...(Args), 
std::tuple>::call(type, static_cast(), f);
}
+
+   template 
+   typename F::result_type visit_unsafe(F f) const
+   {
+ return call_visitor<0u, sizeof...(Args), std::tuple>::call(type, 
static_cast(), f);
+   }
+
+   template 
+   typename F::result_type visit_unsafe(F f)
+   {
+ return call_visitor<0u, sizeof...(Args), std::tuple>::call(type, 
static_cast(), f);
+   }
   
 private:
template 

-- 




[EGIT] [core/efl] master 01/04: eina-cxx: Add move constructor and move assignment operator for eina::variant

2016-12-20 Thread Felipe Magno de Almeida
felipealmeida pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=37041730170a0f4e99b501379b52e7c72e3f581a

commit 37041730170a0f4e99b501379b52e7c72e3f581a
Author: Felipe Magno de Almeida 
Date:   Tue Dec 20 15:26:35 2016 -0300

eina-cxx: Add move constructor and move assignment operator for 
eina::variant

CID 1362797
---
 src/bindings/cxx/eina_cxx/eina_variant.hh | 38 +--
 1 file changed, 36 insertions(+), 2 deletions(-)

diff --git a/src/bindings/cxx/eina_cxx/eina_variant.hh 
b/src/bindings/cxx/eina_cxx/eina_variant.hh
index fb92954..df24aea 100644
--- a/src/bindings/cxx/eina_cxx/eina_variant.hh
+++ b/src/bindings/cxx/eina_cxx/eina_variant.hh
@@ -99,7 +99,7 @@ struct copy_visitor
   new (buffer) T(other);
}
 };
-
+
 struct move_visitor
 {
typedef void result_type;
@@ -111,7 +111,7 @@ struct move_visitor
   new (buffer) type(std::move(other));
}
 };
-
+
 struct assign_visitor
 {
typedef void result_type;
@@ -125,6 +125,19 @@ struct assign_visitor
}
 };
 
+struct move_assign_visitor
+{
+   typedef void result_type;
+   void* buffer;
+   template 
+   void operator()(T& other) const
+   {
+  typedef typename std::remove_cv::type>::type type;
+  type* assigned = static_cast(buffer);
+  *assigned = std::move(other);
+   }
+};
+
 struct destroy_visitor
 {
typedef void result_type;
@@ -187,6 +200,27 @@ struct variant
}
  return *this;
}
+   variant(variant&& other)
+ : type(other.type)
+   {
+ if(other.type != -1)
+   other.visit(move_visitor{static_cast()});
+   }
+   variant& operator=(variant&& other)
+   {
+ if(type == other.type && type != -1)
+   {
+ other.visit(move_assign_visitor{static_cast()});
+   }
+ else if(type != other.type)
+   {
+ if(type != -1)
+   destroy_unsafe();
+ type = other.type;
+ other.visit(move_visitor{static_cast()});
+   }
+ return *this;
+   }
~variant()
{
  if(type != -1)

-- 




[EGIT] [core/efl] master 04/04: eolian-cxx: Add std::move to member variable initialization

2016-12-20 Thread Felipe Magno de Almeida
felipealmeida pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e64327bacc6feb7aa2ab74e3481ccf48094540f2

commit e64327bacc6feb7aa2ab74e3481ccf48094540f2
Author: Felipe Magno de Almeida 
Date:   Tue Dec 20 15:55:59 2016 -0300

eolian-cxx: Add std::move to member variable initialization

CID 1361231
---
 src/lib/eolian_cxx/grammar/klass_def.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/eolian_cxx/grammar/klass_def.hpp 
b/src/lib/eolian_cxx/grammar/klass_def.hpp
index ee03b65..4b9bc48 100644
--- a/src/lib/eolian_cxx/grammar/klass_def.hpp
+++ b/src/lib/eolian_cxx/grammar/klass_def.hpp
@@ -316,7 +316,7 @@ struct parameter_def
   std::string c_type;
 
   parameter_def(parameter_direction direction, type_def type, std::string 
param_name, std::string c_type)
-: direction(direction), type(type), param_name(param_name), c_type(c_type) 
{}
+: direction(std::move(direction)), type(std::move(type)), 
param_name(std::move(param_name)), c_type(std::move(c_type)) {}
   parameter_def(Eolian_Function_Parameter const* param)
 : type( ::eolian_parameter_type_get(param))
 , param_name( ::eolian_parameter_name_get(param))

-- 




[EGIT] [core/efl] master 03/04: eolian-cxx: Make class_definition lambda's catch parameter by const-reference

2016-12-20 Thread Felipe Magno de Almeida
felipealmeida pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b92acd5cafe374adb2aa6fcd8ed6e4a38a843ff4

commit b92acd5cafe374adb2aa6fcd8ed6e4a38a843ff4
Author: Felipe Magno de Almeida 
Date:   Tue Dec 20 15:50:18 2016 -0300

eolian-cxx: Make class_definition lambda's catch parameter by 
const-reference

CID 1361230
CID 1361234
---
 src/lib/eolian_cxx/grammar/class_definition.hpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/eolian_cxx/grammar/class_definition.hpp 
b/src/lib/eolian_cxx/grammar/class_definition.hpp
index 9442e06..0b26d7c 100644
--- a/src/lib/eolian_cxx/grammar/class_definition.hpp
+++ b/src/lib/eolian_cxx/grammar/class_definition.hpp
@@ -136,8 +136,8 @@ struct class_definition_generator
 << scope_tab << scope_tab << "static Efl_Event_Description 
const* description()\n"
 << scope_tab << scope_tab << "{ return " << string << "; }\n"
 << scope_tab << scope_tab << "typedef "
-<< (attribute_conditional([] 
(eina::optional t) { return !!t; })
-[attribute_replace([] 
(eina::optional t) { return *t; }) [type]]
+<< (attribute_conditional([] 
(eina::optional const& t) { return !!t; })
+[attribute_replace([] 
(eina::optional const& t) { return *t; }) [type]]
 | "void")
 << " parameter_type;\n"
 << scope_tab << "} const " << string_replace(',', '_') << 
"_event;\n"

-- 




Re: [E-devel] Open Coveritty isues in efl

2016-12-20 Thread Al Poole
was going to say check return value of rmdir and mkdir and errno..

On Tue, Dec 20, 2016 at 10:56 AM, Gustavo Sverzut Barbieri <
barbi...@gmail.com> wrote:

> > the last
> >> 2 ones I don't know how to fix. The issue is that I need to do a stat
> >> before doing a mkdir or a rmdir and in between something could have
> >> happened on those directory and would lead to an unexpected result.
> >> Overall I don't think it is going to be a problem as it leads mostly to
> >> a failure (Non empty directory being deleted, or creating a directory
> >> that already exist), but if anyone has an idea.
> >
> > A good question. I was wondering about such situation in the other Time
> > of check time of use defects as well. :/
>
> Most of these syscalls return errors and you check for those, without
> prior calls to stat(), for example mkdir -p would be implemented as
> trying to create all directories from root to leaf ignoring EEXIST.
>
> The TOCTOU errors are basically "you're doing useless stuff since you
> must check the syscall error anyway"... but are usually important if
> you fail to do the error checking, believing due prior check it would
> be all right.
>
> --
> Gustavo Sverzut Barbieri
> --
> Mobile: +55 (16) 99354-9890
>
> 
> --
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today.http://sdm.link/intel
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 03/08: ecore: delay promise fulfillment to next loop iteration.

2016-12-20 Thread Cedric BAIL
On Dec 20, 2016 07:53, "Stefan Schmidt"  wrote:

Hello.

On 16/12/16 23:21, Cedric BAIL wrote:
> cedric pushed a commit to branch master.
>
> http://git.enlightenment.org/core/efl.git/commit/?id=
ca1762be21f3913deedb094fe4186d1af8136632
>
> commit ca1762be21f3913deedb094fe4186d1af8136632
> Author: Cedric BAIL 
> Date:   Fri Dec 16 11:26:46 2016 -0800
>
> ecore: delay promise fulfillment to next loop iteration.

After this commit the eldbus test suite starts hanging forever.
Git bisect found it for me and reverting it locally does indeed make it
pass again.

If this is a bug in the test suite, eldbus or this commit I have no idea. :)


Oh, I didn't notice. Will look at it.thanks for catching it.

Cedric
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 01/01: build: enable -Wfloat-equal for compiling

2016-12-20 Thread marcel-hollerbach
Hello,

If this makes sense or not is the one thing. But why pushing just the
addition of a warning, and not merge a branch where it cleans up all the
warnings and adds this flag? I know you were not in Paris this year, but
i think we talked about exactly this. And the answer was: Add the
compiler flag, but fix the warnings before.
Also the time to push this is really annoying. We are in the middle of the 
feature phase, there are quite huge refactors going on, the chance that you 
hit a conflict on a rebase with a "lets fix this warning" commit is quite 
high, and is quite annoying. Why not waiting to the feature freeze with it? 
Or just speak with people and dicsuss things before pushing
#WarningOfTheMonth without any visible reason?

On Tue, Dec 20, 2016 at 04:36:09PM +, Mike Blumenkrantz wrote:
> I think your "How many real issues have you seen" was the same argument
> against running any static analysis a couple years ago; now we have weekly
> reports for that.
> 
> I have seen bugs that resulted from illegal float comparison. The fact that
> a warning may be a false positive in some or even most cases does not
> ensure that every warning is a false positive.
> 
> Given that we are so pedantic about warnings for much more trivial matters
> (e.g., -Wunused-parameter as part of -Wextra), it seems bizarre to me that
> anyone would complain about enforcing valid comparisons for floats.
> 
> On Tue, Dec 20, 2016 at 2:14 AM Jean-Philippe André 
> wrote:
> 
> Hey Mike,
> 
> On 20 December 2016 at 01:12, Mike Blumenkrantz <
> michael.blumenkra...@gmail.com> wrote:
> 
> > discomfitor pushed a commit to branch master.
> >
> > http://git.enlightenment.org/core/efl.git/commit/?id=
> > 25792d64165ad4f5f647a36f087af2d2206a6618
> >
> > commit 25792d64165ad4f5f647a36f087af2d2206a6618
> > Author: Mike Blumenkrantz 
> > Date:   Mon Dec 19 11:08:43 2016 -0500
> >
> > build: enable -Wfloat-equal for compiling
> >
> >  #WarningOfTheMonth
> >
> 
> Urgh. What the hell.
> 
> Those warnings have a very limited value. How many real issues have you
> seen that resulted from this unsafe comparison? I'm pretty sure that float
> == 0 or float != 0 will succeed when we expect them to, and the equality
> tests will also work whenever we do direct assignments (without arithmetic).
> 
> Now I understand why cedric made a series of patches with the float
> comparison thing. I'm sure he didn't have anything more important to do.
> Are you going to fix the remaining 523 warnings? Please don't send 100
> patches for that...
> 
> 
> PS: I had only 2 warnings before that. Potentially not fixable (va_start
> with char arguments in EAPI functions). But at least I could easily spot
> anything new.
> 
> --
> Jean-Philippe André
> --
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today.http://sdm.link/intel
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> --
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today.http://sdm.link/intel
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 01/01: build: enable -Wfloat-equal for compiling

2016-12-20 Thread Mike Blumenkrantz
I think your "How many real issues have you seen" was the same argument
against running any static analysis a couple years ago; now we have weekly
reports for that.

I have seen bugs that resulted from illegal float comparison. The fact that
a warning may be a false positive in some or even most cases does not
ensure that every warning is a false positive.

Given that we are so pedantic about warnings for much more trivial matters
(e.g., -Wunused-parameter as part of -Wextra), it seems bizarre to me that
anyone would complain about enforcing valid comparisons for floats.

On Tue, Dec 20, 2016 at 2:14 AM Jean-Philippe André 
wrote:

Hey Mike,

On 20 December 2016 at 01:12, Mike Blumenkrantz <
michael.blumenkra...@gmail.com> wrote:

> discomfitor pushed a commit to branch master.
>
> http://git.enlightenment.org/core/efl.git/commit/?id=
> 25792d64165ad4f5f647a36f087af2d2206a6618
>
> commit 25792d64165ad4f5f647a36f087af2d2206a6618
> Author: Mike Blumenkrantz 
> Date:   Mon Dec 19 11:08:43 2016 -0500
>
> build: enable -Wfloat-equal for compiling
>
>  #WarningOfTheMonth
>

Urgh. What the hell.

Those warnings have a very limited value. How many real issues have you
seen that resulted from this unsafe comparison? I'm pretty sure that float
== 0 or float != 0 will succeed when we expect them to, and the equality
tests will also work whenever we do direct assignments (without arithmetic).

Now I understand why cedric made a series of patches with the float
comparison thing. I'm sure he didn't have anything more important to do.
Are you going to fix the remaining 523 warnings? Please don't send 100
patches for that...


PS: I had only 2 warnings before that. Potentially not fixable (va_start
with char arguments in EAPI functions). But at least I could easily spot
anything new.

--
Jean-Philippe André
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: headers: update copyright

2016-12-20 Thread Derek Foreman
derekf pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=fd5a0f6ff9014e98b8ff7e53a084b68093cfc177

commit fd5a0f6ff9014e98b8ff7e53a084b68093cfc177
Author: Derek Foreman 
Date:   Tue Dec 20 10:24:50 2016 -0600

headers: update copyright
---
 src/lib/ector/ector_gl_internal.h  | 57 ++
 src/lib/evas/Evas_GL.h | 56 +
 .../evas/engines/gl_common/evas_gl_define.h| 54 
 3 files changed, 167 insertions(+)

diff --git a/src/lib/ector/ector_gl_internal.h 
b/src/lib/ector/ector_gl_internal.h
index 6653ec2..eca1aeb 100644
--- a/src/lib/ector/ector_gl_internal.h
+++ b/src/lib/ector/ector_gl_internal.h
@@ -8,6 +8,63 @@ extern Ector_GL_API GL;
 // ignore everything below this point
 // --
 
+/*
+Some of the remainder of this file is lifted from Khronos' public
+EGL/glext headers.  The copyright notice from a recent version of the
+headers is reproduced here.
+
+Much of it is from Mesa, so their copyright is included as well.
+*/
+
+/*
+** Copyright (c) 2013-2016 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+/*
+ * Mesa 3-D graphics library
+ *
+ * Copyright (C) 1999-2006  Brian Paul   All Rights Reserved.
+ * Copyright (C) 2009  VMware, Inc.  All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+
 #ifdef GL_GLES
 typedef intptr_t EGLAttrib;
 typedef unsigned int EGLenum;
diff --git a/src/lib/evas/Evas_GL.h b/src/lib/evas/Evas_GL.h
index ddc418a..e4ce2d1 100644
--- a/src/lib/evas/Evas_GL.h
+++ b/src/lib/evas/Evas_GL.h
@@ -34,6 +34,62 @@
 extern "C" {
 #endif
 
+/*
+Some of the remainder of this file is lifted from Khronos' public
+EGL/glext headers.  The copyright notice from a recent version of the
+headers is reproduced here.
+
+Much of it is from Mesa, so their copyright is included as well.
+*/
+
+/*
+** Copyright (c) 2013-2016 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN 

[EGIT] [core/efl] master 01/02: Revert "ethumb: remove float comparison warnings"

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=913479199dffe7e6e384b518fcb3a1fd127ab223

commit 913479199dffe7e6e384b518fcb3a1fd127ab223
Author: Chris Michael 
Date:   Tue Dec 20 11:26:10 2016 -0500

Revert "ethumb: remove float comparison warnings"

This broke building and needs to be fixed differently

This reverts commit 8120572d08ef39a6f3a1a1cff0be912fa469c85d.
---
 src/lib/ethumb/ethumb.c | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/lib/ethumb/ethumb.c b/src/lib/ethumb/ethumb.c
index 6a552f6..b66c3f4 100644
--- a/src/lib/ethumb/ethumb.c
+++ b/src/lib/ethumb/ethumb.c
@@ -1151,7 +1151,8 @@ ethumb_calculate_aspect_from_ratio(Ethumb *e, float ia, 
int *w, int *h)
*w = e->tw;
*h = e->th;
 
-   if (EINA_DBL_CMP(ia, 0.0)) return;
+   if (ia == 0)
+ return;
 
a = e->tw / (float)e->th;
 
@@ -1189,7 +1190,8 @@ ethumb_calculate_fill_from_ratio(Ethumb *e, float ia, int 
*fx, int *fy, int *fw,
*fx = 0;
*fy = 0;
 
-   if (EINA_DBL_CMP(ia, 0.0)) return;
+   if (ia == 0)
+ return;
 
a = e->tw / (float)e->th;
 
@@ -1734,7 +1736,7 @@ ethumb_dup(const Ethumb *e)
 }
 
 #define CHECK_DELTA(Param)  \
-  if (!EINA_DBL_CMP(e1->Param, e2->Param))  \
+  if (e1->Param != e2->Param)   \
 return EINA_TRUE;
 
 EAPI Eina_Bool

-- 




[EGIT] [core/efl] master 02/02: embryo: Fix typo in float comparison 'fix'

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=3b7b894a623499b99f1c8d5da01cc0f7865c52c2

commit 3b7b894a623499b99f1c8d5da01cc0f7865c52c2
Author: Chris Michael 
Date:   Tue Dec 20 11:27:18 2016 -0500

embryo: Fix typo in float comparison 'fix'

Signed-off-by: Chris Michael 
---
 src/lib/embryo/embryo_float.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/embryo/embryo_float.c b/src/lib/embryo/embryo_float.c
index 8eba7bb..0d16e62 100644
--- a/src/lib/embryo/embryo_float.c
+++ b/src/lib/embryo/embryo_float.c
@@ -217,7 +217,7 @@ _embryo_fp_cmp(Embryo_Program *ep EINA_UNUSED, Embryo_Cell 
*params)
if (params[0] != (2 * sizeof(Embryo_Cell))) return 0;
f = EMBRYO_CELL_TO_FLOAT(params[1]);
ff = EMBRYO_CELL_TO_FLOAT(params[2]);
-   if (EINA_FLT_CMP(F, FF)) return 0;
+   if (EINA_FLT_CMP(f, ff)) return 0;
else if (f > ff)
  return 1;
return -1;

-- 




[EGIT] [core/efl] master 01/02: ethumb: remove float comparison warnings

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8120572d08ef39a6f3a1a1cff0be912fa469c85d

commit 8120572d08ef39a6f3a1a1cff0be912fa469c85d
Author: Chris Michael 
Date:   Tue Dec 20 11:16:59 2016 -0500

ethumb: remove float comparison warnings

Signed-off-by: Chris Michael 
---
 src/lib/ethumb/ethumb.c | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/lib/ethumb/ethumb.c b/src/lib/ethumb/ethumb.c
index b66c3f4..6a552f6 100644
--- a/src/lib/ethumb/ethumb.c
+++ b/src/lib/ethumb/ethumb.c
@@ -1151,8 +1151,7 @@ ethumb_calculate_aspect_from_ratio(Ethumb *e, float ia, 
int *w, int *h)
*w = e->tw;
*h = e->th;
 
-   if (ia == 0)
- return;
+   if (EINA_DBL_CMP(ia, 0.0)) return;
 
a = e->tw / (float)e->th;
 
@@ -1190,8 +1189,7 @@ ethumb_calculate_fill_from_ratio(Ethumb *e, float ia, int 
*fx, int *fy, int *fw,
*fx = 0;
*fy = 0;
 
-   if (ia == 0)
- return;
+   if (EINA_DBL_CMP(ia, 0.0)) return;
 
a = e->tw / (float)e->th;
 
@@ -1736,7 +1734,7 @@ ethumb_dup(const Ethumb *e)
 }
 
 #define CHECK_DELTA(Param)  \
-  if (e1->Param != e2->Param)   \
+  if (!EINA_DBL_CMP(e1->Param, e2->Param))  \
 return EINA_TRUE;
 
 EAPI Eina_Bool

-- 




[EGIT] [core/efl] master 02/02: embryo: Fix typo

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=02ba02d6a9a5c7460b6f6ce5534d7bed06c886b1

commit 02ba02d6a9a5c7460b6f6ce5534d7bed06c886b1
Author: Chris Michael 
Date:   Tue Dec 20 11:20:43 2016 -0500

embryo: Fix typo

Signed-off-by: Chris Michael 
---
 src/lib/embryo/embryo_float.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/embryo/embryo_float.c b/src/lib/embryo/embryo_float.c
index c692568..8eba7bb 100644
--- a/src/lib/embryo/embryo_float.c
+++ b/src/lib/embryo/embryo_float.c
@@ -217,7 +217,7 @@ _embryo_fp_cmp(Embryo_Program *ep EINA_UNUSED, Embryo_Cell 
*params)
if (params[0] != (2 * sizeof(Embryo_Cell))) return 0;
f = EMBRYO_CELL_TO_FLOAT(params[1]);
ff = EMBRYO_CELL_TO_FLOAT(params[2]);
-   if (EINA_FLT_cmp(F, FF)) return 0;
+   if (EINA_FLT_CMP(F, FF)) return 0;
else if (f > ff)
  return 1;
return -1;
@@ -269,7 +269,7 @@ _embryo_fp_log(Embryo_Program *ep, Embryo_Cell *params)
 embryo_program_error_set(ep, EMBRYO_ERROR_DOMAIN);
 return 0;
  }
-   if (EINA_FLT_cmp(ff, 10.0))
+   if (EINA_FLT_CMP(ff, 10.0))
  f = log10f(f);
else if (EINA_FLT_CMP(ff, 2.0))
  f = log2f(f);

-- 




[EGIT] [core/efl] master 01/01: evas engines: Use EGLImageKHR instead of EGLImage

2016-12-20 Thread Derek Foreman
derekf pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=acb0ee2a9dc37df18444a684e90cf28117eeb9a1

commit acb0ee2a9dc37df18444a684e90cf28117eeb9a1
Author: Derek Foreman 
Date:   Tue Dec 20 09:34:07 2016 -0600

evas engines: Use EGLImageKHR instead of EGLImage

If someone's trying to build efl git with 2.5 year old EGL headers they get
a break on missing EGLImage...

We should probably consider keeping an up to date copy of the EGL headers
in efl.  There may be someone out there with even older headers.
---
 src/modules/evas/engines/gl_drm/evas_engine.c  | 2 +-
 src/modules/evas/engines/gl_x11/evas_engine.c  | 2 +-
 src/modules/evas/engines/wayland_egl/evas_engine.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/modules/evas/engines/gl_drm/evas_engine.c 
b/src/modules/evas/engines/gl_drm/evas_engine.c
index 7132804..5fab775 100644
--- a/src/modules/evas/engines/gl_drm/evas_engine.c
+++ b/src/modules/evas/engines/gl_drm/evas_engine.c
@@ -72,7 +72,7 @@ glsym_func_void_ptr glsym_evas_gl_common_current_context_get 
= NULL;
 
 /* dynamic loaded local egl function pointers */
 _eng_fn (*glsym_eglGetProcAddress)(const char *a) = NULL;
-EGLImage (*glsym_evas_gl_common_eglCreateImage) (EGLDisplay a, EGLContext b, 
EGLenum c, EGLClientBuffer d, const EGLAttrib *e) = NULL;
+EGLImageKHR (*glsym_evas_gl_common_eglCreateImage) (EGLDisplay a, EGLContext 
b, EGLenum c, EGLClientBuffer d, const EGLAttrib *e) = NULL;
 void (*glsym_eglDestroyImage)(EGLDisplay a, void *b) = NULL;
 void (*glsym_glEGLImageTargetTexture2DOES)(int a, void *b) = NULL;
 unsigned int (*glsym_eglSwapBuffersWithDamage)(EGLDisplay a, void *b, const 
EGLint *d, EGLint c) = NULL;
diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c 
b/src/modules/evas/engines/gl_x11/evas_engine.c
index aecd0c7..9d6150a 100644
--- a/src/modules/evas/engines/gl_x11/evas_engine.c
+++ b/src/modules/evas/engines/gl_x11/evas_engine.c
@@ -84,7 +84,7 @@ typedef intptr_t EGLAttribKHR;
 #endif
 
 _eng_fn  (*glsym_eglGetProcAddress)(const char *a) = NULL;
-EGLImage (*glsym_evas_gl_common_eglCreateImage)(EGLDisplay a, EGLContext b, 
EGLenum c, EGLClientBuffer d, const EGLAttrib *e) = NULL;
+EGLImageKHR (*glsym_evas_gl_common_eglCreateImage)(EGLDisplay a, EGLContext b, 
EGLenum c, EGLClientBuffer d, const EGLAttrib *e) = NULL;
 void (*glsym_eglDestroyImage)  (EGLDisplay a, void *b) = NULL;
 void (*glsym_glEGLImageTargetTexture2DOES) (int a, void *b)  = NULL;
 unsigned int   (*glsym_eglSwapBuffersWithDamage) (EGLDisplay a, void *b, const 
EGLint *d, EGLint c) = NULL;
diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c 
b/src/modules/evas/engines/wayland_egl/evas_engine.c
index d416760..eaff2d0 100644
--- a/src/modules/evas/engines/wayland_egl/evas_engine.c
+++ b/src/modules/evas/engines/wayland_egl/evas_engine.c
@@ -67,7 +67,7 @@ Evas_GL_Preload_Render_Call 
glsym_evas_gl_preload_render_unlock = NULL;
 Evas_GL_Preload_Render_Call glsym_evas_gl_preload_render_relax = NULL;
 
 _eng_fn (*glsym_eglGetProcAddress) (const char *a) = NULL;
-EGLImage (*glsym_evas_gl_common_eglCreateImage)(EGLDisplay a, EGLContext b, 
EGLenum c, EGLClientBuffer d, const EGLAttrib *e) = NULL;
+EGLImageKHR (*glsym_evas_gl_common_eglCreateImage)(EGLDisplay a, EGLContext b, 
EGLenum c, EGLClientBuffer d, const EGLAttrib *e) = NULL;
 void (*glsym_eglDestroyImage) (EGLDisplay a, void *b) = NULL;
 void (*glsym_glEGLImageTargetTexture2DOES) (int a, void *b)  = NULL;
 unsigned int (*glsym_eglSwapBuffersWithDamage) (EGLDisplay a, void *b, const 
EGLint *d, EGLint c) = NULL;

-- 




[EGIT] [core/efl] master 01/01: emotion: remove float comparison warnings

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2faf3df444bbe10c1628beff475028d00769c0ea

commit 2faf3df444bbe10c1628beff475028d00769c0ea
Author: Chris Michael 
Date:   Tue Dec 20 11:13:40 2016 -0500

emotion: remove float comparison warnings

Signed-off-by: Chris Michael 
---
 src/lib/emotion/emotion_smart.c   | 13 +++--
 src/modules/emotion/gstreamer1/emotion_sink.c |  2 +-
 src/modules/emotion/xine/emotion_xine.c   |  4 ++--
 3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/src/lib/emotion/emotion_smart.c b/src/lib/emotion/emotion_smart.c
index 5ea48bb..8add1227e 100644
--- a/src/lib/emotion/emotion_smart.c
+++ b/src/lib/emotion/emotion_smart.c
@@ -1540,8 +1540,8 @@ _emotion_video_pos_update(Evas_Object *obj, double pos, 
double len)
int npos = 0, nlen = 0;
 
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
-   if (pos != sd->pos) npos = 1;
-   if (len != sd->len) nlen = 1;
+   if (!EINA_DBL_CMP(pos, sd->pos)) npos = 1;
+   if (!EINA_DBL_CMP(len, sd->len)) nlen = 1;
sd->pos = pos;
sd->len = len;
if (npos)
@@ -1573,8 +1573,8 @@ _emotion_frame_resize(Evas_Object *obj, int w, int h, 
double ratio)
  }
if (h > 0) tmp  = (double)w / (double)h;
else tmp = 1.0;
-   if (ratio != tmp) tmp = ratio;
-   if (tmp != sd->ratio)
+   if (!EINA_DBL_CMP(ratio, tmp)) tmp = ratio;
+   if (!EINA_DBL_CMP(tmp, sd->ratio))
  {
 sd->ratio = tmp;
 changed = 1;
@@ -1619,7 +1619,7 @@ _emotion_open_done(Evas_Object *obj)
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
sd->open = 1;
 
-   if (sd->remember_jump)
+   if (!EINA_DBL_CMP(sd->remember_jump, 0.0))
  emotion_object_position_set(obj, sd->remember_jump);
if (sd->remember_play != sd->play)
  emotion_object_play_set(obj, sd->remember_play);
@@ -1737,7 +1737,8 @@ _emotion_frame_refill(Evas_Object *obj, double w, double 
h)
Efl_Canvas_Video_Data *sd;
 
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
-   if ((sd->fill.w != w) || (sd->fill.h != h))
+   if ((!EINA_DBL_CMP(sd->fill.w, w)) ||
+   (!EINA_DBL_CMP(sd->fill.h, h)))
  {
 Evas_Coord ow, oh;
 
diff --git a/src/modules/emotion/gstreamer1/emotion_sink.c 
b/src/modules/emotion/gstreamer1/emotion_sink.c
index f897d37..c31f365 100644
--- a/src/modules/emotion/gstreamer1/emotion_sink.c
+++ b/src/modules/emotion/gstreamer1/emotion_sink.c
@@ -345,7 +345,7 @@ _update_emotion_fps(EmotionVideoSinkPrivate *priv)
tim = ecore_time_get();
priv->frames++;
 
-   if (priv->rlapse == 0.0)
+   if (EINA_DBL_CMP(priv->rlapse, 0.0))
  {
 priv->rlapse = tim;
 priv->flapse = priv->frames;
diff --git a/src/modules/emotion/xine/emotion_xine.c 
b/src/modules/emotion/xine/emotion_xine.c
index 4a9ac91..d7bf569 100644
--- a/src/modules/emotion/xine/emotion_xine.c
+++ b/src/modules/emotion/xine/emotion_xine.c
@@ -196,7 +196,7 @@ _em_slave(void *par)
   
   pos = *((double *)eev->xine_event);
   if ((xine_get_param(ev->stream, XINE_PARAM_SPEED) == 
XINE_SPEED_PAUSE) &&
-  (pos == ev->pos) &&
+  (EINA_DBL_CMP(pos, ev->pos)) &&
   (!ev->just_loaded))
 {
xine_set_param(ev->stream, XINE_PARAM_SPEED, 
XINE_SPEED_NORMAL);
@@ -1324,7 +1324,7 @@ _em_fd_ev_active(void *data EINA_UNUSED, Ecore_Fd_Handler 
*fdh)
   ev->play_ok = 1;
   break;
  case 15: /* get pos done */
-   if (ev->last_pos != ev->pos)
+   if (!EINA_DBL_CMP(ev->last_pos, ev->pos))
  {
 ev->last_pos = ev->pos;
 _emotion_video_pos_update(ev->obj, ev->pos, 
ev->len);

-- 




[EGIT] [core/efl] master 01/03: ector: remove float comparison warnings

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8ce2d991500300d466ff3572fcd60400083880d4

commit 8ce2d991500300d466ff3572fcd60400083880d4
Author: Chris Michael 
Date:   Tue Dec 20 10:59:55 2016 -0500

ector: remove float comparison warnings

Signed-off-by: Chris Michael 
---
 src/lib/ector/software/ector_renderer_software_gradient_linear.c | 2 +-
 src/lib/ector/software/ector_renderer_software_gradient_radial.c | 4 ++--
 src/lib/ector/software/ector_software_gradient.c | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/ector/software/ector_renderer_software_gradient_linear.c 
b/src/lib/ector/software/ector_renderer_software_gradient_linear.c
index 69bf9e4..6160402 100644
--- a/src/lib/ector/software/ector_renderer_software_gradient_linear.c
+++ b/src/lib/ector/software/ector_renderer_software_gradient_linear.c
@@ -34,7 +34,7 @@ 
_ector_renderer_software_gradient_linear_ector_renderer_prepare(Eo *obj,
pd->linear.l = pd->linear.dx * pd->linear.dx + pd->linear.dy * 
pd->linear.dy;
pd->linear.off = 0;
 
-   if (pd->linear.l != 0)
+   if (!EINA_DBL_CMP(pd->linear.l, 0.0))
  {
 pd->linear.dx /= pd->linear.l;
 pd->linear.dy /= pd->linear.l;
diff --git a/src/lib/ector/software/ector_renderer_software_gradient_radial.c 
b/src/lib/ector/software/ector_renderer_software_gradient_radial.c
index 439f193..a66df4f 100644
--- a/src/lib/ector/software/ector_renderer_software_gradient_radial.c
+++ b/src/lib/ector/software/ector_renderer_software_gradient_radial.c
@@ -26,12 +26,12 @@ 
_ector_renderer_software_gradient_radial_ector_renderer_prepare(Eo *obj, Ector_R
pd->radial.cy = pd->grd->radial.y;
pd->radial.cradius = pd->grd->radius;
 
-   if (!pd->grd->focal.x)
+   if (EINA_DBL_CMP(pd->grd->focal.x, 0.0))
  pd->radial.fx = pd->grd->radial.x;
else
  pd->radial.fx = pd->grd->focal.x;
 
-   if (!pd->grd->focal.y)
+   if (EINA_DBL_CMP(pd->grd->focal.y, 0.0))
  pd->radial.fy = pd->grd->radial.y;
else
  pd->radial.fy = pd->grd->focal.y;
diff --git a/src/lib/ector/software/ector_software_gradient.c 
b/src/lib/ector/software/ector_software_gradient.c
index ea1b4a2..5f63fca 100644
--- a/src/lib/ector/software/ector_software_gradient.c
+++ b/src/lib/ector/software/ector_software_gradient.c
@@ -386,7 +386,7 @@ fetch_linear_gradient(uint32_t *buffer, Span_Data *data, 
int y, int x, int lengt
uint32_t *end;
int t_fixed, inc_fixed;
 
-   if (g_data->linear.l == 0)
+   if (EINA_DBL_CMP(g_data->linear.l, 0.0))
  {
 t = inc = 0;
  }

-- 




[EGIT] [core/efl] master 03/03: embryo: remove float comparison warnings

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=be02e13ece0470e977b9dfbe5e7f6368cbe31eea

commit be02e13ece0470e977b9dfbe5e7f6368cbe31eea
Author: Chris Michael 
Date:   Tue Dec 20 11:03:50 2016 -0500

embryo: remove float comparison warnings

Signed-off-by: Chris Michael 
---
 src/lib/embryo/embryo_float.c | 14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/lib/embryo/embryo_float.c b/src/lib/embryo/embryo_float.c
index 23c6a5c..c692568 100644
--- a/src/lib/embryo/embryo_float.c
+++ b/src/lib/embryo/embryo_float.c
@@ -125,9 +125,9 @@ _embryo_fp_div(Embryo_Program *ep EINA_UNUSED, Embryo_Cell 
*params)
if (params[0] != (2 * sizeof(Embryo_Cell))) return 0;
f = EMBRYO_CELL_TO_FLOAT(params[1]);
ff = EMBRYO_CELL_TO_FLOAT(params[2]);
-   if (ff == 0.0)
+   if (EINA_FLT_CMP(ff, 0.0))
  {
-if (f == 0.0)
+if (EINA_FLT_CMP(f, 0.0))
   return EMBRYO_FLOAT_TO_CELL(0.0f);
 else if (f < 0.0)
   return EMBRYO_FLOAT_TO_CELL(-MAXFLOAT);
@@ -217,7 +217,7 @@ _embryo_fp_cmp(Embryo_Program *ep EINA_UNUSED, Embryo_Cell 
*params)
if (params[0] != (2 * sizeof(Embryo_Cell))) return 0;
f = EMBRYO_CELL_TO_FLOAT(params[1]);
ff = EMBRYO_CELL_TO_FLOAT(params[2]);
-   if (f == ff) return 0;
+   if (EINA_FLT_cmp(F, FF)) return 0;
else if (f > ff)
  return 1;
return -1;
@@ -269,13 +269,15 @@ _embryo_fp_log(Embryo_Program *ep, Embryo_Cell *params)
 embryo_program_error_set(ep, EMBRYO_ERROR_DOMAIN);
 return 0;
  }
-   if (ff == 10.0) f = log10f(f);
-   else if (ff == 2.0)
+   if (EINA_FLT_cmp(ff, 10.0))
+ f = log10f(f);
+   else if (EINA_FLT_CMP(ff, 2.0))
  f = log2f(f);
else
  {
 tf = logf(ff);
-if (tf == 0.0) f = 0.0;
+if (EINA_FLT_CMP(tf, 0.0))
+  f = 0.0;
 else f = (logf(f) / tf);
  }
return EMBRYO_FLOAT_TO_CELL(f);

-- 




[EGIT] [core/efl] master 02/03: efreet: remove float comparison warnings

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=72a3556fa755548434c5b871ada53bec5a046865

commit 72a3556fa755548434c5b871ada53bec5a046865
Author: Chris Michael 
Date:   Tue Dec 20 11:01:27 2016 -0500

efreet: remove float comparison warnings

Signed-off-by: Chris Michael 
---
 src/lib/efreet/efreet_icon.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/lib/efreet/efreet_icon.c b/src/lib/efreet/efreet_icon.c
index 6b02bfb..ff62779 100644
--- a/src/lib/efreet/efreet_icon.c
+++ b/src/lib/efreet/efreet_icon.c
@@ -543,7 +543,9 @@ efreet_icon_lookup_icon(Efreet_Cache_Icon *icon, unsigned 
int size)
 distance = efreet_icon_size_distance(icon->icons[i], size);
 if (distance > minimal_distance) continue;
 // prefer downsizing
-if ((distance == minimal_distance) && (icon->icons[i]->normal < 
ret_size)) continue;
+if ((EINA_DBL_CMP(distance, minimal_distance)) &&
+(icon->icons[i]->normal < ret_size))
+ continue;
 
 tmp = efreet_icon_lookup_path(icon->icons[i]);
 

-- 




[EGIT] [core/efl] master 07/22: evas: remove float comparison warnings for evas_map

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=0e93d8121bba6c08037b580bd3d10801f1d8809d

commit 0e93d8121bba6c08037b580bd3d10801f1d8809d
Author: Chris Michael 
Date:   Tue Dec 20 09:47:57 2016 -0500

evas: remove float comparison warnings for evas_map

Signed-off-by: Chris Michael 
---
 src/lib/evas/canvas/evas_map.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/lib/evas/canvas/evas_map.c b/src/lib/evas/canvas/evas_map.c
index 386ecb8..f07fd1d 100644
--- a/src/lib/evas/canvas/evas_map.c
+++ b/src/lib/evas/canvas/evas_map.c
@@ -1079,7 +1079,7 @@ _map_util_3d_rotate(Evas_Map *m, double dx, double dy, 
double dz,
 y = p->y - cy;
 z = p->z - cz;
 
-if (rz != 0.0)
+if (!EINA_DBL_CMP(rz, 0.0))
   {
  xx = x * cos(rz);
  yy = x * sin(rz);
@@ -1087,7 +1087,7 @@ _map_util_3d_rotate(Evas_Map *m, double dx, double dy, 
double dz,
  y = yy + (y * cos(rz));
   }
 
-if (ry != 0.0)
+if (!EINA_DBL_CMP(ry, 0.0))
   {
  xx = x * cos(ry);
  zz = x * sin(ry);
@@ -1095,7 +1095,7 @@ _map_util_3d_rotate(Evas_Map *m, double dx, double dy, 
double dz,
  z = zz + (z * cos(ry));
   }
 
-if (rx != 0.0)
+if (!EINA_DBL_CMP(rx, 0.0))
   {
  zz = z * cos(rx);
  yy = z * sin(rx);
@@ -1195,7 +1195,7 @@ _map_util_3d_lighting(Evas_Map *m,
 ln = (nx * nx) + (ny * ny) + (nz * nz);
 ln = sqrt(ln);
 
-if (ln != 0.0)
+if (!EINA_DBL_CMP(ln, 0.0))
   {
  nx /= ln;
  ny /= ln;
@@ -1210,7 +1210,7 @@ _map_util_3d_lighting(Evas_Map *m,
 ln = (x * x) + (y * y) + (z * z);
 ln = sqrt(ln);
 
-if (ln != 0.0)
+if (!EINA_DBL_CMP(ln, 0.0))
   {
  x /= ln;
  y /= ln;

-- 




[EGIT] [core/efl] master 03/22: evas: remove float comparison warning for evas_object_table

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=72b1fecbdad6a54b3df4d1bbb61646b5badb9ec7

commit 72b1fecbdad6a54b3df4d1bbb61646b5badb9ec7
Author: Chris Michael 
Date:   Tue Dec 20 09:31:27 2016 -0500

evas: remove float comparison warning for evas_object_table

Signed-off-by: Chris Michael 
---
 src/lib/evas/canvas/evas_object_table.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_object_table.c 
b/src/lib/evas/canvas/evas_object_table.c
index 0a23c3c..0fb125c 100644
--- a/src/lib/evas/canvas/evas_object_table.c
+++ b/src/lib/evas/canvas/evas_object_table.c
@@ -1015,7 +1015,8 @@ _evas_table_homogeneous_get(Eo *o EINA_UNUSED, 
Evas_Table_Data *priv)
 EOLIAN static void
 _evas_table_align_set(Eo *o, Evas_Table_Data *priv, double horizontal, double 
vertical)
 {
-   if (priv->align.h == horizontal && priv->align.v == vertical)
+   if ((EINA_DBL_CMP(priv->align.h, horizontal)) &&
+   (EINA_DBL_CMP(priv->align.v, vertical)))
  return;
priv->align.h = horizontal;
priv->align.v = vertical;

-- 




[EGIT] [core/efl] master 14/22: evas: remove float comparison warnings for evas_canvas3d_node

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f411616069d74ffbc4a104bfef850d256d878ddc

commit f411616069d74ffbc4a104bfef850d256d878ddc
Author: Chris Michael 
Date:   Tue Dec 20 10:16:35 2016 -0500

evas: remove float comparison warnings for evas_canvas3d_node

Signed-off-by: Chris Michael 
---
 src/lib/evas/canvas/evas_canvas3d_node.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/evas/canvas/evas_canvas3d_node.c 
b/src/lib/evas/canvas/evas_canvas3d_node.c
index a86560c..bdc1531 100644
--- a/src/lib/evas/canvas/evas_canvas3d_node.c
+++ b/src/lib/evas/canvas/evas_canvas3d_node.c
@@ -34,9 +34,9 @@ _generate_unic_color_key(Evas_Color *color, Evas_Color 
*bg_color, Evas_Canvas3D_
 
GET_NEXT_COLOR
/*Get another color if color equal with background color*/
-   if ((bg_color->r == (double)red) &&
-   (bg_color->g == (double)green) &&
-   (bg_color->b == (double)blue))
+   if ((EINA_DBL_CMP(bg_color->r, (double)red)) &&
+   (EINA_DBL_CMP(bg_color->g, (double)green)) &&
+   (EINA_DBL_CMP(bg_color->b, (double)blue)))
  {
 GET_NEXT_COLOR
  }

-- 




[EGIT] [core/efl] master 17/22: evas: remove float comparison warnings for evas_canvas3d_primitive

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b58057e2e7eae8565e7449216e2cff6b0774bf1f

commit b58057e2e7eae8565e7449216e2cff6b0774bf1f
Author: Chris Michael 
Date:   Tue Dec 20 10:22:22 2016 -0500

evas: remove float comparison warnings for evas_canvas3d_primitive

Signed-off-by: Chris Michael 
---
 src/lib/evas/canvas/evas_canvas3d_primitive.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/canvas/evas_canvas3d_primitive.c 
b/src/lib/evas/canvas/evas_canvas3d_primitive.c
index bcfa90e..75420c1 100644
--- a/src/lib/evas/canvas/evas_canvas3d_primitive.c
+++ b/src/lib/evas/canvas/evas_canvas3d_primitive.c
@@ -136,8 +136,8 @@ _evas_canvas3d_primitive_tex_scale_set(Eo *obj EINA_UNUSED,
  Evas_Real x,
  Evas_Real y)
 {
-   if (x) pd->tex_scale.x = x;
-   if (y) pd->tex_scale.y = y;
+   if (!EINA_DBL_CMP(x, 0.0)) pd->tex_scale.x = x;
+   if (!EINA_DBL_CMP(y, 0.0)) pd->tex_scale.y = y;
 }
 
 EOLIAN static void

-- 




[EGIT] [core/efl] master 11/22: evas: remove float comparison warnings for evas_cache_image

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=33ad245b803ad82602cb3656eef8a48de26a0e71

commit 33ad245b803ad82602cb3656eef8a48de26a0e71
Author: Chris Michael 
Date:   Tue Dec 20 10:05:48 2016 -0500

evas: remove float comparison warnings for evas_cache_image

Signed-off-by: Chris Michael 
---
 src/lib/evas/cache/evas_cache_image.c | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/lib/evas/cache/evas_cache_image.c 
b/src/lib/evas/cache/evas_cache_image.c
index 699a2df..3868325 100644
--- a/src/lib/evas/cache/evas_cache_image.c
+++ b/src/lib/evas/cache/evas_cache_image.c
@@ -711,11 +711,11 @@ _evas_cache_image_loadopts_append(char *hkey, 
Evas_Image_Load_Opts **plo)
 
if ((!lo) ||
(lo &&
-(lo->scale_down_by == 0) &&
-(lo->dpi == 0.0) &&
-((lo->w == 0) || (lo->h == 0)) &&
-((lo->region.w == 0) || (lo->region.h == 0)) &&
-(lo->orientation == 0)
+   (lo->scale_down_by == 0) &&
+   (EINA_DBL_CMP(lo->dpi, 0.0)) &&
+   ((lo->w == 0) || (lo->h == 0)) &&
+   ((lo->region.w == 0) || (lo->region.h == 0)) &&
+   (lo->orientation == 0)
))
  {
 *plo = (Evas_Image_Load_Opts*) 

-- 




[EGIT] [core/efl] master 19/22: evas: remove float comparison warnings for evas_filter_mixin

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2ae4c978f9b93a59d52d36e7565f3220f6d64e37

commit 2ae4c978f9b93a59d52d36e7565f3220f6d64e37
Author: Chris Michael 
Date:   Tue Dec 20 10:25:01 2016 -0500

evas: remove float comparison warnings for evas_filter_mixin

Signed-off-by: Chris Michael 
---
 src/lib/evas/canvas/evas_filter_mixin.c | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/lib/evas/canvas/evas_filter_mixin.c 
b/src/lib/evas/canvas/evas_filter_mixin.c
index ba58838..58d479c 100644
--- a/src/lib/evas/canvas/evas_filter_mixin.c
+++ b/src/lib/evas/canvas/evas_filter_mixin.c
@@ -506,9 +506,11 @@ 
_efl_canvas_filter_internal_efl_gfx_filter_filter_state_set(Eo *eo_obj, Evas_Fil
Evas_Object_Protected_Data *obj = pd->obj;
 
evas_object_async_block(obj);
-   if ((cur_state != pd->data->state.cur.name) || (cur_val != 
pd->data->state.cur.value) ||
-   (next_state != pd->data->state.next.name) || (next_val != 
pd->data->state.next.value) ||
-   (pos != pd->data->state.pos))
+   if ((cur_state != pd->data->state.cur.name) ||
+   (!EINA_DBL_CMP(cur_val, pd->data->state.cur.value)) ||
+   (next_state != pd->data->state.next.name) ||
+   (!EINA_DBL_CMP(next_val, pd->data->state.next.value)) ||
+   (!EINA_DBL_CMP(pos, pd->data->state.pos)))
  {
 Evas_Object_Filter_Data *fcow = FCOW_BEGIN(pd);
 fcow->changed = 1;

-- 




[EGIT] [core/efl] master 01/22: evas: remove float comparison warnings for evas_events

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=1b9aa3f995d6eb4e1d3eab721a7ebe2ab88a3c47

commit 1b9aa3f995d6eb4e1d3eab721a7ebe2ab88a3c47
Author: Chris Michael 
Date:   Tue Dec 20 09:16:43 2016 -0500

evas: remove float comparison warnings for evas_events

Signed-off-by: Chris Michael 
---
 src/lib/evas/canvas/evas_events.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/evas/canvas/evas_events.c 
b/src/lib/evas/canvas/evas_events.c
index dbcf713..5dc31a3 100644
--- a/src/lib/evas/canvas/evas_events.c
+++ b/src/lib/evas/canvas/evas_events.c
@@ -358,9 +358,9 @@ _transform_to_src_space_f(Evas_Object_Protected_Data *obj, 
Evas_Object_Protected
tmp_x -= obj->cur->geometry.x;
tmp_y -= obj->cur->geometry.y;
 
-   if (obj_w != src_w)
+   if (!EINA_DBL_CMP(obj_w, src_w))
  tmp_x = (tmp_x * (src_w / obj_w));
-   if (obj_h != src_h)
+   if (!EINA_DBL_CMP(obj_h, src_h))
  tmp_y = (tmp_y * (src_h / obj_h));
 
tmp_x += src->cur->geometry.x;
@@ -2763,8 +2763,8 @@ _canvas_event_feed_multi_internal(Evas *eo_e, 
Evas_Public_Data *e,
evt = efl_input_instance_get(EFL_INPUT_POINTER_CLASS, eo_e, (void **) );
if (!e || !ev) return;
 
-   if (!fx) fx = x;
-   if (!fy) fy = y;
+   if (EINA_DBL_CMP(fx, 0.0)) fx = x;
+   if (EINA_DBL_CMP(fy, 0.0)) fy = y;
 
ev->action = action;
ev->tool = d;

-- 




[EGIT] [core/efl] master 18/22: evas: remove float comparison warnings for evas_convert_color

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f427050b61578b39867167077f8d54f69d337471

commit f427050b61578b39867167077f8d54f69d337471
Author: Chris Michael 
Date:   Tue Dec 20 10:23:12 2016 -0500

evas: remove float comparison warnings for evas_convert_color

Signed-off-by: Chris Michael 
---
 src/lib/evas/common/evas_convert_color.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/evas/common/evas_convert_color.c 
b/src/lib/evas/common/evas_convert_color.c
index 87057e4..421f425 100644
--- a/src/lib/evas/common/evas_convert_color.c
+++ b/src/lib/evas/common/evas_convert_color.c
@@ -138,7 +138,7 @@ evas_common_convert_color_hsv_to_rgb(float h, float s, 
float v, int *r, int *g,
float f;
 
v *= 255;
-   if (s == 0)
+   if (EINA_FLT_CMP(s, 0.0))
  {
if (r) *r = v;
if (g) *g = v;

-- 




[EGIT] [core/efl] master 06/22: evas: remove float comparison warnings for evas_object_textblock

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=879041a3298a9d7d7dea744d426bbae55bc33aa6

commit 879041a3298a9d7d7dea744d426bbae55bc33aa6
Author: Chris Michael 
Date:   Tue Dec 20 09:44:54 2016 -0500

evas: remove float comparison warnings for evas_object_textblock

Signed-off-by: Chris Michael 
---
 src/lib/evas/canvas/evas_object_textblock.c | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index e15e475..5115bb0 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -5358,11 +5358,11 @@ _layout_par(Ctxt *c)
   ellip_h_thresh = ascent + descent + maxasc + maxdesc;
}
 
- if ((it->format->ellipsis == 1.0) && (c->h >= 0) &&
-   ((c->y + ellip_h_thresh >
- c->h - c->o->style_pad.t - c->o->style_pad.b) ||
-(!it->format->wrap_word && !it->format->wrap_char &&
- !it->format->wrap_mixed && 
!it->format->wrap_hyphenation)))
+ if ((EINA_DBL_CMP(it->format->ellipsis, 1.0)) && (c->h >= 0) &&
+ ((c->y + ellip_h_thresh >
+   c->h - c->o->style_pad.t - c->o->style_pad.b) ||
+ (!it->format->wrap_word && !it->format->wrap_char &&
+ !it->format->wrap_mixed && 
!it->format->wrap_hyphenation)))
{
   _layout_handle_ellipsis(c, it, i);
   ret = 1;
@@ -5499,7 +5499,7 @@ _layout_par(Ctxt *c)
  {
 /* FIXME: Should redo the ellipsis handling.
  * If we can do ellipsis, just cut here. */
-if (it->format->ellipsis == 1.0)
+if (EINA_DBL_CMP(it->format->ellipsis, 1.0))
   {
  _layout_handle_ellipsis(c, it, i);
  ret = 1;
@@ -6825,7 +6825,7 @@ evas_object_textblock_valign_set(Efl_Canvas_Text *eo_obj, 
double align)
evas_object_async_block(obj);
if (align < 0.0) align = 0.0;
else if (align > 1.0) align = 1.0;
-   if (o->valign == align) return;
+   if (EINA_DBL_CMP(o->valign, align)) return;
o->valign = align;
_evas_textblock_changed(o, eo_obj);
 }
@@ -12807,7 +12807,7 @@ evas_object_textblock_render(Evas_Object *eo_obj 
EINA_UNUSED,
{ \
   Evas_Coord yoff; \
   yoff = ln->baseline; \
-  if (itr->format->valign != -1.0) \
+  if (!EINA_DBL_CMP(itr->format->valign, -1.0)) \
 { \
if (itr->type == EVAS_TEXTBLOCK_ITEM_TEXT) \
  { \
@@ -13289,7 +13289,7 @@ evas_object_textblock_coords_recalc(Evas_Object *eo_obj,
// width changed thus we may have to re-wrap or change centering etc.
(obj->cur->geometry.w != o->last_w) ||
// if valign not top OR we have ellipsis, then if height changed we 
need to re-eval valign or ... spot
-   (((o->valign != 0.0) || (o->have_ellipsis)) &&
+   (((!EINA_DBL_CMP(o->valign, 0.0)) || (o->have_ellipsis)) &&
(
((o->formatted.oneline_h == 0) &&
(obj->cur->geometry.h != o->last_h)) ||

-- 




[EGIT] [core/efl] master 09/22: evas: remove float comparison warnings for efl_canvas_image

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=0b177136914fd0ed4e869fe3e9734f4069c6ddc5

commit 0b177136914fd0ed4e869fe3e9734f4069c6ddc5
Author: Chris Michael 
Date:   Tue Dec 20 10:02:48 2016 -0500

evas: remove float comparison warnings for efl_canvas_image

Signed-off-by: Chris Michael 
---
 src/lib/evas/canvas/efl_canvas_image.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/efl_canvas_image.c 
b/src/lib/evas/canvas/efl_canvas_image.c
index c59f331..1c97173 100644
--- a/src/lib/evas/canvas/efl_canvas_image.c
+++ b/src/lib/evas/canvas/efl_canvas_image.c
@@ -197,7 +197,7 @@ _evas_image_load_dpi_set(Eo *eo_obj, double dpi)
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, 
EFL_CANVAS_OBJECT_CLASS);
Evas_Image_Data *o = efl_data_scope_get(eo_obj, 
EFL_CANVAS_IMAGE_INTERNAL_CLASS);
 
-   if (dpi == o->load_opts->dpi) return;
+   if (EINA_DBL_CMP(dpi, o->load_opts->dpi)) return;
evas_object_async_block(obj);
EINA_COW_LOAD_OPTS_WRITE_BEGIN(o, low)
  low->dpi = dpi;

-- 




[EGIT] [core/efl] master 04/22: evas: remove float comparison warning for evas_object_box

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a50c811ab037dd0d0e886d265eea41430cf09c92

commit a50c811ab037dd0d0e886d265eea41430cf09c92
Author: Chris Michael 
Date:   Tue Dec 20 09:34:32 2016 -0500

evas: remove float comparison warning for evas_object_box

Signed-off-by: Chris Michael 
---
 src/lib/evas/canvas/evas_object_box.c | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_box.c 
b/src/lib/evas/canvas/evas_object_box.c
index 81251c1..43f2cc1 100644
--- a/src/lib/evas/canvas/evas_object_box.c
+++ b/src/lib/evas/canvas/evas_object_box.c
@@ -701,7 +701,7 @@ _evas_box_layout_horizontal(Eo *o, Evas_Object_Box_Data 
*priv, Evas_Object_Box_D
(opt->obj, _l, _r, NULL, NULL);
 req_w += padding_l + padding_r;
 
-if (!weight_x)
+if (EINA_DBL_CMP(weight_x, 0.0))
   {
  int child_w;
 
@@ -865,7 +865,7 @@ _evas_box_layout_vertical(Eo *o, Evas_Object_Box_Data 
*priv, Evas_Object_Box_Dat
(opt->obj, NULL, NULL, _t, _b);
 req_h += padding_t + padding_b;
 
-if (!weight_y)
+if (EINA_DBL_CMP(weight_y, 0.0))
   {
  int child_h;
 
@@ -1650,7 +1650,8 @@ _evas_box_layout_stack(Eo *o, Evas_Object_Box_Data *priv, 
Evas_Object_Box_Data *
 EOLIAN static void
 _evas_box_align_set(Eo *o, Evas_Object_Box_Data *priv, double horizontal, 
double vertical)
 {
-   if (priv->align.h == horizontal && priv->align.v == vertical)
+   if ((EINA_DBL_CMP(priv->align.h, horizontal)) &&
+   (EINA_DBL_CMP(priv->align.v, vertical)))
  return;
priv->align.h = horizontal;
priv->align.v = vertical;

-- 




[EGIT] [core/efl] master 22/22: evas: remove float comparison warnings from evas_object_image

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7507efc2600bd65c0d61e0a072cf2fa25b6e4ae8

commit 7507efc2600bd65c0d61e0a072cf2fa25b6e4ae8
Author: Chris Michael 
Date:   Tue Dec 20 10:55:08 2016 -0500

evas: remove float comparison warnings from evas_object_image

Signed-off-by: Chris Michael 
---
 src/lib/evas/canvas/evas_object_image.c | 66 -
 1 file changed, 32 insertions(+), 34 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_image.c 
b/src/lib/evas/canvas/evas_object_image.c
index 5a27392..186d7e5 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -631,7 +631,7 @@ _efl_canvas_image_internal_efl_image_border_scale_set(Eo 
*eo_obj, Evas_Image_Dat
 {
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, 
EFL_CANVAS_OBJECT_CLASS);
 
-   if (scale == o->cur->border.scale) return;
+   if (EINA_DBL_CMP(scale, o->cur->border.scale)) return;
evas_object_async_block(obj);
EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
  state_write->border.scale = scale;
@@ -2059,7 +2059,7 @@ _evas_image_render(Eo *eo_obj, Evas_Object_Protected_Data 
*obj,
   bb = imh - bt;
}
   }
-if (o->cur->border.scale != 1.0)
+if (!EINA_DBL_CMP(o->cur->border.scale, 1.0))
   {
  bsl = ((double)bl * o->cur->border.scale);
  bsr = ((double)br * o->cur->border.scale);
@@ -2325,7 +2325,7 @@ evas_object_image_render_pre(Evas_Object *eo_obj,
 (o->cur->border.t != o->prev->border.t) ||
 (o->cur->border.b != o->prev->border.b) ||
 (o->cur->border.fill != o->prev->border.fill) ||
-(o->cur->border.scale != o->prev->border.scale))
+(!EINA_DBL_CMP(o->cur->border.scale, o->prev->border.scale)))
   {
  evas_object_render_pre_prev_cur_add(>clip_changes, eo_obj, 
obj);
  goto done;
@@ -2749,22 +2749,21 @@ evas_object_image_is_opaque(Evas_Object *eo_obj 
EINA_UNUSED,
 (m->points[2].a == 255) &&
 (m->points[3].a == 255))
   {
- if (
- ((m->points[0].x == m->points[3].x) &&
- (m->points[1].x == m->points[2].x) &&
- (m->points[0].y == m->points[1].y) &&
- (m->points[2].y == m->points[3].y))
- ||
- ((m->points[0].x == m->points[1].x) &&
- (m->points[2].x == m->points[3].x) &&
- (m->points[0].y == m->points[3].y) &&
- (m->points[1].y == m->points[2].y))
-)
+ if (((EINA_DBL_CMP(m->points[0].x, m->points[3].x)) &&
+  (EINA_DBL_CMP(m->points[1].x, m->points[2].x)) &&
+  (EINA_DBL_CMP(m->points[0].y, m->points[1].y)) &&
+  (EINA_DBL_CMP(m->points[2].y, m->points[3].y))) ||
+ (EINA_DBL_CMP(m->points[0].x, m->points[1].x)) &&
+ (EINA_DBL_CMP(m->points[2].x, m->points[3].x)) &&
+ (EINA_DBL_CMP(m->points[0].y, m->points[3].y)) &&
+ (EINA_DBL_CMP(m->points[1].y, m->points[2].y)))
{
-  if ((m->points[0].x == obj->cur->geometry.x) &&
-  (m->points[0].y == obj->cur->geometry.y) &&
-  (m->points[2].x == (obj->cur->geometry.x + 
obj->cur->geometry.w)) &&
-  (m->points[2].y == (obj->cur->geometry.y + 
obj->cur->geometry.h)))
+  if ((EINA_DBL_CMP(m->points[0].x, obj->cur->geometry.x)) &&
+  (EINA_DBL_CMP(m->points[0].y, obj->cur->geometry.y)) &&
+  (EINA_DBL_CMP(m->points[2].x,
+obj->cur->geometry.x + 
obj->cur->geometry.w)) &&
+  (EINA_DBL_CMP(m->points[2].y,
+obj->cur->geometry.y + 
obj->cur->geometry.h)))
 return o->cur->opaque;
}
   }
@@ -2846,22 +2845,21 @@ evas_object_image_was_opaque(Evas_Object *eo_obj 
EINA_UNUSED,
 (m->points[2].a == 255) &&
 (m->points[3].a == 255))
   {
- if (
- ((m->points[0].x == m->points[3].x) &&
- (m->points[1].x == m->points[2].x) &&
- (m->points[0].y == m->points[1].y) &&
- (m->points[2].y == m->points[3].y))
- ||
- ((m->points[0].x == m->points[1].x) &&
- (m->points[2].x == m->points[3].x) &&
- (m->points[0].y == m->points[3].y) &&
- (m->points[1].y 

[EGIT] [core/efl] master 08/22: evas: remove float comparison warnings for efl_input_pointer

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ec2238ea16dfd552fc6c56d51d79f0fca119b39b

commit ec2238ea16dfd552fc6c56d51d79f0fca119b39b
Author: Chris Michael 
Date:   Tue Dec 20 10:02:36 2016 -0500

evas: remove float comparison warnings for efl_input_pointer

Signed-off-by: Chris Michael 
---
 src/lib/evas/canvas/efl_input_pointer.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/efl_input_pointer.c 
b/src/lib/evas/canvas/efl_input_pointer.c
index 00d1054..81dea84 100644
--- a/src/lib/evas/canvas/efl_input_pointer.c
+++ b/src/lib/evas/canvas/efl_input_pointer.c
@@ -485,7 +485,10 @@ _efl_input_pointer_value_set(Eo *obj EINA_UNUSED, 
Efl_Input_Pointer_Data *pd, Ef
 return EINA_FALSE; // TODO
 
   case EFL_INPUT_VALUE_WHEEL_DIRECTION:
-pd->wheel.dir = val ? EFL_ORIENT_HORIZONTAL : EFL_ORIENT_VERTICAL;
+if (EINA_DBL_CMP(val, 0.0))
+  pd->wheel.dir = EFL_ORIENT_VERTICAL;
+else
+  pd->wheel.dir = EFL_ORIENT_HORIZONTAL;
 break;
 
   case EFL_INPUT_VALUE_SLIDER:

-- 




[EGIT] [core/efl] master 15/22: evas: remove float comparison warnings for evas_canvas3d_scene

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9a06230b8dff4b3802fe05446db4151bf53e8c81

commit 9a06230b8dff4b3802fe05446db4151bf53e8c81
Author: Chris Michael 
Date:   Tue Dec 20 10:17:47 2016 -0500

evas: remove float comparison warnings for evas_canvas3d_scene

Signed-off-by: Chris Michael 
---
 src/lib/evas/canvas/evas_canvas3d_scene.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_canvas3d_scene.c 
b/src/lib/evas/canvas/evas_canvas3d_scene.c
index 6b2b4ee..6900970 100644
--- a/src/lib/evas/canvas/evas_canvas3d_scene.c
+++ b/src/lib/evas/canvas/evas_canvas3d_scene.c
@@ -489,7 +489,8 @@ _pick_data_mesh_add(Evas_Canvas3D_Pick_Data *data, const 
Evas_Ray3 *ray,
}
   }
  }
-   else if (pdmesh->index_count == 0.0 && pdmesh->vertex_count != 0)
+   else if ((EINA_DBL_CMP(pdmesh->index_count, 0.0)) &&
+pdmesh->vertex_count != 0)
  {
 if (pdmesh->assembly == EVAS_CANVAS3D_VERTEX_ASSEMBLY_TRIANGLES)
   {

-- 




[EGIT] [core/efl] master 21/22: ecore-fb: remove float comparison warnings for ecore_fb_li

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=87c085688d5b18d8017d51cc9df603613704536c

commit 87c085688d5b18d8017d51cc9df603613704536c
Author: Chris Michael 
Date:   Tue Dec 20 10:30:04 2016 -0500

ecore-fb: remove float comparison warnings for ecore_fb_li

Signed-off-by: Chris Michael 
---
 src/lib/ecore_fb/ecore_fb_li.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore_fb/ecore_fb_li.c b/src/lib/ecore_fb/ecore_fb_li.c
index ec50a10..267d545 100644
--- a/src/lib/ecore_fb/ecore_fb_li.c
+++ b/src/lib/ecore_fb/ecore_fb_li.c
@@ -699,7 +699,8 @@ EAPI void
 ecore_fb_input_device_threshold_click_set(Ecore_Fb_Input_Device *dev, double 
threshold)
 {
if (!dev) return;
-   if ((threshold == dev->mouse.threshold) || (threshold == 0)) return;
+   if ((EINA_DBL_CMP(threshold, dev->mouse.threshold)) ||
+   (EINA_DBL_CMP(threshold, 0.0))) return;
dev->mouse.threshold = threshold;
 }
 

-- 




[EGIT] [core/efl] master 05/22: evas: remove float comparison warnings for evas_object_text

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9259f0a6431da1322a62d9a77b29f347f6a3fe0e

commit 9259f0a6431da1322a62d9a77b29f347f6a3fe0e
Author: Chris Michael 
Date:   Tue Dec 20 09:38:42 2016 -0500

evas: remove float comparison warnings for evas_object_text

Signed-off-by: Chris Michael 
---
 src/lib/evas/canvas/evas_object_text.c | 14 +++---
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_text.c 
b/src/lib/evas/canvas/evas_object_text.c
index e31a722..4d302b1 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -215,7 +215,7 @@ _evas_object_text_items_clean(Evas_Object_Protected_Data 
*obj, Evas_Text_Data *o
(_color_same(>cur.glow, >prev.glow)) &&
(_color_same(>cur.glow2, >prev.glow2)) &&
(o->cur.style == o->prev.style) &&
-   (obj->cur->scale == obj->prev->scale))
+   (EINA_DBL_CMP(obj->cur->scale, obj->prev->scale)))
  {
 if ((o->last_computed.ellipsis_start) &&
 (o->last_computed.ellipsis_start == o->items))
@@ -696,7 +696,7 @@ _evas_object_text_layout(Evas_Object *eo_obj, 
Evas_Text_Data *o, Eina_Unicode *t
if (o->items &&
!memcmp(>cur, >prev, sizeof (o->cur)) &&
o->cur.text == text &&
-   obj->cur->scale == obj->prev->scale &&
+   (EINA_DBL_CMP(obj->cur->scale, obj->prev->scale)) &&
((o->last_computed.advance <= obj->cur->geometry.w && 
!o->last_computed.ellipsis) ||
 (o->last_computed.w == obj->cur->geometry.w)) &&
!o->changed_paragraph_direction)
@@ -835,7 +835,7 @@ _evas_object_text_layout(Evas_Object *eo_obj, 
Evas_Text_Data *o, Eina_Unicode *t
 
 /* Account of the ellipsis item width. As long as ellipsis != 0
  * we have a left ellipsis. And the same with 1 and right. */
-if (o->cur.ellipsis != 0)
+if (!EINA_DBL_CMP(o->cur.ellipsis, 0.0))
   {
  if (o->last_computed.ellipsis_start)
{
@@ -850,7 +850,7 @@ _evas_object_text_layout(Evas_Object *eo_obj, 
Evas_Text_Data *o, Eina_Unicode *t
  o->last_computed.ellipsis_start = start_ellip_it;
  ellip_frame -= start_ellip_it->w;
   }
-if (o->cur.ellipsis != 1)
+if (!EINA_DBL_CMP(o->cur.ellipsis, 1.0))
   {
  /* FIXME: Should take the last item's font and style and etc. 
*//* weird it's a text, should always have the same style/font */
  if (o->last_computed.ellipsis_end)
@@ -1018,7 +1018,7 @@ _evas_text_ellipsis_set(Eo *eo_obj, Evas_Text_Data *o, 
double ellipsis)
 {
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, 
EFL_CANVAS_OBJECT_CLASS);
 
-   if (o->cur.ellipsis == ellipsis) return;
+   if (EINA_DBL_CMP(o->cur.ellipsis, ellipsis)) return;
 
evas_object_async_block(obj);
o->prev.ellipsis = o->cur.ellipsis;
@@ -2041,8 +2041,8 @@ evas_object_text_render_pre(Evas_Object *eo_obj,
if (((o->cur.ellipsis >= 0.0) &&
((obj->cur->geometry.w != o->last_computed.w) ||
(obj->cur->geometry.h != o->last_computed.h))) ||
-   (o->cur.ellipsis != o->prev.ellipsis) ||
-   (obj->cur->scale != obj->prev->scale) ||
+   (!EINA_DBL_CMP(o->cur.ellipsis, o->prev.ellipsis)) ||
+   (!EINA_DBL_CMP(obj->cur->scale, obj->prev->scale)) ||
(o->changed_paragraph_direction))
  {
 _evas_object_text_recalc(eo_obj, o->cur.text);

-- 




[EGIT] [core/efl] master 20/22: ecore-evas: remove float comparison warnings for ecore_evas.c

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e8e59204b11a78dcc18eddb9e5036c2678baf8ad

commit e8e59204b11a78dcc18eddb9e5036c2678baf8ad
Author: Chris Michael 
Date:   Tue Dec 20 10:28:39 2016 -0500

ecore-evas: remove float comparison warnings for ecore_evas.c

Signed-off-by: Chris Michael 
---
 src/lib/ecore_evas/ecore_evas.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 293b1e3..ea4ce4b 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -2553,7 +2553,7 @@ _ecore_evas_fps_debug_rendertime_add(double t)
tim = ecore_time_get();
rtime += t;
frames++;
-   if (rlapse == 0.0)
+   if (EINA_DBL_CMP(rlapse, 0.0))
  {
 rlapse = tim;
 flapse = frames;
@@ -3855,7 +3855,8 @@ _pointer_position_set(Efl_Input_Pointer_Data *ev, 
Ecore_Evas *ee, int x, int y,
 {
int fx, fy, fw, fh;
 
-   if (!mx && !my)
+   if ((EINA_DBL_CMP(mx, 0.0)) &&
+   (EINA_DBL_CMP(my, 0.0)))
  {
 mx = x;
 my = y;

-- 




[EGIT] [core/efl] master 02/22: evas: remove float comparison warning for evas_object_main

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=32745f91ae108074ffe91268c9a9f72fed9d7b16

commit 32745f91ae108074ffe91268c9a9f72fed9d7b16
Author: Chris Michael 
Date:   Tue Dec 20 09:29:49 2016 -0500

evas: remove float comparison warning for evas_object_main

Signed-off-by: Chris Michael 
---
 src/lib/evas/canvas/evas_object_main.c | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_main.c 
b/src/lib/evas/canvas/evas_object_main.c
index 5da0192..80af8a8 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -1539,7 +1539,9 @@ _efl_canvas_object_efl_gfx_size_hint_hint_align_set(Eo 
*eo_obj, Evas_Object_Prot
  return;
evas_object_async_block(obj);
_evas_object_size_hint_alloc(eo_obj, obj);
-   if ((obj->size_hints->align.x == x) && (obj->size_hints->align.y == y)) 
return;
+   if ((EINA_DBL_CMP(obj->size_hints->align.x, x)) &&
+   (EINA_DBL_CMP(obj->size_hints->align.y, y)))
+ return;
obj->size_hints->align.x = x;
obj->size_hints->align.y = y;
 
@@ -1566,7 +1568,9 @@ _efl_canvas_object_efl_gfx_size_hint_hint_weight_set(Eo 
*eo_obj, Evas_Object_Pro
  return;
evas_object_async_block(obj);
_evas_object_size_hint_alloc(eo_obj, obj);
-   if ((obj->size_hints->weight.x == x) && (obj->size_hints->weight.y == y)) 
return;
+   if ((EINA_DBL_CMP(obj->size_hints->weight.x, x)) &&
+   (EINA_DBL_CMP(obj->size_hints->weight.y, y)))
+ return;
obj->size_hints->weight.x = x;
obj->size_hints->weight.y = y;
 
@@ -1918,7 +1922,7 @@ EOLIAN static void
 _efl_canvas_object_scale_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, 
double scale)
 {
if (obj->delete_me) return;
-   if (obj->cur->scale == scale) return;
+   if (EINA_DBL_CMP(obj->cur->scale, scale)) return;
 
evas_object_async_block(obj);
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)

-- 




[EGIT] [core/efl] master 12/22: evas: remove float comparison warnings for evas_cache2

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2c9e46ace5a65596e453de6b15fd14c828e59b78

commit 2c9e46ace5a65596e453de6b15fd14c828e59b78
Author: Chris Michael 
Date:   Tue Dec 20 10:06:44 2016 -0500

evas: remove float comparison warnings for evas_cache2

Signed-off-by: Chris Michael 
---
 src/lib/evas/cache2/evas_cache2.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/lib/evas/cache2/evas_cache2.c 
b/src/lib/evas/cache2/evas_cache2.c
index 60242f8..1c72155 100644
--- a/src/lib/evas/cache2/evas_cache2.c
+++ b/src/lib/evas/cache2/evas_cache2.c
@@ -679,12 +679,12 @@ evas_cache2_image_open(Evas_Cache2 *cache, const char 
*path, const char *key,
/* use local var to copy default load options to the image entry */
if ((!lo) ||
(lo &&
-(lo->scale_down_by == 0) &&
-(lo->dpi == 0.0) &&
-((lo->w == 0) || (lo->h == 0)) &&
-((lo->region.w == 0) || (lo->region.h == 0)) &&
-((lo->scale_load.dst_w == 0) || (lo->scale_load.dst_h == 0)) &&
-(lo->orientation == 0)
+   (lo->scale_down_by == 0) &&
+   (EINA_DBL_CMP(lo->dpi, 0.0)) &&
+   ((lo->w == 0) || (lo->h == 0)) &&
+   ((lo->region.w == 0) || (lo->region.h == 0)) &&
+   ((lo->scale_load.dst_w == 0) || (lo->scale_load.dst_h == 0)) &&
+   (lo->orientation == 0)
))
  {
 lo = 

-- 




[EGIT] [core/efl] master 16/22: evas: remove float comparison warnings for evas_canvas3d_mesh

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=239d1401db0457fd8d238e99e522c39d55fd92fd

commit 239d1401db0457fd8d238e99e522c39d55fd92fd
Author: Chris Michael 
Date:   Tue Dec 20 10:21:16 2016 -0500

evas: remove float comparison warnings for evas_canvas3d_mesh

Signed-off-by: Chris Michael 
---
 src/lib/evas/canvas/evas_canvas3d_mesh.c | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/lib/evas/canvas/evas_canvas3d_mesh.c 
b/src/lib/evas/canvas/evas_canvas3d_mesh.c
index d9e5b68..98647a5 100644
--- a/src/lib/evas/canvas/evas_canvas3d_mesh.c
+++ b/src/lib/evas/canvas/evas_canvas3d_mesh.c
@@ -832,7 +832,8 @@ EOLIAN static void
 _evas_canvas3d_mesh_alpha_func_set(Eo *obj, Evas_Canvas3D_Mesh_Data *pd, 
Evas_Canvas3D_Comparison comparison,
 Evas_Real ref_value)
 {
-   if (pd->alpha_comparison == comparison && pd->alpha_ref_value == ref_value)
+   if (pd->alpha_comparison == comparison &&
+   (EINA_DBL_CMP(pd->alpha_ref_value, ref_value)))
  return;
pd->alpha_comparison = comparison;
pd->alpha_ref_value = ref_value;
@@ -933,7 +934,7 @@ evas_canvas3d_mesh_interpolate_position_get(Eina_Vector3 
*out, const Evas_Canvas
  {
 float *ptr;
 
-if (pos0->stride != 0.0)
+if (!EINA_FLT_CMP(pos0->stride, 0.0))
   ptr = (float *)((char *)pos0->data + pos0->stride * index);
 else
   ptr = (float *)pos0->data + 3 * index;
@@ -946,12 +947,12 @@ evas_canvas3d_mesh_interpolate_position_get(Eina_Vector3 
*out, const Evas_Canvas
  {
 float *ptr0, *ptr1;
 
-if (pos0->stride != 0.0)
+if (!EINA_FLT_CMP(pos0->stride, 0.0))
   ptr0 = (float *)((char *)pos0->data + pos0->stride * index);
 else
   ptr0 = (float *)pos0->data + 3 * index;
 
-if (pos1->stride != 0.0)
+if (!EINA_FLT_CMP(pos1->stride, 0.0))
   ptr1 = (float *)((char *)pos1->data + pos1->stride * index);
 else
   ptr1 = (float *)pos1->data + 3 * index;
@@ -1115,7 +1116,7 @@ EOLIAN static void
 _evas_canvas3d_mesh_shadows_constant_bias_set(Eo *obj EINA_UNUSED, 
Evas_Canvas3D_Mesh_Data *pd,
  Evas_Real bias)
 {
-   if (pd->shadows_constant_bias != bias)
+   if (!EINA_DBL_CMP(pd->shadows_constant_bias, bias))
  {
 pd->shadows_constant_bias = bias;
 evas_canvas3d_object_change(obj, 
EVAS_CANVAS3D_STATE_MESH_SHADOWS_CONSTANT_BIAS, NULL);

-- 




[EGIT] [core/efl] master 13/22: evas: remove float comparison warnings for evas_cs2_client

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=cbc60f1dd141f6239ebaf8006d2dd0644c4cdf89

commit cbc60f1dd141f6239ebaf8006d2dd0644c4cdf89
Author: Chris Michael 
Date:   Tue Dec 20 10:08:14 2016 -0500

evas: remove float comparison warnings for evas_cs2_client

Signed-off-by: Chris Michael 
---
 src/lib/evas/cserve2/evas_cs2_client.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/cserve2/evas_cs2_client.c 
b/src/lib/evas/cserve2/evas_cs2_client.c
index 626d79e..a047651 100644
--- a/src/lib/evas/cserve2/evas_cs2_client.c
+++ b/src/lib/evas/cserve2/evas_cs2_client.c
@@ -922,7 +922,7 @@ _evas_image_load_opts_empty(Evas_Image_Load_Opts *lo)
if (!lo) return EINA_TRUE;
 
return ((lo->scale_down_by == 0)
-   && (lo->dpi == 0.0)
+   && (EINA_DBL_CMP(lo->dpi, 0.0))
&& (lo->w == 0) && (lo->h == 0)
&& (lo->region.x == 0) && (lo->region.y == 0)
&& (lo->region.w == 0) && (lo->region.h == 0)
@@ -943,7 +943,7 @@ _evas_image_load_opts_equal(const Evas_Image_Load_Opts *lo1,
 const Evas_Image_Load_Opts *lo2)
 {
return ((lo1->scale_down_by == lo2->scale_down_by)
-   && (lo1->dpi == lo2->dpi)
+   && (EINA_DBL_CMP(lo1->dpi, lo2->dpi))
&& (lo1->w == lo2->w)
&& (lo1->h == lo2->h)
&& (lo1->region.x == lo2->region.x)

-- 




[EGIT] [core/efl] master 10/22: evas: remove float comparison warnings for evas_object_textgrid

2016-12-20 Thread Christopher Michael
devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=656df71b96fa482655e308c269bdfd7b45ff3d0a

commit 656df71b96fa482655e308c269bdfd7b45ff3d0a
Author: Chris Michael 
Date:   Tue Dec 20 10:03:32 2016 -0500

evas: remove float comparison warnings for evas_object_textgrid

Signed-off-by: Chris Michael 
---
 src/lib/evas/canvas/evas_object_textgrid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_object_textgrid.c 
b/src/lib/evas/canvas/evas_object_textgrid.c
index d4be74d..1c19a01 100644
--- a/src/lib/evas/canvas/evas_object_textgrid.c
+++ b/src/lib/evas/canvas/evas_object_textgrid.c
@@ -736,7 +736,7 @@ evas_object_textgrid_render_pre(Evas_Object *eo_obj,
evas_object_render_pre_prev_cur_add(>layer->evas->clip_changes, 
eo_obj, obj);
goto done;
  }
-   if (obj->cur->scale != obj->prev->scale)
+   if (!EINA_DBL_CMP(obj->cur->scale, obj->prev->scale))
  {
evas_object_render_pre_prev_cur_add(>layer->evas->clip_changes, 
eo_obj, obj);
goto done;

-- 




  1   2   >