hi guys,

attached are some patches for epsilon, mostly small bugfixes.

any comments?

BR,
-- 
// leo

-------------------------------------------------------
Leonardo Sobral Cunha
OpenBossa Labs
INdT - Instituto Nokia de Tecnologia
PGP: 0x5751676C @ wwwkeys.pgp.net
-------------------------------------------------------
From d365c959ca9f5a13cc07893d59d43d4c1e5287ff Mon Sep 17 00:00:00 2001
From: Leonardo Sobral Cunha <[EMAIL PROTECTED]>
Date: Sat, 24 Nov 2007 02:29:51 -0300
Subject: [PATCH] Fixed w <-> h unnoticed miss-exchange

When calculating thumbnail geometry
---
 src/lib/Epsilon.c |   32 ++++++++++++++++----------------
 1 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/src/lib/Epsilon.c b/src/lib/Epsilon.c
index 315154b..2f44f14 100644
--- a/src/lib/Epsilon.c
+++ b/src/lib/Epsilon.c
@@ -577,13 +577,13 @@ epsilon_generate (Epsilon * e)
       epeg_size_get (im, &iw, &ih);
       if (iw > ih)
 	{
-	  th = e->th * ((double) ih / (double) iw);
-	   if (th < 1) th = 1;
+	  th = ((unsigned long) e->tw * ih) / iw;
+	  if (th < 1) th = 1;
 	}
       else
 	{
-	  tw = e->tw * ((double) iw / (double) ih);
-	   if (tw < 1) tw = 1;
+	  tw = ((unsigned long) e->th *  iw) / ih;
+	  if (tw < 1) tw = 1;
 	}
       epeg_decode_size_set (im, tw, th);
       epeg_quality_set (im, 100);
@@ -695,18 +695,18 @@ epsilon_generate (Epsilon * e)
 #ifdef HAVE_PNG_H
     if (tmp)
       {
-	iw = imlib_image_get_width ();
-	ih = imlib_image_get_height ();
-	if (iw > ih)
-	  {
-	    th = e->th * ((double) ih / (double) iw);
-	   if (th < 1) th = 1;
-	  }
-	else
-	  {
-	    tw = e->tw * ((double) iw / (double) ih);
-	   if (tw < 1) tw = 1;
-	  }
+        iw = imlib_image_get_width ();
+        ih = imlib_image_get_height ();
+        if (iw > ih)
+          {
+            th = ((unsigned long) e->tw * ih) / iw;
+            if (th < 1) th = 1;
+          }
+        else
+          {
+            tw = ((unsigned long) e->th *  iw) / ih;
+            if (tw < 1) tw = 1;
+          }
 	imlib_context_set_cliprect (0, 0, tw, th);
 	if ((src = imlib_create_cropped_scaled_image (0, 0, iw, ih, tw, th)))
 	  {
-- 
1.5.3.6

From b6e5b2a8099a0e9d497022ee8c50330b022a6962 Mon Sep 17 00:00:00 2001
From: Leonardo Sobral Cunha <[EMAIL PROTECTED]>
Date: Wed, 5 Dec 2007 16:50:52 -0300
Subject: [PATCH] Fix alignment patch

---
 src/lib/exiftags/canon.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/lib/exiftags/canon.c b/src/lib/exiftags/canon.c
index 675c223..d757696 100644
--- a/src/lib/exiftags/canon.c
+++ b/src/lib/exiftags/canon.c
@@ -52,7 +52,7 @@
 struct ccstm {
 	int32_t val;
 	struct descrip *table;
-	const char descr[];
+	const char *descr;
 };
 
 
-- 
1.5.3.6

From 264627decb0e1ce453ae7be752adf8c7f4a3ecef Mon Sep 17 00:00:00 2001
From: Leonardo Sobral Cunha <[EMAIL PROTECTED]>
Date: Fri, 7 Dec 2007 17:54:28 -0300
Subject: [PATCH] Added IF in epsilon_thumb.c's epsilon_cb_server_data to avoid segfault

---
 src/lib/epsilon_thumb.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/lib/epsilon_thumb.c b/src/lib/epsilon_thumb.c
index 780e260..a791635 100644
--- a/src/lib/epsilon_thumb.c
+++ b/src/lib/epsilon_thumb.c
@@ -218,6 +218,9 @@ epsilon_cb_server_data(void *data, int type, void *event)
 	if (e->server != epsilon_server)
 		return 1;
 
+	if (!(e && e->data))
+		return 1;
+
 	msg = e->data;
 	Epsilon_Request *thumb;
 
-- 
1.5.3.6

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to