Enlightenment CVS committal

Author  : ningerso
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_dnd.c ewl_engines.c ewl_histogram.c ewl_misc.c 


Log Message:
Use NEW macro instead of calloc.
Fix copy/paste errors in documentation.
Add ewl_engine_pointer_free.

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_dnd.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -3 -r1.27 -r1.28
--- ewl_dnd.c   13 Oct 2006 01:50:44 -0000      1.27
+++ ewl_dnd.c   13 Oct 2006 02:08:00 -0000      1.28
@@ -489,7 +489,7 @@
                while (*tmp) tmp++;
        }
 
-       list = calloc(count + 1, sizeof(char *));
+       list = NEW(char *, count + 1);
        for (tmp = types, count = 0; *tmp; tmp++, count++) {
                list[count] = strdup(tmp);
                while (*tmp) tmp++;
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_engines.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -3 -r1.16 -r1.17
--- ewl_engines.c       13 Oct 2006 01:53:05 -0000      1.16
+++ ewl_engines.c       13 Oct 2006 02:08:00 -0000      1.17
@@ -1183,8 +1183,8 @@
 }
 
 /**
- * @return Returns a pointer id on success, zero on failure.
- * @brief Creates a new pointer from ARGB data.
+ * @return Returns no value.
+ * @brief Change the current pointer to the one identified.
  */
 void
 ewl_engine_pointer_set(Ewl_Embed *embed, int pointer)
@@ -1205,6 +1205,28 @@
 }
 
 /**
+ * @return Returns no value.
+ * @brief Free the identified pointer.
+ */
+void
+ewl_engine_pointer_free(Ewl_Embed *embed, int pointer)
+{
+       Ewl_Engine_Cb_Pointer_Set pointer_free;
+
+       DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR("embed", embed);
+       DCHECK_TYPE("embed", embed, EWL_EMBED_TYPE);
+
+       pointer_free = ewl_engine_hook_get(embed,
+                                       EWL_ENGINE_HOOK_TYPE_POINTER,
+                                       EWL_ENGINE_POINTER_FREE);
+       if (pointer_free)
+               pointer_free(embed, pointer);
+
+       DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+/**
  * @return Returns a pointer id on success, zero on failure.
  * @brief Retrieve the currently used pointer.
  */
@@ -1296,7 +1318,7 @@
 }
 
 /**
- * @param embed: The embeddow to lookup the engine chain for hook matching
+ * @param embed: The embed to lookup the engine chain for hook matching
  * @param type: The Ewl_Engine_Hook type to find the best matching function
  * @return Returns a list of engine hooks matching on success.
  * @brief Retrieves a list of dependent engine callbacks for the specified 
type.
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_histogram.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- ewl_histogram.c     9 Oct 2006 05:23:00 -0000       1.7
+++ ewl_histogram.c     13 Oct 2006 02:08:00 -0000      1.8
@@ -17,7 +17,7 @@
 
        DENTER_FUNCTION(DLEVEL_STABLE);
 
-       hist = calloc(1, sizeof(Ewl_Histogram));
+       hist = NEW(Ewl_Histogram, 1);
        if (!hist)
                DRETURN_PTR(NULL, DLEVEL_STABLE);
 
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_misc.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -3 -r1.67 -r1.68
--- ewl_misc.c  30 Sep 2006 22:31:36 -0000      1.67
+++ ewl_misc.c  13 Oct 2006 02:08:00 -0000      1.68
@@ -1165,7 +1165,7 @@
        if (ewl_debug_indent_lvl < 0)
                ewl_debug_indent_lvl = 0;
 
-       indent = calloc((ewl_debug_indent_lvl << 1) + 2, sizeof(char *)); 
+       indent = NEW(char *, (ewl_debug_indent_lvl << 1) + 2); 
        memset(indent, ' ', (ewl_debug_indent_lvl << 1) + 1);
 
        if (mod_dir > 0) ewl_debug_indent_lvl ++;



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to