Enlightenment CVS committal

Author  : rbdpngn
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src


Modified Files:
        Ewl.h ewl_object.c ewl_object.h 


Log Message:
Some debugging changes to help track down x86 sizing bug.

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/Ewl.h,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -3 -r1.36 -r1.37
--- Ewl.h       18 Oct 2003 17:00:35 -0000      1.36
+++ Ewl.h       20 Oct 2003 15:42:57 -0000      1.37
@@ -239,6 +239,7 @@
 #include <stdlib.h>
 #include <stdint.h>
 #include <string.h>
+#include <limits.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_object.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -3 -r1.46 -r1.47
--- ewl_object.c        18 Oct 2003 17:00:36 -0000      1.46
+++ ewl_object.c        20 Oct 2003 15:42:57 -0000      1.47
@@ -130,7 +130,8 @@
        if (w > MAXIMUM_W(o))
                w = MAXIMUM_W(o);
 
-       w += PADDING_HORIZONTAL(o) + INSET_HORIZONTAL(o);
+       if ((w + PADDING_HORIZONTAL(o) + INSET_HORIZONTAL(o)) > w)
+               w += PADDING_HORIZONTAL(o) + INSET_HORIZONTAL(o);
 
        DRETURN_INT(w, DLEVEL_STABLE);
 }
@@ -157,7 +158,8 @@
        if (h > MAXIMUM_H(o))
                h = MAXIMUM_H(o);
 
-       h += PADDING_VERTICAL(o) + INSET_VERTICAL(o);
+       if ((h + PADDING_VERTICAL(o) + INSET_VERTICAL(o)) > h)
+               h += PADDING_VERTICAL(o) + INSET_VERTICAL(o);
 
        DRETURN_INT(h, DLEVEL_STABLE);
 }
@@ -584,6 +586,11 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("o", o);
 
+       if (w < 1) {
+               ewl_print_warning();
+               DRETURN(DLEVEL_STABLE);
+       }
+
        old_size = MINIMUM_W(o);
 
        new_size = MINIMUM_W(o) = w;
@@ -620,6 +627,11 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("o", o);
 
+       if (h < 1) {
+               ewl_print_warning();
+               DRETURN(DLEVEL_STABLE);
+       }
+
        old_size = MINIMUM_H(o);
 
        new_size = MINIMUM_H(o) = h;
@@ -745,6 +757,11 @@
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("o", o);
 
+       if (w < 1) {
+               ewl_print_warning();
+               DRETURN(DLEVEL_STABLE);
+       }
+
        MAXIMUM_W(o) = w;
 
        if (MINIMUM_W(o) > w)
@@ -774,6 +791,11 @@
 {
        DENTER_FUNCTION(DLEVEL_STABLE);
        DCHECK_PARAM_PTR("o", o);
+
+       if (h < 1) {
+               ewl_print_warning();
+               DRETURN(DLEVEL_STABLE);
+       }
 
        o->maximum.h = h;
 
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_object.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -3 -r1.37 -r1.38
--- ewl_object.h        20 Oct 2003 05:05:48 -0000      1.37
+++ ewl_object.h        20 Oct 2003 15:42:57 -0000      1.38
@@ -16,7 +16,7 @@
 /**
  * @def EWL_OBJECT_MIN_SIZE The maximum possible size any object can receive.
  */
-#define EWL_OBJECT_MAX_SIZE (2147483647)
+#define EWL_OBJECT_MAX_SIZE (INT_MAX)
 
 /**
  * The base class inherited by all widgets. Provides methods for size and




-------------------------------------------------------
This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo
The Event For Linux Datacenter Solutions & Strategies in The Enterprise 
Linux in the Boardroom; in the Front Office; & in the Server Room 
http://www.enterpriselinuxforum.com
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to