Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir     : e17/libs/evas/src/lib/data


Modified Files:
        evas_hash.c evas_list.c evas_object_list.c 


Log Message:


whitespace

===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/data/evas_hash.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- evas_hash.c 16 Aug 2004 05:13:25 -0000      1.8
+++ evas_hash.c 22 May 2005 02:49:36 -0000      1.9
@@ -11,11 +11,11 @@
 {
    unsigned int hash_num = 0;
    const unsigned char *ptr;
-   
+
    if (!key) return 0;
-   
+
    for (ptr = (unsigned char *)key; *ptr; ptr++) hash_num ^= (int)(*ptr);
-   
+
    hash_num &= 0xff;
    return (int)hash_num;
 }
@@ -30,7 +30,7 @@
  * @code
  * Evas_Hash *hash = NULL;
  * extern void *my_data;
- * 
+ *
  * hash = evas_hash_add(hash, "My Data", my_data);
  * if (evas_hash_alloc_error())
  *   {
@@ -48,7 +48,7 @@
  * @code
  * extern Evas_Hash *hash;
  * extern void *data;
- * 
+ *
  * printf("Insert some data...\n");
  * hash = evas_hash_add(hash, "My Data", my_data);
  * printf("Removing by key...\n");
@@ -108,7 +108,7 @@
        _evas_hash_alloc_error = 1;
        return hash;
      };
-   if (key) 
+   if (key)
      {
         el->key = strdup(key);
        if (!el->key)
@@ -119,7 +119,7 @@
          }
         hash_num = evas_hash_gen(key);
      }
-   else 
+   else
      {
         el->key = NULL;
        hash_num = 0;
@@ -158,7 +158,7 @@
    int hash_num;
    Evas_Hash_El *el;
    Evas_Object_List *l;
-   
+
    if (!hash) return NULL;
    hash_num = evas_hash_gen(key);
    for (l = hash->buckets[hash_num]; l; l = l->next)
@@ -250,17 +250,17 @@
 /**
  * Free an entire hash table
  * @param hash The hash table to be freed
- * 
+ *
  * This function frees up all the memory allocated to storing the specified
  * hash tale pointed to by @p hash. Any entries in the table that the program
  * has no more pointers for elsewhere may now be lost, so this should only be
  * called if the program has lready freed any allocated data in the hash table
  * or has the pointers for data in teh table stored elswehere as well.
- * 
+ *
  * Example:
  * @code
  * extern Evas_Hash *hash;
- * 
+ *
  * evas_hash_free(hash);
  * hash = NULL;
  * @endcode
@@ -270,7 +270,7 @@
 evas_hash_free(Evas_Hash *hash)
 {
    int i, size;
-   
+
    if (!hash) return;
    size = evas_hash_size(hash);
    for (i = 0; i < size; i++)
@@ -278,7 +278,7 @@
        while (hash->buckets[i])
          {
             Evas_Hash_El *el;
-            
+
             el = (Evas_Hash_El *)hash->buckets[i];
             if (el->key) free(el->key);
             hash->buckets[i] = evas_object_list_remove(hash->buckets[i], el);
@@ -293,27 +293,27 @@
  * @param hash The hash table whose members will be walked
  * @param func The function to call on each parameter
  * @param fdata The data pointer to pass to the function being called
- * 
+ *
  * This function goes through every entry in the hash table @p hash and calls
  * the function @p func on each member. The function should NOT modify the
  * hash table contents if it reeturns 1. IF the hash table contents are
  * modified by this function or the function wishes to stop processing it must
  * return 0, otherwise return 1 to keep processing.
- * 
+ *
  * Example:
  * @code
  * extern Evas_Hash *hash;
- * 
+ *
  * Evas_Bool hash_fn(Evas_Hash *hash, const char *key, void *data, void *fdata)
  * {
  *   printf("Func data: %s, Hash entry: %s / %p\n", fdata, key, data);
  *   return 1;
  * }
- * 
+ *
  * int main(int argc, char **argv)
  * {
  *   char *hash_fn_data;
- * 
+ *
  *   hash_fn_data = strdup("Hello World");
  *   evas_hash_foreach(hash, hash_fn, hash_fn_data);
  *   free(hash_fn_data);
@@ -331,11 +331,11 @@
    for (i = 0; i < size; i++)
      {
        Evas_Object_List *l, *next_l;
-       
+
        for (l = hash->buckets[i]; l;)
          {
             Evas_Hash_El *el;
-            
+
             next_l = l->next;
             el = (Evas_Hash_El *)l;
             if (!func(hash, el->key, el->data, (void *)fdata)) return;
@@ -347,18 +347,18 @@
 /**
  * Return memory allocation failure flag after an function requiring allocation
  * @return The state of the allocation flag
- * 
+ *
  * This function returns the state of the memory allocation flag. This flag is
  * set if memory allocations fail during evas_hash_add() calls. If they do, 1
  * will be returned, otherwise 0 will be returned. The flag will remain in its
  * current state until the next call that requires allocation is called, and
  * is then reset.
- * 
+ *
  * Example:
  * @code
  * Evas_Hash *hash = NULL;
  * extern void *my_data;
- * 
+ *
  * hash = evas_hash_add(hash, "My Data", my_data);
  * if (evas_hash_alloc_error())
  *   {
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/data/evas_list.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -3 -r1.13 -r1.14
--- evas_list.c 21 Apr 2005 08:28:21 -0000      1.13
+++ evas_list.c 22 May 2005 02:49:36 -0000      1.14
@@ -15,14 +15,14 @@
 
 /**
  * Appends the given data to the given linked list.
- * 
+ *
  * The following example code demonstrates how to ensure that the
  * given data has been successfully appended.
  *
  * @code
  * Evas_List *list = NULL;
  * extern void *my_data;
- * 
+ *
  * list = evas_list_append(list, my_data);
  * if (evas_list_alloc_error())
  *   {
@@ -43,7 +43,7 @@
 evas_list_append(Evas_List *list, const void *data)
 {
    Evas_List *l, *new_l;
-   
+
    _evas_list_alloc_error = 0;
    new_l = malloc(sizeof(Evas_List));
    if (!new_l)
@@ -54,7 +54,7 @@
    new_l->next = NULL;
    new_l->prev = NULL;
    new_l->data = (void *)data;
-   if (!list) 
+   if (!list)
      {
        new_l->last = new_l;
        new_l->count = 1;
@@ -67,7 +67,7 @@
        new_l->prev = l;
        list->last = new_l;
        list->count++;
-       return list;    
+       return list;
      }
    else
      {
@@ -91,12 +91,12 @@
  *
  * The following example code demonstrates how to ensure that the
  * given data has been successfully prepended.
- * 
+ *
  * Example:
  * @code
  * Evas_List *list = NULL;
  * extern void *my_data;
- * 
+ *
  * list = evas_list_prepend(list, my_data);
  * if (evas_list_alloc_error())
  *   {
@@ -116,7 +116,7 @@
 evas_list_prepend(Evas_List *list, const void *data)
 {
    Evas_List *new_l;
-   
+
    _evas_list_alloc_error = 0;
    new_l = malloc(sizeof(Evas_List));
    if (!new_l)
@@ -126,7 +126,7 @@
      }
    new_l->prev = NULL;
    new_l->data = (void *)data;
-   if (!list) 
+   if (!list)
      {
        new_l->next = NULL;
        new_l->last = new_l;
@@ -145,9 +145,9 @@
  * Inserts the given data into the given linked list after the specified data.
  *
  * If @p relative is not in the list, @p data is appended to the end of the
- * list.  If there are multiple instances of @p relative in the list, 
+ * list.  If there are multiple instances of @p relative in the list,
  * @p data is inserted after the first instance.
- * 
+ *
  * The following example code demonstrates how to ensure that the
  * given data has been successfully inserted.
  *
@@ -155,7 +155,7 @@
  * Evas_List *list = NULL;
  * extern void *my_data;
  * extern void *relative_member;
- * 
+ *
  * list = evas_list_append(list, relative_member);
  * if (evas_list_alloc_error())
  *   {
@@ -189,7 +189,7 @@
        if (l->data == relative)
          {
             Evas_List *new_l;
-            
+
             new_l = malloc(sizeof(Evas_List));
             if (!new_l)
               {
@@ -204,7 +204,7 @@
               }
             else
               new_l->next = NULL;
-            
+
             l->next = new_l;
             new_l->prev = l;
             if (!new_l->next) list->last = new_l;
@@ -228,7 +228,7 @@
  * If @p relative is not in the list, @p data is prepended to the
  * start of the list.  If there are multiple instances of @p relative
  * in the list, @p data is inserted before the first instance.
- * 
+ *
  * The following code example demonstrates how to ensure that the
  * given data has been successfully inserted.
  *
@@ -236,7 +236,7 @@
  * Evas_List *list = NULL;
  * extern void *my_data;
  * extern void *relative_member;
- * 
+ *
  * list = evas_list_append(list, relative_member);
  * if (evas_list_alloc_error())
  *   {
@@ -263,14 +263,14 @@
 evas_list_prepend_relative(Evas_List *list, const void *data, const void 
*relative)
 {
    Evas_List *l;
-   
+
    _evas_list_alloc_error = 0;
    for (l = list; l; l = l->next)
      {
        if (l->data == relative)
          {
             Evas_List *new_l;
-            
+
             new_l = malloc(sizeof(Evas_List));
              if (!new_l)
               {
@@ -308,12 +308,12 @@
 
 /**
  * Removes the first instance of the specified data from the given list.
- * 
+ *
  * If the specified data is not in the given list, nothing is done.
  *
  * @param   list The given list.
  * @param   data The specified data.
- * @return  A new list pointer that should be used in place of the one 
+ * @return  A new list pointer that should be used in place of the one
  *          passed to this functions.
  * @ingroup Evas_List_Remove_Group
  */
@@ -321,7 +321,7 @@
 evas_list_remove(Evas_List *list, const void *data)
 {
    Evas_List *l;
-   
+
    for (l = list; l; l = l->next)
      {
        if (l->data == data)
@@ -332,21 +332,21 @@
 
 /**
  * Removes the specified data
- * 
+ *
  * Remove a specified member from a list
  * @param list The list handle to remove @p remove_list from
  * @param remove_list The list node which is to be removed
  * @return A new list handle to replace the old one
- * 
+ *
  * Calling this function takes the list note @p remove_list and removes it
  * from the list @p list, freeing the list node structure @p remove_list.
- * 
+ *
  * Example:
  * @code
  * extern Evas_List *list;
  * Evas_List *l;
  * extern void *my_data;
- * 
+ *
  * for (l = list; l; l= l->next)
  *   {
  *     if (l->data == my_data)
@@ -362,7 +362,7 @@
 evas_list_remove_list(Evas_List *list, Evas_List *remove_list)
 {
    Evas_List *return_l;
-   
+
    if (!remove_list) return list;
    if (remove_list->next) remove_list->next->prev = remove_list->prev;
    if (remove_list->prev)
@@ -394,16 +394,16 @@
  * @param list The list handle to search for @p data
  * @param data The data pointer to find in the list @p list
  * @return The found member data pointer
- * 
+ *
  * A call to this function will search the list @p list from beginning to end
  * for the first member whose data pointer is @p data. If it is found, @p data
  * will be returned, otherwise NULL will be returned.
- * 
+ *
  * Example:
  * @code
  * extern Evas_List *list;
  * extern void *my_data;
- * 
+ *
  * if (evas_list_find(list, my_data) == my_data)
  *   {
  *     printf("Found member %p\n", my_data);
@@ -415,7 +415,7 @@
 evas_list_find(Evas_List *list, const void *data)
 {
    Evas_List *l;
-   
+
    for (l = list; l; l = l->next)
      {
        if (l->data == data) return (void *)data;
@@ -428,18 +428,18 @@
  * @param list The list handle to search for @p data
  * @param data The data pointer to find in the list @p list
  * @return The found members list node
- * 
+ *
  * A call to this function will search the list @p list from beginning to end
  * for the first member whose data pointer is @p data. If it is found, the
  * list node containing the specified member will be returned, otherwise NULL
  * will be returned.
- * 
+ *
  * Example:
  * @code
  * extern Evas_List *list;
  * extern void *my_data;
  * Evas_List *found_node;
- * 
+ *
  * found_node = evas_list_find_list(list, my_data);
  * if (found_node)
  *   {
@@ -452,7 +452,7 @@
 evas_list_find_list(Evas_List *list, const void *data)
 {
    Evas_List *l;
-   
+
    for (l = list; l; l = l->next)
      {
        if (l->data == data) return l;
@@ -464,13 +464,13 @@
  * Free an entire list and all the nodes, ignoring the data contained
  * @param list The list to free
  * @return A NULL pointer
- * 
+ *
  * This function will free all the list nodes in list specified by @p list.
- * 
+ *
  * Example:
  * @code
  * extern Evas_List *list;
- * 
+ *
  * list = evas_list_free(list);
  * @endcode
  * @ingroup Evas_List_Remove_Group
@@ -479,7 +479,7 @@
 evas_list_free(Evas_List *list)
 {
    Evas_List *l, *free_l;
-   
+
    for (l = list; l;)
      {
        free_l = l;
@@ -491,7 +491,7 @@
 
 /**
  * @defgroup Evas_List_Traverse_Group Linked List Traverse Functions
- * 
+ *
  * Functions that you can use to traverse a linked list.
  */
 
@@ -499,18 +499,18 @@
  * Get the last list node in the list
  * @param list The list to get the last list node from
  * @return The last list node in the list @p list
- * 
+ *
  * This function will return the last list node in the list (or NULL if the
  * list is empty).
- * 
+ *
  * NB: This is a order-1 operation (it takes the same short time regardless of
  * the length of the list).
- * 
+ *
  * Example:
  * @code
  * extern Evas_List *list;
  * Evas_List *last, *l;
- * 
+ *
  * last = evas_list_last(list);
  * printf("The list in reverse:\n");
  * for (l = last; l; l = l->prev)
@@ -531,15 +531,15 @@
  * Get the next list node after the specified list node
  * @param list The list node to get the next list node from
  * @return The next list node, or NULL if no next list node exists
- * 
+ *
  * This function returns the next list node after the current one. It is
  * equivalent to list->next.
- * 
+ *
  * Example:
  * @code
  * extern Evas_List *list;
  * Evas_List *l;
- * 
+ *
  * printf("The list:\n");
  * for (l = list; l; l = evas_list_next(l))
  *   {
@@ -559,15 +559,15 @@
  * Get the previous list node before the specified list node
  * @param list The list node to get the previous list node from
  * @return The previous list node, or NULL if no previous list node exists
- * 
+ *
  * This function returns the previous list node before the current one. It is
  * equivalent to list->prev.
- * 
+ *
  * Example:
  * @code
  * extern Evas_List *list;
  * Evas_List *last, *l;
- * 
+ *
  * last = evas_list_last(list);
  * printf("The list in reverse:\n");
  * for (l = last; l; l = evas_list_prev(l))
@@ -594,15 +594,15 @@
  * Get the list node data member
  * @param list The list node to get the data member of
  * @return The data member from the list node @p list
- * 
+ *
  * This function returns the data member of the specified list node @p list.
  * It is equivalent to list->data.
- * 
+ *
  * Example:
  * @code
  * extern Evas_List *list;
  * Evas_List *l;
- * 
+ *
  * printf("The list:\n");
  * for (l = list; l; l = evas_list_next(l))
  *   {
@@ -622,17 +622,17 @@
  * Get the count of the number of items in a list
  * @param list The list whose count to return
  * @return The number of members in the list @p list
- * 
+ *
  * This function returns how many members in the specified list: @p list. If
  * the list is empty (NULL), 0 is returned.
- * 
+ *
  * NB: This is an order-1 operation and takes the same tiem regardless of the
  * length of the list.
- * 
+ *
  * Example:
  * @code
  * extern Evas_List *list;
- * 
+ *
  * printf("The list has %i members\n", evas_list_count(list));
  * @endcode
  * @ingroup Evas_List_General_Group
@@ -649,17 +649,17 @@
  * @param list The list to get member number @p n from
  * @param n The number of the element (0 being the first)
  * @return The data pointer stored in the specified element
- * 
+ *
  * This function returns the data pointer of element number @p n, in the list
  * @p list. The first element in the array is element number 0. If the element
  * number @p n does not exist, NULL will be returned.
- * 
+ *
  * Example:
  * @code
  * extern Evas_List *list;
  * extern int number;
  * void *data;
- * 
+ *
  * data = evas_list_nth(list, number);
  * if (data)
  *   printf("Element number %i has data %p\n", number, data);
@@ -679,17 +679,17 @@
  * @param list The list to get member number @p n from
  * @param n The number of the element (0 being the first)
  * @return The list node stored in the numbered element
- * 
+ *
  * This function returns the list node of element number @p n, in the list
  * @p list. The first element in the array is element number 0. If the element
  * number @p n does not exist, NULL will be returned.
- * 
+ *
  * Example:
  * @code
  * extern Evas_List *list;
  * extern int number;
  * Evas_List *nth_list;
- * 
+ *
  * nth_list = evas_list_nth_list(list, number);
  * if (nth_list)
  *   printf("Element number %i has data %p\n", number, nth_list->data);
@@ -735,14 +735,14 @@
  * Reverse all the elements in the list
  * @param list The list to reverse
  * @return The list after it has been reversed
- * 
+ *
  * This takes a list @p list, and reverses the order of all elements in the
  * list, so the last member is now first, and so on.
- * 
+ *
  * Example:
  * @code
  * extern Evas_List *list;
- * 
+ *
  * list = evas_list_reverse(list);
  * @endcode
  * @ingroup Evas_List_Ordering_Group
@@ -758,7 +758,7 @@
    while (l1 != l2)
      {
        void *data;
-       
+
        data = l1->data;
        l1->data = l2->data;
        l2->data = data;
@@ -774,13 +774,13 @@
 {
    Evas_List *result = NULL;
    Evas_List *l_head = NULL, *ll_head = NULL;
-   
+
    l_head = l;
    ll_head = ll;
    while (l && ll)
      {
        int cmp;
-       
+
        cmp = func(l->data, ll->data);
        if (cmp < 0)
          {
@@ -826,13 +826,13 @@
  * @param func A function pointer that can handle comparing the list data
  * nodes
  * @return A new sorted list
- * 
+ *
  * This function sorts your list.  The data in your nodes can be arbitrary,
  * you just have to be smart enough to know what kind of data is in your
  * lists
- * 
+ *
  * In the event of a memory allocation failure, It might segv.
- * 
+ *
  * Example:
  * @code
  * int
@@ -847,7 +847,7 @@
  *    return(strcmp((const char*)d1, (const char*)d2));
  * }
  * extern Evas_List *list;
- * 
+ *
  * list = evas_list_sort(list, evas_list_count(list), sort_cb);
  * if (evas_list_alloc_error())
  *   {
@@ -862,18 +862,18 @@
 {
    Evas_List *l = NULL, *ll = NULL;
    int mid;
-   
+
    if (!list || !func)
      return NULL;
-   
+
    /* if the caller specified an invalid size, sort the whole list */
    if (size <= 0 || size > list->count)
      size = list->count;
-   
+
    mid = size / 2;
    if (mid < 1)
      return list;
-   
+
    /* bleh evas list splicing */
    ll = evas_list_nth_list(list, mid);
    if (ll->prev)
@@ -883,32 +883,32 @@
        ll->prev->next = NULL;
        ll->prev = NULL;
      }
-   
+
    ll->count = size - mid;
-   
+
    /* merge sort */
    l = evas_list_sort(list, mid, func);
    ll = evas_list_sort(ll, size - mid, func);
    list = evas_list_combine(l, ll, func);
-   
+
    return(list);
 }
 /**
  * Return the memory allocation failure flag after any operation needin 
allocation
  * @return The state of the allocation flag
- * 
+ *
  * This function returns the state of the memory allocation flag. This flag is
  * set if memory allocations during evas_list_append(), evas_list_prepend(),
  * evas_list_append_relative(), or evas_list_prepend_relative() fail. If they
  * do fail, 1 will be returned, otherwise 0 will be returned. The flag will
  * remain in its current state until the next call that requires allocation
  * is called, and is then reset.
- * 
+ *
  * Example:
  * @code
  * Evas_List *list = NULL;
  * extern void *my_data;
- * 
+ *
  * list = evas_list_append(list, my_data);
  * if (evas_list_alloc_error())
  *   {
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/evas/src/lib/data/evas_object_list.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- evas_object_list.c  9 Apr 2005 00:09:24 -0000       1.4
+++ evas_object_list.c  22 May 2005 02:49:36 -0000      1.5
@@ -6,11 +6,11 @@
 {
    Evas_Object_List *l, *new_l;
    Evas_Object_List *list;
-   
+
    list = in_list;
    new_l = in_item;
    new_l->next = NULL;
-   if (!list) 
+   if (!list)
      {
        new_l->prev = NULL;
        new_l->last = new_l;
@@ -29,14 +29,14 @@
 {
    Evas_Object_List *new_l;
    Evas_Object_List *list;
-   
+
    list = in_list;
    new_l = in_item;
    new_l->prev = NULL;
-   if (!list) 
+   if (!list)
      {
        new_l->next = NULL;
-       new_l->last = new_l;    
+       new_l->last = new_l;
        return new_l;
      }
    new_l->next = list;
@@ -50,7 +50,7 @@
 evas_object_list_append_relative(void *in_list, void *in_item, void 
*in_relative)
 {
    Evas_Object_List *list, *relative, *new_l;
-   
+
    list = in_list;
    new_l = in_item;
    relative = in_relative;
@@ -74,7 +74,7 @@
 evas_object_list_prepend_relative(void *in_list, void *in_item, void 
*in_relative)
 {
    Evas_Object_List *list, *relative, *new_l;
-   
+
    list = in_list;
    new_l = in_item;
    relative = in_relative;
@@ -143,9 +143,9 @@
 {
    Evas_Object_List *l;
    Evas_Object_List *list, *item;
-   
+
    list = in_list;
-   item = in_item;   
+   item = in_item;
    for (l = list; l; l = l->next)
      {
        if (l == item) return item;




-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to