Enlightenment CVS committal Author : raster Project : e17 Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_x Modified Files: ecore_x_window_shape.c Log Message: ok damn bsd users - u get to have no alloca - damn lowest common denominator. =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_window_shape.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- ecore_x_window_shape.c 15 Oct 2005 08:51:52 -0000 1.7 +++ ecore_x_window_shape.c 17 Oct 2005 09:59:23 -0000 1.8 @@ -1,7 +1,6 @@ #include "Ecore.h" #include "ecore_x_private.h" #include "Ecore_X.h" -#include <alloca.h> /** * @defgroup Ecore_X_Window_Shape X Window Shape Functions @@ -55,16 +54,22 @@ if (num > 0) { - rect = alloca(sizeof(XRectangle) * num); - for (i = 0; i < num; i++) + rect = malloc(sizeof(XRectangle) * num); + if (rect) { - rect[i].x = rects[i].x; - rect[i].y = rects[i].y; - rect[i].width = rects[i].width; - rect[i].height = rects[i].height; + for (i = 0; i < num; i++) + { + rect[i].x = rects[i].x; + rect[i].y = rects[i].y; + rect[i].width = rects[i].width; + rect[i].height = rects[i].height; + } } + else + num = 0; } XShapeCombineRectangles(_ecore_x_disp, win, ShapeBounding, 0, 0, rect, num, ShapeSet, Unsorted); + if (rect) free(rect); } void @@ -111,16 +116,22 @@ if (num > 0) { - rect = alloca(sizeof(XRectangle) * num); - for (i = 0; i < num; i++) + rect = malloc(sizeof(XRectangle) * num); + if (rect) { - rect[i].x = rects[i].x; - rect[i].y = rects[i].y; - rect[i].width = rects[i].width; - rect[i].height = rects[i].height; + for (i = 0; i < num; i++) + { + rect[i].x = rects[i].x; + rect[i].y = rects[i].y; + rect[i].width = rects[i].width; + rect[i].height = rects[i].height; + } } + else + num = 0; } XShapeCombineRectangles(_ecore_x_disp, win, ShapeBounding, 0, 0, rect, num, ShapeUnion, Unsorted); + if (rect) free(rect); } Ecore_X_Rectangle * ------------------------------------------------------- This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs