Enlightenment CVS committal

Author  : lordchaos
Project : e17
Module  : proto

Dir     : e17/proto/etk/src/lib


Modified Files:
        etk_box.c etk_cache.c etk_dialog.c etk_drag.c 
        etk_editable_text_object.c etk_notebook.c etk_object.c 
        etk_property.c etk_radio_button.c etk_signal.c 
        etk_signal_callback.c etk_statusbar.c etk_string.c etk_table.c 
        etk_textblock.c etk_theme.c etk_toplevel_widget.c etk_tree.c 
        etk_type.c etk_widget.c 


Log Message:
* malloc -> calloc

===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_box.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- etk_box.c   11 Feb 2006 00:39:12 -0000      1.6
+++ etk_box.c   27 Feb 2006 22:00:16 -0000      1.7
@@ -304,7 +304,7 @@
    /* TODO: con_remove */
    if (child->parent && ETK_IS_CONTAINER(child->parent))
       etk_container_remove(ETK_CONTAINER(child->parent), child);
-   child_props = malloc(sizeof(Etk_Box_Child_Props));
+   child_props = calloc(1,sizeof(Etk_Box_Child_Props));
    child_props->expand = expand;
    child_props->fill = fill;
    child_props->padding = padding;
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_cache.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- etk_cache.c 11 Feb 2006 00:28:33 -0000      1.1
+++ etk_cache.c 27 Feb 2006 22:00:16 -0000      1.2
@@ -151,7 +151,7 @@
    if (!(cache_system = _etk_cache_system_get(evas)) && !(cache_system = 
_etk_cache_system_create(evas)))
       return;
    
-   new_item = malloc(sizeof(Etk_Cache_Image_Object_Item));
+   new_item = calloc(1,sizeof(Etk_Cache_Image_Object_Item));
    new_item->filename = strdup(filename);
    new_item->image_object = image_object;
    evas_object_hide(new_item->image_object);
@@ -287,7 +287,7 @@
    if (!(cache_system = _etk_cache_system_get(evas)) && !(cache_system = 
_etk_cache_system_create(evas)))
       return;
    
-   new_item = malloc(sizeof(Etk_Cache_Edje_Object_Item));
+   new_item = calloc(1,sizeof(Etk_Cache_Edje_Object_Item));
    new_item->filename = strdup(filename);
    new_item->group = strdup(group);
    new_item->state = ETK_MIN(state, -1);
@@ -451,7 +451,7 @@
    if (!evas)
       return NULL;
    
-   cache_system = malloc(sizeof(Etk_Cache_System));
+   cache_system = calloc(1,sizeof(Etk_Cache_System));
    cache_system->evas = evas;
    
    cache_system->max_image_objects = 256;
@@ -580,7 +580,7 @@
    if (!filename || !group)
       return NULL;
    
-   key = malloc(strlen(filename) + strlen(group) + 2);
+   key = calloc(1,strlen(filename) + strlen(group) + 2);
    sprintf(key, "%s/%s", filename, group);
    return key;
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_dialog.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- etk_dialog.c        15 Jan 2006 11:07:16 -0000      1.3
+++ etk_dialog.c        27 Feb 2006 22:00:16 -0000      1.4
@@ -155,7 +155,7 @@
    button = etk_button_new_with_label(label);
    etk_widget_visibility_locked_set(button, ETK_TRUE);
    
-   id = malloc(sizeof(int));
+   id = calloc(1,sizeof(int));
    *id = response_id;
    etk_object_data_set_full(ETK_OBJECT(dialog), "_Etk_Dialog::response_id", 
id, free);
    
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_drag.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- etk_drag.c  20 Feb 2006 10:31:28 -0000      1.3
+++ etk_drag.c  27 Feb 2006 22:00:16 -0000      1.4
@@ -66,7 +66,7 @@
 {
    int i;
    
-   drag->types = malloc(num_types * sizeof(char *));
+   drag->types = calloc(1,num_types * sizeof(char *));
    
    for (i = 0; i < num_types; i++)
      drag->types[i] = strdup(types[i]);
===================================================================
RCS file: 
/cvsroot/enlightenment/e17/proto/etk/src/lib/etk_editable_text_object.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- etk_editable_text_object.c  15 Jan 2006 11:07:16 -0000      1.7
+++ etk_editable_text_object.c  27 Feb 2006 22:00:16 -0000      1.8
@@ -471,7 +471,7 @@
       _etk_editable_text_style_use_count = 0;
    }
 
-   editable_text_sd = malloc(sizeof(Etk_Editable_Text_Smart_Data));
+   editable_text_sd = calloc(1,sizeof(Etk_Editable_Text_Smart_Data));
    editable_text_sd->show_cursor = ETK_FALSE;
    editable_text_sd->cursor_at_the_end = ETK_TRUE;
    editable_text_sd->cursor_timer = NULL;
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_notebook.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- etk_notebook.c      11 Feb 2006 00:28:33 -0000      1.8
+++ etk_notebook.c      27 Feb 2006 22:00:16 -0000      1.9
@@ -382,7 +382,7 @@
    if (!notebook)
       return NULL;
    
-   new_page = malloc(sizeof(Etk_Notebook_Page));
+   new_page = calloc(1,sizeof(Etk_Notebook_Page));
    prev_page = notebook->pages ? notebook->pages->data : NULL;
    new_page->tab = etk_widget_new(ETK_RADIO_BUTTON_TYPE, "theme_group", 
"notebook_tab", "label", tab_label,
       "group", prev_page ? 
etk_radio_button_group_get(ETK_RADIO_BUTTON(prev_page->tab)) : NULL, NULL);
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_object.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- etk_object.c        13 Feb 2006 12:56:03 -0000      1.11
+++ etk_object.c        27 Feb 2006 22:00:16 -0000      1.12
@@ -94,7 +94,7 @@
    if (!object_type)
       return NULL;
 
-   new_object = malloc(object_type->type_size);
+   new_object = calloc(1,object_type->type_size);
    new_object->type = object_type;
    _etk_object_created_objects = evas_list_append(_etk_object_created_objects, 
new_object);
    
@@ -284,7 +284,7 @@
       free(data);
    }
    
-   data = malloc(sizeof(Etk_Object_Data));
+   data = calloc(1,sizeof(Etk_Object_Data));
    data->value = value;
    data->free_cb = free_cb;
    object->data_hash = evas_hash_add(object->data_hash, key, data);
@@ -483,12 +483,12 @@
 
    if (!(list = evas_hash_find(object->notification_callbacks_hash, 
property_name)))
    {
-      list = malloc(sizeof(Evas_List *));
+      list = calloc(1,sizeof(Evas_List *));
       *list = NULL;
       object->notification_callbacks_hash = 
evas_hash_add(object->notification_callbacks_hash, property_name, list);
    }
 
-   new_callback = malloc(sizeof(Etk_Notification_Callback));
+   new_callback = calloc(1,sizeof(Etk_Notification_Callback));
    new_callback->callback = callback;
    new_callback->data = data;
    *list = evas_list_append(*list, new_callback);
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_property.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- etk_property.c      13 Feb 2006 12:56:03 -0000      1.4
+++ etk_property.c      27 Feb 2006 22:00:16 -0000      1.5
@@ -32,7 +32,7 @@
    if (!name)
       return NULL;
 
-   new_property = malloc(sizeof(Etk_Property));
+   new_property = calloc(1,sizeof(Etk_Property));
    new_property->name = strdup(name);
    new_property->id = property_id;
    new_property->type = type;
@@ -114,7 +114,7 @@
 Etk_Property_Value *etk_property_value_new()
 {
    Etk_Property_Value *new_value;
-   new_value = malloc(sizeof(Etk_Property_Value));
+   new_value = calloc(1,sizeof(Etk_Property_Value));
    new_value->type = ETK_PROPERTY_NONE;
    return new_value;
 }
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_radio_button.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- etk_radio_button.c  15 Jan 2006 11:07:16 -0000      1.4
+++ etk_radio_button.c  27 Feb 2006 22:00:16 -0000      1.5
@@ -113,7 +113,7 @@
 
    if (!group)
    {
-      group = malloc(sizeof(Evas_List *));
+      group = calloc(1,sizeof(Evas_List *));
       *group = NULL;
       active = ETK_TRUE;
    }
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_signal.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- etk_signal.c        15 Jan 2006 11:07:16 -0000      1.6
+++ etk_signal.c        27 Feb 2006 22:00:16 -0000      1.7
@@ -56,7 +56,7 @@
    if (!signal_name || !object_type || !marshaller)
       return NULL;
 
-   new_signal = malloc(sizeof(Etk_Signal));
+   new_signal = calloc(1,sizeof(Etk_Signal));
    new_signal->name = strdup(signal_name);
    new_signal->object_type = object_type;
    new_signal->default_handler_offset = default_handler_offset;
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_signal_callback.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- etk_signal_callback.c       2 Dec 2005 21:57:55 -0000       1.3
+++ etk_signal_callback.c       27 Feb 2006 22:00:16 -0000      1.4
@@ -30,7 +30,7 @@
    if (!signal || !callback)
       return NULL;
 
-   new_callback = malloc(sizeof(Etk_Signal_Callback));
+   new_callback = calloc(1,sizeof(Etk_Signal_Callback));
    new_callback->signal = signal;
    new_callback->callback = callback;
    new_callback->data = data;
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_statusbar.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- etk_statusbar.c     15 Jan 2006 11:07:16 -0000      1.5
+++ etk_statusbar.c     27 Feb 2006 22:00:17 -0000      1.6
@@ -97,12 +97,12 @@
    if (!statusbar || !context)
       return -1;
    
-   key = malloc(strlen("_Etk_Statusbar::") + strlen(context) + 1);
+   key = calloc(1,strlen("_Etk_Statusbar::") + strlen(context) + 1);
    sprintf(key, "_Etk_Statusbar::%s", context);
    
    if (!(context_id = etk_object_data_get(ETK_OBJECT(statusbar), key)))
    {
-      context_id = malloc(sizeof(int));
+      context_id = calloc(1,sizeof(int));
       *context_id = statusbar->next_context_id++;
       etk_object_data_set_full(ETK_OBJECT(statusbar), key, context_id, free);
    }
@@ -125,7 +125,7 @@
    if (!statusbar || !message)
       return -1;
    
-   new_msg = malloc(sizeof(Etk_Statusbar_Msg));
+   new_msg = calloc(1,sizeof(Etk_Statusbar_Msg));
    new_msg->msg = strdup(message);
    new_msg->context_id = context_id;
    new_msg->message_id = statusbar->next_message_id++;
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_string.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- etk_string.c        11 Feb 2006 00:28:33 -0000      1.3
+++ etk_string.c        27 Feb 2006 22:00:17 -0000      1.4
@@ -185,7 +185,7 @@
       if (size > string->allocated_length)
       {
          free(string->string);
-         string->string = malloc(ETK_STRING_SIZE_TO_ALLOC(size) + 1);
+         string->string = calloc(1,ETK_STRING_SIZE_TO_ALLOC(size) + 1);
          string->allocated_length = ETK_STRING_SIZE_TO_ALLOC(size);
       }
       
@@ -570,7 +570,7 @@
    
    va_copy(args2, args);
    length = vsnprintf(&c, 1, format, args2);
-   text = malloc(length + 1);
+   text = calloc(1,length + 1);
    vsprintf(text, format, args2);
    va_end(args2);
    
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_table.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- etk_table.c 11 Feb 2006 00:28:33 -0000      1.7
+++ etk_table.c 27 Feb 2006 22:00:17 -0000      1.8
@@ -144,8 +144,8 @@
    else
    {
       new_cells = calloc(num_cols * num_rows, sizeof(Etk_Table_Cell *));
-      new_cols = malloc(num_cols * sizeof(Etk_Table_Col_Row));
-      new_rows = malloc(num_rows * sizeof(Etk_Table_Col_Row));
+      new_cols = calloc(1,num_cols * sizeof(Etk_Table_Col_Row));
+      new_rows = calloc(1,num_rows * sizeof(Etk_Table_Col_Row));
    }
    
    for (l = table->children; l; )
@@ -215,7 +215,7 @@
    if (child->parent && ETK_IS_CONTAINER(child->parent))
       etk_container_remove(ETK_CONTAINER(child->parent), child);
    
-   cell = malloc(sizeof(Etk_Table_Cell));
+   cell = calloc(1,sizeof(Etk_Table_Cell));
    cell->left_attach = left_attach;
    cell->right_attach = right_attach;
    cell->top_attach = top_attach;
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_textblock.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- etk_textblock.c     17 Feb 2006 17:30:38 -0000      1.5
+++ etk_textblock.c     27 Feb 2006 22:00:17 -0000      1.6
@@ -167,7 +167,7 @@
    if (!textblock)
       return NULL;
    
-   new_iter = malloc(sizeof(Etk_Textblock_Iter));
+   new_iter = calloc(1,sizeof(Etk_Textblock_Iter));
    new_iter->cursor = 
evas_object_textblock_cursor_new(textblock->textblock_object);
    new_iter->textblock = textblock;
    
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_theme.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- etk_theme.c 11 Feb 2006 00:28:35 -0000      1.2
+++ etk_theme.c 27 Feb 2006 22:00:17 -0000      1.3
@@ -222,7 +222,7 @@
    if (!theme_name || !subdir)
       return ETK_FALSE;
    
-   path = malloc(strlen(subdir) + strlen(PACKAGE_DATA_DIR"//.edj") + 
strlen(theme_name) + 1);
+   path = calloc(1,strlen(subdir) + strlen(PACKAGE_DATA_DIR"//.edj") + 
strlen(theme_name) + 1);
    sprintf(path, PACKAGE_DATA_DIR"/%s/%s.edj", subdir, theme_name);
    if (ecore_file_exists(path))
       return path;
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_toplevel_widget.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- etk_toplevel_widget.c       12 Feb 2006 20:08:20 -0000      1.11
+++ etk_toplevel_widget.c       27 Feb 2006 22:00:17 -0000      1.12
@@ -160,7 +160,7 @@
    if (!toplevel_widget)
       return;
 
-   new_pointer_type = malloc(sizeof(Etk_Pointer_Type));
+   new_pointer_type = calloc(1,sizeof(Etk_Pointer_Type));
    *new_pointer_type = pointer_type;
    prev_pointer_type = 
evas_list_data(evas_list_last(toplevel_widget->pointer_stack));
    toplevel_widget->pointer_stack = 
evas_list_append(toplevel_widget->pointer_stack, new_pointer_type);
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_tree.c,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -3 -r1.50 -r1.51
--- etk_tree.c  27 Feb 2006 10:46:38 -0000      1.50
+++ etk_tree.c  27 Feb 2006 22:00:17 -0000      1.51
@@ -843,7 +843,7 @@
    for (num_rows = 0, r = tree->root.first_child; r; r = r->next, num_rows++);
    if (num_rows <= 1)
       return;
-   heap = malloc(num_rows * sizeof(Etk_Tree_Row *));
+   heap = calloc(1,num_rows * sizeof(Etk_Tree_Row *));
    asc = ascendant ? -1 : 1;
    
    /* We insert all the rows in the heap */
@@ -2434,7 +2434,7 @@
    if (!tree || !tree->built || !row)
       return NULL;
 
-   new_row = malloc(sizeof(Etk_Tree_Row));
+   new_row = calloc(1,sizeof(Etk_Tree_Row));
    new_row->tree = tree;
    new_row->parent = row;
    new_row->first_child = NULL;
@@ -2447,7 +2447,7 @@
    new_row->data_free_cb = NULL;
    new_row->row_objects = NULL;
 
-   new_row->cells_data = malloc(sizeof(void *) * tree->num_cols);
+   new_row->cells_data = calloc(1,sizeof(void *) * tree->num_cols);
    for (i = 0; i < tree->num_cols; i++)
    {
       new_row->cells_data[i] = calloc(1, 
tree->columns[i]->model->cell_data_size);
@@ -2569,7 +2569,7 @@
    if (!tree || !tree->built || !(evas = 
etk_widget_toplevel_evas_get(ETK_WIDGET(tree))))
       return NULL;
 
-   new_row_objects = malloc(sizeof(Etk_Tree_Row_Objects));
+   new_row_objects = calloc(1,sizeof(Etk_Tree_Row_Objects));
    new_row_objects->row = NULL;
    
    /* Creates the background object of the row */
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_type.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- etk_type.c  15 Jan 2006 11:07:17 -0000      1.5
+++ etk_type.c  27 Feb 2006 22:00:17 -0000      1.6
@@ -51,7 +51,7 @@
    if (!type_name)
       return NULL;
 
-   new_type = malloc(sizeof(Etk_Type));
+   new_type = calloc(1,sizeof(Etk_Type));
    new_type->name = strdup(type_name);
    new_type->type_size = type_size;
    new_type->constructor = constructor;
@@ -72,7 +72,7 @@
       int i;
 
       new_type->hierarchy_depth = parent_type->hierarchy_depth + 1;
-      new_type->hierarchy = malloc(sizeof(Etk_Type *) * 
new_type->hierarchy_depth);
+      new_type->hierarchy = calloc(1,sizeof(Etk_Type *) * 
new_type->hierarchy_depth);
       new_type->hierarchy[0] = parent_type;
       for (i = 1; i < new_type->hierarchy_depth; i++)
          new_type->hierarchy[i] = parent_type->hierarchy[i - 1];
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_widget.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -3 -r1.39 -r1.40
--- etk_widget.c        21 Feb 2006 00:56:09 -0000      1.39
+++ etk_widget.c        27 Feb 2006 22:00:17 -0000      1.40
@@ -1126,7 +1126,7 @@
    if (_etk_widget_member_object_find(widget, object))
       return ETK_TRUE;
    
-   member_object = malloc(sizeof(Etk_Widget_Member_Object));
+   member_object = calloc(1,sizeof(Etk_Widget_Member_Object));
    member_object->object = object;
    member_object->visible = evas_object_visible_get(object);
    member_object->swallowed = ETK_FALSE;
@@ -2413,7 +2413,7 @@
    if ((previously_swallowed = 
edje_object_part_swallow_get(swallowing_widget->theme_object, part)))
       etk_widget_theme_object_unswallow(swallowing_widget, 
previously_swallowed);
    
-   swallowed_object = malloc(sizeof(Etk_Widget_Swallowed_Object));
+   swallowed_object = calloc(1,sizeof(Etk_Widget_Swallowed_Object));
    swallowed_object->object = object;
    swallowed_object->swallowing_part = strdup(part);
    swallowed_object->widget = widget;




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to