Patch from Brian Wang to fix the TRUE/FALSE --> EINA_TRUE/EINA_FALSE mess.

(NB: Win32/CE people may need to fix some TRUE/FALSE parts...couldn't test
those).

Thanks Brian :)



SVN revision: 46503
This commit is contained in:
Christopher Michael 2010-02-26 05:56:49 +00:00
parent e3c9d3f62a
commit 300d53a4f4
7 changed files with 245 additions and 245 deletions

View File

@ -235,7 +235,7 @@ ecore_exe_pipe_run(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data)
/* FIXME: gerer la priorite */
if (!CreateProcess(NULL, exe->cmd, NULL, NULL, TRUE,
if (!CreateProcess(NULL, exe->cmd, NULL, NULL, EINA_TRUE,
run_pri | CREATE_SUSPENDED, NULL, NULL, &si, &pi))
goto free_exe_cmd;
@ -252,7 +252,7 @@ ecore_exe_pipe_run(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data)
exe->data = (void *)data;
if (!(exe->process2 = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_SUSPEND_RESUME | PROCESS_TERMINATE | SYNCHRONIZE,
FALSE, pi.dwProcessId)))
EINA_FALSE, pi.dwProcessId)))
goto close_thread;
if (ResumeThread(exe->thread) == ((DWORD)-1))
@ -688,7 +688,7 @@ _ecore_exe_win32_pipes_set(Ecore_Exe *exe)
HANDLE child_pipe_x;
sa.nLength = sizeof(SECURITY_ATTRIBUTES);
sa.bInheritHandle = TRUE;
sa.bInheritHandle = EINA_TRUE;
sa.lpSecurityDescriptor = NULL;
if (!CreatePipe(&child_pipe, &child_pipe_x, &sa, 0))
@ -811,14 +811,14 @@ _ecore_exe_enum_windows_procedure(HWND window, LPARAM data)
0, NULL))
{
printf ("remote thread\n");
return FALSE;
return EINA_FALSE;
}
if ((exe->sig == ECORE_EXE_WIN32_SIGINT) ||
(exe->sig == ECORE_EXE_WIN32_SIGQUIT))
{
printf ("int or quit\n");
return FALSE;
return EINA_FALSE;
}
/* WM_CLOSE message */
@ -826,7 +826,7 @@ _ecore_exe_enum_windows_procedure(HWND window, LPARAM data)
if (WaitForSingleObject(exe->process, ECORE_EXE_WIN32_TIMEOUT) == WAIT_OBJECT_0)
{
printf ("CLOSE\n");
return FALSE;
return EINA_FALSE;
}
/* WM_QUIT message */
@ -834,7 +834,7 @@ _ecore_exe_enum_windows_procedure(HWND window, LPARAM data)
if (WaitForSingleObject(exe->process, ECORE_EXE_WIN32_TIMEOUT) == WAIT_OBJECT_0)
{
printf ("QUIT\n");
return FALSE;
return EINA_FALSE;
}
/* Exit process */
@ -843,21 +843,21 @@ _ecore_exe_enum_windows_procedure(HWND window, LPARAM data)
0, NULL))
{
printf ("remote thread 2\n");
return FALSE;
return EINA_FALSE;
}
if (exe->sig == ECORE_EXE_WIN32_SIGTERM)
{
printf ("term\n");
return FALSE;
return EINA_FALSE;
}
TerminateProcess(exe->process, 0);
return FALSE;
return EINA_FALSE;
}
return TRUE;
return EINA_TRUE;
}
static void

View File

@ -385,7 +385,7 @@ ecore_pipe_write_close(Ecore_Pipe *p)
* @param p The Ecore_Pipe object.
* @param buffer The data to write into the pipe.
* @param nbytes The size of the @p buffer in bytes
* @return Returns TRUE on a successful write, FALSE on an error
* @return Returns EINA_TRUE on a successful write, EINA_FALSE on an error
* @ingroup Ecore_Pipe_Group
*/
EAPI int
@ -398,10 +398,10 @@ ecore_pipe_write(Ecore_Pipe *p, const void *buffer, unsigned int nbytes)
if (!ECORE_MAGIC_CHECK(p, ECORE_MAGIC_PIPE))
{
ECORE_MAGIC_FAIL(p, ECORE_MAGIC_PIPE, "ecore_pipe_write");
return FALSE;
return EINA_FALSE;
}
if (p->fd_write == PIPE_FD_INVALID) return FALSE;
if (p->fd_write == PIPE_FD_INVALID) return EINA_FALSE;
/* First write the len into the pipe */
do
@ -417,13 +417,13 @@ ecore_pipe_write(Ecore_Pipe *p, const void *buffer, unsigned int nbytes)
/* XXX What should we do here? */
ERR("The length of the data was not written complete"
" to the pipe");
return FALSE;
return EINA_FALSE;
}
else if (ret == PIPE_FD_ERROR && errno == EPIPE)
{
pipe_close(p->fd_write);
p->fd_write = PIPE_FD_INVALID;
return FALSE;
return EINA_FALSE;
}
else if (ret == PIPE_FD_ERROR && errno == EINTR)
/* try it again */
@ -437,7 +437,7 @@ ecore_pipe_write(Ecore_Pipe *p, const void *buffer, unsigned int nbytes)
}
while (retry--);
if (retry != ECORE_PIPE_WRITE_RETRY) return FALSE;
if (retry != ECORE_PIPE_WRITE_RETRY) return EINA_FALSE;
/* and now pass the data to the pipe */
do
@ -447,7 +447,7 @@ ecore_pipe_write(Ecore_Pipe *p, const void *buffer, unsigned int nbytes)
nbytes - already_written);
if (ret == (ssize_t)(nbytes - already_written))
return TRUE;
return EINA_TRUE;
else if (ret >= 0)
{
already_written -= ret;
@ -457,7 +457,7 @@ ecore_pipe_write(Ecore_Pipe *p, const void *buffer, unsigned int nbytes)
{
pipe_close(p->fd_write);
p->fd_write = PIPE_FD_INVALID;
return FALSE;
return EINA_FALSE;
}
else if (ret == PIPE_FD_ERROR && errno == EINTR)
/* try it again */
@ -471,7 +471,7 @@ ecore_pipe_write(Ecore_Pipe *p, const void *buffer, unsigned int nbytes)
}
while (retry--);
return FALSE;
return EINA_FALSE;
}
/* Private function */

View File

@ -263,7 +263,7 @@ ecore_con_url_new(const char *url)
curl_easy_setopt(url_con->curl_easy, CURLOPT_PROGRESSFUNCTION,
_ecore_con_url_progress_cb);
curl_easy_setopt(url_con->curl_easy, CURLOPT_PROGRESSDATA, url_con);
curl_easy_setopt(url_con->curl_easy, CURLOPT_NOPROGRESS, FALSE);
curl_easy_setopt(url_con->curl_easy, CURLOPT_NOPROGRESS, EINA_FALSE);
curl_easy_setopt(url_con->curl_easy, CURLOPT_HEADERFUNCTION, _ecore_con_url_header_cb);
curl_easy_setopt(url_con->curl_easy, CURLOPT_HEADERDATA, url_con);
@ -837,7 +837,7 @@ ecore_con_url_verbose_set(Ecore_Con_Url *url_con, int verbose)
if (url_con->active) return;
if (!url_con->url) return;
if (verbose == TRUE)
if (verbose == EINA_TRUE)
curl_easy_setopt(url_con->curl_easy, CURLOPT_VERBOSE, 1);
else
curl_easy_setopt(url_con->curl_easy, CURLOPT_VERBOSE, 0);
@ -861,7 +861,7 @@ ecore_con_url_ftp_use_epsv_set(Ecore_Con_Url *url_con, int use_epsv)
if (url_con->active) return;
if (!url_con->url) return;
if (use_epsv == TRUE)
if (use_epsv == EINA_TRUE)
curl_easy_setopt(url_con->curl_easy, CURLOPT_FTP_USE_EPSV, 1);
else
curl_easy_setopt(url_con->curl_easy, CURLOPT_FTP_USE_EPSV, 0);

View File

@ -24,10 +24,10 @@
#define ECORE_HASH_INCREASE(hash) ((hash && ecore_prime_table[hash->size] < PRIME_MAX) ? \
(hash->nodes / ecore_prime_table[hash->size]) > \
ECORE_HASH_CHAIN_MAX : FALSE)
ECORE_HASH_CHAIN_MAX : EINA_FALSE)
#define ECORE_HASH_REDUCE(hash) ((hash && ecore_prime_table[hash->size] > PRIME_MIN) ? \
(double)hash->nodes / (double)ecore_prime_table[hash->size-1] \
< ((double)ECORE_HASH_CHAIN_MAX * 0.375) : FALSE)
< ((double)ECORE_HASH_CHAIN_MAX * 0.375) : EINA_FALSE)
/* Private hash manipulation functions */
static int _ecore_hash_node_add(Ecore_Hash *hash, Ecore_Hash_Node *node);
@ -79,13 +79,13 @@ ecore_hash_new(Ecore_Hash_Cb hash_func, Ecore_Compare_Cb compare)
* @param hash The given hash.
* @param hash_func The function used for hashing node keys.
* @param compare The function used for comparing node keys.
* @return @c TRUE on success, @c FALSE on an error.
* @return @c EINA_TRUE on success, @c EINA_FALSE on an error.
* @ingroup Ecore_Data_Hash_ADT_Creation_Group
*/
EAPI int
ecore_hash_init(Ecore_Hash *hash, Ecore_Hash_Cb hash_func, Ecore_Compare_Cb compare)
{
CHECK_PARAM_POINTER_RETURN("hash", hash, FALSE);
CHECK_PARAM_POINTER_RETURN("hash", hash, EINA_FALSE);
memset(hash, 0, sizeof(Ecore_Hash));
@ -95,7 +95,7 @@ ecore_hash_init(Ecore_Hash *hash, Ecore_Hash_Cb hash_func, Ecore_Compare_Cb comp
hash->buckets = (Ecore_Hash_Node **)calloc(ecore_prime_table[0],
sizeof(Ecore_Hash_Node *));
return TRUE;
return EINA_TRUE;
}
/**
@ -109,17 +109,17 @@ ecore_hash_init(Ecore_Hash *hash, Ecore_Hash_Cb hash_func, Ecore_Compare_Cb comp
* @param hash The given hash.
* @param function The function used to free the node keys. NULL is a
* valid value and means that no function will be called.
* @return @c TRUE on success, @c FALSE on error.
* @return @c EINA_TRUE on success, @c EINA_FALSE on error.
* @ingroup Ecore_Data_Hash_ADT_Destruction_Group
*/
EAPI int
ecore_hash_free_key_cb_set(Ecore_Hash *hash, Ecore_Free_Cb function)
{
CHECK_PARAM_POINTER_RETURN("hash", hash, FALSE);
CHECK_PARAM_POINTER_RETURN("hash", hash, EINA_FALSE);
hash->free_key = function;
return TRUE;
return EINA_TRUE;
}
/**
@ -127,17 +127,17 @@ ecore_hash_free_key_cb_set(Ecore_Hash *hash, Ecore_Free_Cb function)
* @param hash The given hash.
* @param function The function that will free the node values. NULL is a
* valid value and means that no function will be called.
* @return @c TRUE on success, @c FALSE on error
* @return @c EINA_TRUE on success, @c EINA_FALSE on error
* @ingroup Ecore_Data_Hash_ADT_Destruction_Group
*/
EAPI int
ecore_hash_free_value_cb_set(Ecore_Hash *hash, Ecore_Free_Cb function)
{
CHECK_PARAM_POINTER_RETURN("hash", hash, FALSE);
CHECK_PARAM_POINTER_RETURN("hash", hash, EINA_FALSE);
hash->free_value = function;
return TRUE;
return EINA_TRUE;
}
/**
@ -151,16 +151,16 @@ ecore_hash_free_value_cb_set(Ecore_Hash *hash, Ecore_Free_Cb function)
* @param hash The given hash table.
* @param key The key.
* @param value The value.
* @return @c TRUE if successful, @c FALSE if not.
* @return @c EINA_TRUE if successful, @c EINA_FALSE if not.
* @ingroup Ecore_Data_Hash_ADT_Data_Group
*/
EAPI int
ecore_hash_set(Ecore_Hash *hash, void *key, void *value)
{
int ret = FALSE;
int ret = EINA_FALSE;
Ecore_Hash_Node *node;
CHECK_PARAM_POINTER_RETURN("hash", hash, FALSE);
CHECK_PARAM_POINTER_RETURN("hash", hash, EINA_FALSE);
node = _ecore_hash_node_get(hash, key);
if (node)
@ -168,7 +168,7 @@ ecore_hash_set(Ecore_Hash *hash, void *key, void *value)
if (hash->free_key) hash->free_key(key);
if (node->value && hash->free_value) hash->free_value(node->value);
node->value = value;
ret = TRUE;
ret = EINA_TRUE;
}
else
{
@ -184,7 +184,7 @@ ecore_hash_set(Ecore_Hash *hash, void *key, void *value)
* Sets all key-value pairs from set in the given hash table.
* @param hash The given hash table.
* @param set The hash table to import.
* @return @c TRUE if successful, @c FALSE if not.
* @return @c EINA_TRUE if successful, @c EINA_FALSE if not.
* @ingroup Ecore_Data_Hash_ADT_Data_Group
*/
EAPI int
@ -193,8 +193,8 @@ ecore_hash_hash_set(Ecore_Hash *hash, Ecore_Hash *set)
unsigned int i;
Ecore_Hash_Node *node, *old;
CHECK_PARAM_POINTER_RETURN("hash", hash, FALSE);
CHECK_PARAM_POINTER_RETURN("set", set, FALSE);
CHECK_PARAM_POINTER_RETURN("hash", hash, EINA_FALSE);
CHECK_PARAM_POINTER_RETURN("set", set, EINA_FALSE);
for (i = 0; i < ecore_prime_table[set->size]; i++)
{
@ -220,13 +220,13 @@ ecore_hash_hash_set(Ecore_Hash *hash, Ecore_Hash *set)
}
FREE(set->buckets);
ecore_hash_init(set, set->hash_func, set->compare);
return TRUE;
return EINA_TRUE;
}
/**
* Frees the hash table and the data contained inside it.
* @param hash The hash table to destroy.
* @return @c TRUE on success, @c FALSE on error.
* @return @c EINA_TRUE on success, @c EINA_FALSE on error.
* @ingroup Ecore_Data_Hash_ADT_Destruction_Group
*/
EAPI void
@ -289,7 +289,7 @@ ecore_hash_count(Ecore_Hash *hash)
* @param hash The given hash.
* @param for_each_func The function that each entry is passed to.
* @param user_data a pointer passed to calls of for_each_func
* @return TRUE on success, FALSE otherwise.
* @return EINA_TRUE on success, EINA_FALSE otherwise.
* @ingroup Ecore_Data_Hash_ADT_Traverse_Group
*/
EAPI int
@ -297,8 +297,8 @@ ecore_hash_for_each_node(Ecore_Hash *hash, Ecore_For_Each for_each_func, void *u
{
unsigned int i = 0;
CHECK_PARAM_POINTER_RETURN("hash", hash, FALSE);
CHECK_PARAM_POINTER_RETURN("for_each_func", for_each_func, FALSE);
CHECK_PARAM_POINTER_RETURN("hash", hash, EINA_FALSE);
CHECK_PARAM_POINTER_RETURN("for_each_func", for_each_func, EINA_FALSE);
while (i < ecore_prime_table[hash->size])
{
@ -314,7 +314,7 @@ ecore_hash_for_each_node(Ecore_Hash *hash, Ecore_For_Each for_each_func, void *u
i++;
}
return TRUE;
return EINA_TRUE;
}
/**
@ -404,7 +404,7 @@ _ecore_hash_bucket_destroy(Ecore_Hash_Node *list, Ecore_Free_Cb keyd, Ecore_Free
{
Ecore_Hash_Node *node;
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
CHECK_PARAM_POINTER_RETURN("list", list, EINA_FALSE);
for (node = list; node; node = list)
{
@ -412,22 +412,22 @@ _ecore_hash_bucket_destroy(Ecore_Hash_Node *list, Ecore_Free_Cb keyd, Ecore_Free
_ecore_hash_node_destroy(node, keyd, valued);
}
return TRUE;
return EINA_TRUE;
}
/*
* @brief Add the node to the hash table
* @param hash: the hash table to add the key
* @param node: the node to add to the hash table
* @return Returns FALSE on error, TRUE on success
* @return Returns EINA_FALSE on error, EINA_TRUE on success
*/
static int
_ecore_hash_node_add(Ecore_Hash *hash, Ecore_Hash_Node *node)
{
unsigned long hash_val;
CHECK_PARAM_POINTER_RETURN("hash", hash, FALSE);
CHECK_PARAM_POINTER_RETURN("node", node, FALSE);
CHECK_PARAM_POINTER_RETURN("hash", hash, EINA_FALSE);
CHECK_PARAM_POINTER_RETURN("node", node, EINA_FALSE);
/* Check to see if the hash needs to be resized */
if (ECORE_HASH_INCREASE(hash))
@ -444,7 +444,7 @@ _ecore_hash_node_add(Ecore_Hash *hash, Ecore_Hash_Node *node)
hash->buckets[hash_val] = node;
hash->nodes++;
return TRUE;
return EINA_TRUE;
}
/**
@ -676,18 +676,18 @@ _ecore_hash_bucket_get(Ecore_Hash *hash, Ecore_Hash_Node *bucket, const void *ke
/*
* @brief Increase the size of the hash table by approx. 2 * current size
* @param hash: the hash table to increase the size of
* @return Returns TRUE on success, FALSE on error
* @return Returns EINA_TRUE on success, EINA_FALSE on error
*/
static int
_ecore_hash_increase(Ecore_Hash *hash)
{
void *old;
CHECK_PARAM_POINTER_RETURN("hash", hash, FALSE);
CHECK_PARAM_POINTER_RETURN("hash", hash, EINA_FALSE);
/* Max size reached so return FALSE */
/* Max size reached so return EINA_FALSE */
if ((ecore_prime_table[hash->size] == PRIME_MAX) || (hash->size == PRIME_TABLE_MAX))
return FALSE;
return EINA_FALSE;
/*
* Increase the size of the hash and save a pointer to the old data
@ -708,7 +708,7 @@ _ecore_hash_increase(Ecore_Hash *hash)
{
hash->buckets = old;
hash->size--;
return FALSE;
return EINA_FALSE;
}
hash->nodes = 0;
@ -718,7 +718,7 @@ _ecore_hash_increase(Ecore_Hash *hash)
if (_ecore_hash_rehash(hash, old, hash->size - 1))
{
FREE(old);
return TRUE;
return EINA_TRUE;
}
/*
@ -726,23 +726,23 @@ _ecore_hash_increase(Ecore_Hash *hash)
*/
FREE(old);
return FALSE;
return EINA_FALSE;
}
/*
* @brief Decrease the size of the hash table by < 1/2 * current size
* @param hash: the hash table to decrease the size of
* @return Returns TRUE on success, FALSE on error
* @return Returns EINA_TRUE on success, EINA_FALSE on error
*/
static int
_ecore_hash_decrease(Ecore_Hash *hash)
{
Ecore_Hash_Node **old;
CHECK_PARAM_POINTER_RETURN("hash", hash, FALSE);
CHECK_PARAM_POINTER_RETURN("hash", hash, EINA_FALSE);
if (ecore_prime_table[hash->size] == PRIME_MIN)
return FALSE;
return EINA_FALSE;
/*
* Decrease the hash size and store a pointer to the old data
@ -764,7 +764,7 @@ _ecore_hash_decrease(Ecore_Hash *hash)
{
hash->buckets = old;
hash->size++;
return FALSE;
return EINA_FALSE;
}
hash->nodes = 0;
@ -772,17 +772,17 @@ _ecore_hash_decrease(Ecore_Hash *hash)
if (_ecore_hash_rehash(hash, old, hash->size + 1))
{
FREE(old);
return TRUE;
return EINA_TRUE;
}
return FALSE;
return EINA_FALSE;
}
/*
* @brief Rehash the nodes of a table into the hash table
* @param hash: the hash to place the nodes of the table
* @param table: the table to remove the nodes from and place in hash
* @return Returns TRUE on success, FALSE on error
* @return Returns EINA_TRUE on success, EINA_FALSE on error
*/
static inline int
_ecore_hash_rehash(Ecore_Hash *hash, Ecore_Hash_Node **old_table, int old_size)
@ -790,8 +790,8 @@ _ecore_hash_rehash(Ecore_Hash *hash, Ecore_Hash_Node **old_table, int old_size)
unsigned int i;
Ecore_Hash_Node *old;
CHECK_PARAM_POINTER_RETURN("hash", hash, FALSE);
CHECK_PARAM_POINTER_RETURN("old_table", old_table, FALSE);
CHECK_PARAM_POINTER_RETURN("hash", hash, EINA_FALSE);
CHECK_PARAM_POINTER_RETURN("old_table", old_table, EINA_FALSE);
for (i = 0; i < ecore_prime_table[old_size]; i++)
{
@ -804,7 +804,7 @@ _ecore_hash_rehash(Ecore_Hash *hash, Ecore_Hash_Node **old_table, int old_size)
}
}
return TRUE;
return EINA_TRUE;
}
/*
@ -836,17 +836,17 @@ _ecore_hash_node_new(void *key, void *value)
* @param node: the node to set the values
* @param key: the key to reference this node
* @param value: the value that key refers to
* @return Returns TRUE on success, FALSE on error
* @return Returns EINA_TRUE on success, EINA_FALSE on error
*/
static int
_ecore_hash_node_init(Ecore_Hash_Node *node, void *key, void *value)
{
CHECK_PARAM_POINTER_RETURN("node", node, FALSE);
CHECK_PARAM_POINTER_RETURN("node", node, EINA_FALSE);
node->key = key;
node->value = value;
return TRUE;
return EINA_TRUE;
}
/*
@ -854,12 +854,12 @@ _ecore_hash_node_init(Ecore_Hash_Node *node, void *key, void *value)
* @param node: the node to be destroyed
* @param keyd: the function to free the key
* @param valued: the function to free the value
* @return Returns TRUE on success, FALSE on error
* @return Returns EINA_TRUE on success, EINA_FALSE on error
*/
static int
_ecore_hash_node_destroy(Ecore_Hash_Node *node, Ecore_Free_Cb keyd, Ecore_Free_Cb valued)
{
CHECK_PARAM_POINTER_RETURN("node", node, FALSE);
CHECK_PARAM_POINTER_RETURN("node", node, EINA_FALSE);
if (keyd)
keyd(node->key);
@ -869,5 +869,5 @@ _ecore_hash_node_destroy(Ecore_Hash_Node *node, Ecore_Free_Cb keyd, Ecore_Free_C
FREE(node);
return TRUE;
return EINA_TRUE;
}

View File

@ -95,17 +95,17 @@ ecore_list_new(void)
/**
* Initialize a list to some sane starting values.
* @param list The list to initialize.
* @return @c TRUE if successful, @c FALSE if an error occurs.
* @return @c EINA_TRUE if successful, @c EINA_FALSE if an error occurs.
* @ingroup Ecore_Data_List_Creation_Group
*/
EAPI int
ecore_list_init(Ecore_List *list)
{
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
CHECK_PARAM_POINTER_RETURN("list", list, EINA_FALSE);
memset(list, 0, sizeof(Ecore_List));
return TRUE;
return EINA_TRUE;
}
/**
@ -135,32 +135,32 @@ ecore_list_destroy(Ecore_List *list)
* @param list The list that will use this function when nodes are
* destroyed.
* @param free_func The function that will free the key data.
* @return @c TRUE on successful set, @c FALSE otherwise.
* @return @c EINA_TRUE on successful set, @c EINA_FALSE otherwise.
*/
EAPI int
ecore_list_free_cb_set(Ecore_List *list, Ecore_Free_Cb free_func)
{
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
CHECK_PARAM_POINTER_RETURN("list", list, EINA_FALSE);
list->free_func = free_func;
return TRUE;
return EINA_TRUE;
}
/**
* Checks the list for any nodes.
* @param list The list to check for nodes
* @return @c TRUE if no nodes in list, @c FALSE if the list contains nodes
* @return @c EINA_TRUE if no nodes in list, @c EINA_FALSE if the list contains nodes
*/
EAPI int
ecore_list_empty_is(Ecore_List *list)
{
int ret = TRUE;
int ret = EINA_TRUE;
CHECK_PARAM_POINTER_RETURN("list", list, TRUE);
CHECK_PARAM_POINTER_RETURN("list", list, EINA_TRUE);
if (list->nodes)
ret = FALSE;
ret = EINA_FALSE;
return ret;
}
@ -175,7 +175,7 @@ ecore_list_index(Ecore_List *list)
{
int ret;
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
CHECK_PARAM_POINTER_RETURN("list", list, EINA_FALSE);
ret = list->index;
@ -192,7 +192,7 @@ ecore_list_count(Ecore_List *list)
{
int ret = 0;
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
CHECK_PARAM_POINTER_RETURN("list", list, EINA_FALSE);
ret = list->nodes;
@ -209,7 +209,7 @@ Functions that are used to add nodes to an Ecore_List.
* Append data to the list.
* @param list The list.
* @param data The data to append.
* @return @c FALSE if an error occurs, @c TRUE if appended successfully
* @return @c EINA_FALSE if an error occurs, @c EINA_TRUE if appended successfully
* @ingroup Ecore_Data_List_Add_Item_Group
*/
EAPI inline int
@ -218,7 +218,7 @@ ecore_list_append(Ecore_List *list, void *data)
int ret;
Ecore_List_Node *node;
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
CHECK_PARAM_POINTER_RETURN("list", list, EINA_FALSE);
node = ecore_list_node_new();
node->data = data;
@ -249,14 +249,14 @@ _ecore_list_append_0(Ecore_List *list, Ecore_List_Node *end)
list->nodes++;
return TRUE;
return EINA_TRUE;
}
/**
* Prepend data to the beginning of the list.
* @param list The list.
* @param data The data to prepend.
* @return @c FALSE if an error occurs, @c TRUE if prepended successfully.
* @return @c EINA_FALSE if an error occurs, @c EINA_TRUE if prepended successfully.
* @ingroup Ecore_Data_List_Add_Item_Group
*/
EAPI inline int
@ -265,7 +265,7 @@ ecore_list_prepend(Ecore_List *list, void *data)
int ret;
Ecore_List_Node *node;
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
CHECK_PARAM_POINTER_RETURN("list", list, EINA_FALSE);
node = ecore_list_node_new();
node->data = data;
@ -291,14 +291,14 @@ _ecore_list_prepend_0(Ecore_List *list, Ecore_List_Node *start)
list->nodes++;
list->index++;
return TRUE;
return EINA_TRUE;
}
/**
* Insert data in front of the current point in the list.
* @param list The list to hold the inserted @p data.
* @param data The data to insert into @p list.
* @return @c FALSE if there is an error, @c TRUE on success
* @return @c EINA_FALSE if there is an error, @c EINA_TRUE on success
* @ingroup Ecore_Data_List_Add_Item_Group
*/
EAPI inline int
@ -307,7 +307,7 @@ ecore_list_insert(Ecore_List *list, void *data)
int ret;
Ecore_List_Node *node;
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
CHECK_PARAM_POINTER_RETURN("list", list, EINA_FALSE);
node = ecore_list_node_new();
node->data = data;
@ -350,23 +350,23 @@ _ecore_list_insert(Ecore_List *list, Ecore_List_Node *new_node)
list->current = new_node;
list->nodes++;
return TRUE;
return EINA_TRUE;
}
/**
* Append a list to the list.
* @param list The list.
* @param append The list to append.
* @return @c FALSE if an error occurs, @c TRUE if appended successfully
* @return @c EINA_FALSE if an error occurs, @c EINA_TRUE if appended successfully
* @ingroup Ecore_Data_List_Add_Item_Group
*/
EAPI int
ecore_list_append_list(Ecore_List *list, Ecore_List *append)
{
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
CHECK_PARAM_POINTER_RETURN("append", append, FALSE);
CHECK_PARAM_POINTER_RETURN("list", list, EINA_FALSE);
CHECK_PARAM_POINTER_RETURN("append", append, EINA_FALSE);
if (ecore_list_empty_is(append)) return TRUE;
if (ecore_list_empty_is(append)) return EINA_TRUE;
if (ecore_list_empty_is(list))
{
@ -382,23 +382,23 @@ ecore_list_append_list(Ecore_List *list, Ecore_List *append)
list->nodes += append->nodes;
}
ecore_list_init(append);
return TRUE;
return EINA_TRUE;
}
/**
* Prepend a list to the beginning of the list.
* @param list The list.
* @param prepend The list to prepend.
* @return @c FALSE if an error occurs, @c TRUE if prepended successfully.
* @return @c EINA_FALSE if an error occurs, @c EINA_TRUE if prepended successfully.
* @ingroup Ecore_Data_List_Add_Item_Group
*/
EAPI int
ecore_list_prepend_list(Ecore_List *list, Ecore_List *prepend)
{
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
CHECK_PARAM_POINTER_RETURN("prepend", prepend, FALSE);
CHECK_PARAM_POINTER_RETURN("list", list, EINA_FALSE);
CHECK_PARAM_POINTER_RETURN("prepend", prepend, EINA_FALSE);
if (ecore_list_empty_is(prepend)) return TRUE;
if (ecore_list_empty_is(prepend)) return EINA_TRUE;
if (ecore_list_empty_is(list))
{
@ -415,7 +415,7 @@ ecore_list_prepend_list(Ecore_List *list, Ecore_List *prepend)
list->index += prepend->nodes;
}
ecore_list_init(prepend);
return TRUE;
return EINA_TRUE;
}
/**
@ -484,7 +484,7 @@ _ecore_list_remove_0(Ecore_List *list)
/**
* Remove and free the data in lists current position.
* @param list The list to remove and free the current item.
* @return @c TRUE on success, @c FALSE on error
* @return @c EINA_TRUE on success, @c EINA_FALSE on error
* @ingroup Ecore_Data_List_Remove_Item_Group
*/
EAPI int
@ -492,13 +492,13 @@ ecore_list_remove_destroy(Ecore_List *list)
{
void *data;
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
CHECK_PARAM_POINTER_RETURN("list", list, EINA_FALSE);
data = _ecore_list_remove_0(list);
if (list->free_func)
list->free_func(data);
return TRUE;
return EINA_TRUE;
}
/**
@ -888,26 +888,26 @@ _ecore_list_next(Ecore_List *list)
/**
* Remove all nodes from @p list.
* @param list The list.
* @return Returns @c TRUE on success, @c FALSE on error.
* @return Returns @c EINA_TRUE on success, @c EINA_FALSE on error.
* @note The data for each item on the list is not freed by
* @c ecore_list_clear().
*/
EAPI int
ecore_list_clear(Ecore_List *list)
{
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
CHECK_PARAM_POINTER_RETURN("list", list, EINA_FALSE);
while (!ecore_list_empty_is(list))
_ecore_list_first_remove(list);
return TRUE;
return EINA_TRUE;
}
/**
* Execute function for each node in @p list.
* @param list The list.
* @param function The function to pass each node from @p list to.
* @return Returns @c TRUE on success, @c FALSE on failure.
* @return Returns @c EINA_TRUE on success, @c EINA_FALSE on failure.
* @ingroup Ecore_Data_List_Traverse_Group
*/
EAPI int
@ -915,7 +915,7 @@ ecore_list_for_each(Ecore_List *list, Ecore_For_Each function, void *user_data)
{
int ret;
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
CHECK_PARAM_POINTER_RETURN("list", list, EINA_FALSE);
ret = _ecore_list_for_each(list, function, user_data);
@ -929,13 +929,13 @@ _ecore_list_for_each(Ecore_List *list, Ecore_For_Each function, void *user_data)
void *value;
if (!list || !function)
return FALSE;
return EINA_FALSE;
_ecore_list_first_goto(list);
while ((value = _ecore_list_next(list)) != NULL)
function(value, user_data);
return TRUE;
return EINA_TRUE;
}
/**
@ -1213,12 +1213,12 @@ ecore_list_heapsort(Ecore_List *list, Ecore_Compare_Cb compare, char order)
EAPI int
ecore_list_node_init(Ecore_List_Node *node)
{
CHECK_PARAM_POINTER_RETURN("node", node, FALSE);
CHECK_PARAM_POINTER_RETURN("node", node, EINA_FALSE);
node->next = NULL;
node->data = NULL;
return TRUE;
return EINA_TRUE;
}
/**
@ -1253,20 +1253,20 @@ ecore_list_node_new()
* Calls the function to free the data and the node.
* @param node Node to destroy.
* @param free_func Function to call if @p node points to data to free.
* @return @c TRUE.
* @return @c EINA_TRUE.
* @ingroup Ecore_Data_List_Node_Group
*/
EAPI int
ecore_list_node_destroy(Ecore_List_Node *node, Ecore_Free_Cb free_func)
{
CHECK_PARAM_POINTER_RETURN("node", node, FALSE);
CHECK_PARAM_POINTER_RETURN("node", node, EINA_FALSE);
if (free_func && node->data)
free_func(node->data);
FREE(node);
return TRUE;
return EINA_TRUE;
}
/**
@ -1302,17 +1302,17 @@ ecore_dlist_new()
/**
* Initialises a list to some sane starting values.
* @param list The doubly linked list to initialise.
* @return @c TRUE if successful, @c FALSE if an error occurs.
* @return @c EINA_TRUE if successful, @c EINA_FALSE if an error occurs.
* @ingroup Ecore_Data_DList_Creation_Group
*/
EAPI int
ecore_dlist_init(Ecore_DList *list)
{
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
CHECK_PARAM_POINTER_RETURN("list", list, EINA_FALSE);
memset(list, 0, sizeof(Ecore_DList));
return TRUE;
return EINA_TRUE;
}
/**
@ -1341,13 +1341,13 @@ ecore_dlist_destroy(Ecore_DList *list)
* @param list The doubly linked list that will use this function when
* nodes are destroyed.
* @param free_func The function that will free the key data
* @return @c TRUE on success, @c FALSE on failure.
* @return @c EINA_TRUE on success, @c EINA_FALSE on failure.
* @ingroup Ecore_Data_DList_Creation_Group
*/
EAPI int
ecore_dlist_free_cb_set(Ecore_DList *list, Ecore_Free_Cb free_func)
{
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
CHECK_PARAM_POINTER_RETURN("list", list, EINA_FALSE);
return ecore_list_free_cb_set(ECORE_LIST(list), free_func);
}
@ -1355,12 +1355,12 @@ ecore_dlist_free_cb_set(Ecore_DList *list, Ecore_Free_Cb free_func)
/**
* Returns whether there is anything in the given doubly linked list.
* @param list The given doubly linked list.
* @return @c TRUE if there are nodes, @c FALSE otherwise.
* @return @c EINA_TRUE if there are nodes, @c EINA_FALSE otherwise.
*/
EAPI int
ecore_dlist_empty_is(Ecore_DList *list)
{
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
CHECK_PARAM_POINTER_RETURN("list", list, EINA_FALSE);
return ecore_list_empty_is(ECORE_LIST(list));
}
@ -1373,7 +1373,7 @@ ecore_dlist_empty_is(Ecore_DList *list)
EAPI inline int
ecore_dlist_index(Ecore_DList *list)
{
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
CHECK_PARAM_POINTER_RETURN("list", list, EINA_FALSE);
return ecore_list_index(ECORE_LIST(list));
}
@ -1388,7 +1388,7 @@ ecore_dlist_index(Ecore_DList *list)
* Appends data to the given doubly linked list.
* @param list The given doubly linked list.
* @param data The data to append.
* @return @c TRUE if the data is successfully appended, @c FALSE otherwise.
* @return @c EINA_TRUE if the data is successfully appended, @c EINA_FALSE otherwise.
* @ingroup Ecore_Data_DList_Add_Item_Group
*/
EAPI int
@ -1398,7 +1398,7 @@ ecore_dlist_append(Ecore_DList *list, void *data)
Ecore_DList_Node *prev;
Ecore_DList_Node *node;
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
CHECK_PARAM_POINTER_RETURN("list", list, EINA_FALSE);
node = ecore_dlist_node_new();
ECORE_LIST_NODE(node)->data = data;
@ -1415,7 +1415,7 @@ ecore_dlist_append(Ecore_DList *list, void *data)
* Adds data to the very beginning of the given doubly linked list.
* @param list The given doubly linked list.
* @param data The data to prepend.
* @return @c TRUE if the data is successfully prepended, @c FALSE otherwise.
* @return @c EINA_TRUE if the data is successfully prepended, @c EINA_FALSE otherwise.
* @ingroup Ecore_Data_DList_Add_Item_Group
*/
EAPI int
@ -1425,7 +1425,7 @@ ecore_dlist_prepend(Ecore_DList *list, void *data)
Ecore_DList_Node *prev;
Ecore_DList_Node *node;
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
CHECK_PARAM_POINTER_RETURN("list", list, EINA_FALSE);
node = ecore_dlist_node_new();
ECORE_LIST_NODE(node)->data = data;
@ -1442,17 +1442,17 @@ ecore_dlist_prepend(Ecore_DList *list, void *data)
* Inserts data at the current point in the given doubly linked list.
* @param list The given doubly linked list.
* @param data The data to be inserted.
* @return @c TRUE on success, @c FALSE otherwise.
* @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
* @ingroup Ecore_Data_DList_Add_Item_Group
*/
EAPI int
ecore_dlist_insert(Ecore_DList *list, void *data)
{
int ret = TRUE;
int ret = EINA_TRUE;
Ecore_DList_Node *prev;
Ecore_DList_Node *node;
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
CHECK_PARAM_POINTER_RETURN("list", list, EINA_FALSE);
/*
* Identify and shortcut the end cases.
@ -1485,16 +1485,16 @@ ecore_dlist_insert(Ecore_DList *list, void *data)
* Appends a list to the given doubly linked list.
* @param list The given doubly linked list.
* @param append The list to append.
* @return @c TRUE if the data is successfully appended, @c FALSE otherwise.
* @return @c EINA_TRUE if the data is successfully appended, @c EINA_FALSE otherwise.
* @ingroup Ecore_Data_DList_Add_Item_Group
*/
EAPI int
ecore_dlist_append_list(Ecore_DList *list, Ecore_DList *append)
{
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
CHECK_PARAM_POINTER_RETURN("append", append, FALSE);
CHECK_PARAM_POINTER_RETURN("list", list, EINA_FALSE);
CHECK_PARAM_POINTER_RETURN("append", append, EINA_FALSE);
if (ecore_dlist_empty_is(append)) return TRUE;
if (ecore_dlist_empty_is(append)) return EINA_TRUE;
if (ecore_dlist_empty_is(list))
{
@ -1511,23 +1511,23 @@ ecore_dlist_append_list(Ecore_DList *list, Ecore_DList *append)
list->nodes += append->nodes;
}
ecore_dlist_init(append);
return TRUE;
return EINA_TRUE;
}
/**
* Adds a list to the very beginning of the given doubly linked list.
* @param list The given doubly linked list.
* @param prepend The list to prepend.
* @return @c TRUE if the data is successfully prepended, @c FALSE otherwise.
* @return @c EINA_TRUE if the data is successfully prepended, @c EINA_FALSE otherwise.
* @ingroup Ecore_Data_DList_Add_Item_Group
*/
EAPI int
ecore_dlist_prepend_list(Ecore_DList *list, Ecore_DList *prepend)
{
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
CHECK_PARAM_POINTER_RETURN("prepend", prepend, FALSE);
CHECK_PARAM_POINTER_RETURN("list", list, EINA_FALSE);
CHECK_PARAM_POINTER_RETURN("prepend", prepend, EINA_FALSE);
if (ecore_dlist_empty_is(prepend)) return TRUE;
if (ecore_dlist_empty_is(prepend)) return EINA_TRUE;
if (ecore_dlist_empty_is(list))
{
@ -1545,7 +1545,7 @@ ecore_dlist_prepend_list(Ecore_DList *list, Ecore_DList *prepend)
list->index += prepend->nodes;
}
ecore_dlist_init(prepend);
return TRUE;
return EINA_TRUE;
}
/**
@ -1602,7 +1602,7 @@ ecore_dlist_first_remove(Ecore_DList *list)
* Removes and frees the data at the current position in the given doubly
* linked list.
* @param list The given doubly linked list.
* @return @c TRUE on success, @c FALSE otherwise.
* @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
* @ingroup Ecore_Data_DList_Remove_Item_Group
*/
EAPI int
@ -1610,16 +1610,16 @@ ecore_dlist_remove_destroy(Ecore_DList *list)
{
void *data;
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
CHECK_PARAM_POINTER_RETURN("list", list, EINA_FALSE);
data = ecore_dlist_remove(list);
if (!data)
return FALSE;
return EINA_FALSE;
if (list->free_func)
list->free_func(data);
return TRUE;
return EINA_TRUE;
}
static void *
@ -1850,16 +1850,16 @@ _ecore_dlist_previous(Ecore_DList *list)
* @brief Remove all nodes from the list.
* @param list: the list to remove all nodes from
*
* @return Returns TRUE on success, FALSE on errors
* @return Returns EINA_TRUE on success, EINA_FALSE on errors
*/
EAPI int
ecore_dlist_clear(Ecore_DList *list)
{
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
CHECK_PARAM_POINTER_RETURN("list", list, EINA_FALSE);
ecore_list_clear(ECORE_LIST(list));
return TRUE;
return EINA_TRUE;
}
/**
@ -2064,14 +2064,14 @@ _ecore_dlist_node_merge(Ecore_List_Node *first, Ecore_List_Node *second,
/*
* @brief Initialize a node to sane starting values
* @param node: the node to initialize
* @return Returns TRUE on success, FALSE on errors
* @return Returns EINA_TRUE on success, EINA_FALSE on errors
*/
EAPI int
ecore_dlist_node_init(Ecore_DList_Node *node)
{
int ret;
CHECK_PARAM_POINTER_RETURN("node", node, FALSE);
CHECK_PARAM_POINTER_RETURN("node", node, EINA_FALSE);
ret = ecore_list_node_init(ECORE_LIST_NODE(node));
if (ret)
@ -2107,12 +2107,12 @@ ecore_dlist_node_new()
* @brief Call the data's free callback function, then free the node
* @param node: the node to be freed
* @param free_func: the callback function to execute on the data
* @return Returns TRUE on success, FALSE on error
* @return Returns EINA_TRUE on success, EINA_FALSE on error
*/
EAPI int
ecore_dlist_node_destroy(Ecore_DList_Node * node, Ecore_Free_Cb free_func)
{
CHECK_PARAM_POINTER_RETURN("node", node, FALSE);
CHECK_PARAM_POINTER_RETURN("node", node, EINA_FALSE);
return ecore_list_node_destroy(ECORE_LIST_NODE(node), free_func);
}

View File

@ -53,12 +53,12 @@ ecore_sheap_new(Ecore_Compare_Cb compare, int size)
* @param heap The heap to initialize
* @param compare The function for comparing keys, NULL for direct comparison
* @param size The number of elements to allow in the heap
* @return TRUE on success, FALSE on failure
* @return EINA_TRUE on success, EINA_FALSE on failure
*/
EAPI int
ecore_sheap_init(Ecore_Sheap *heap, Ecore_Compare_Cb compare, int size)
{
CHECK_PARAM_POINTER_RETURN("heap", heap, FALSE);
CHECK_PARAM_POINTER_RETURN("heap", heap, EINA_FALSE);
heap->space = size;
if (!compare)
@ -69,10 +69,10 @@ ecore_sheap_init(Ecore_Sheap *heap, Ecore_Compare_Cb compare, int size)
heap->data = (void **)malloc(heap->space * sizeof(void *));
if (!heap->data)
return FALSE;
return EINA_FALSE;
memset(heap->data, 0, heap->space * sizeof(void *));
return TRUE;
return EINA_TRUE;
}
/**
@ -107,23 +107,23 @@ ecore_sheap_destroy(Ecore_Sheap *heap)
* @param heap The heap that will use this function when nodes are
* destroyed.
* @param free_func The function that will free the key data.
* @return @c TRUE on successful set, @c FALSE otherwise.
* @return @c EINA_TRUE on successful set, @c EINA_FALSE otherwise.
*/
EAPI int
ecore_sheap_free_cb_set(Ecore_Sheap *heap, Ecore_Free_Cb free_func)
{
CHECK_PARAM_POINTER_RETURN("heap", heap, FALSE);
CHECK_PARAM_POINTER_RETURN("heap", heap, EINA_FALSE);
heap->free_func = free_func;
return TRUE;
return EINA_TRUE;
}
/**
* Insert new data into the heap.
* @param heap The heap to insert @a data.
* @param data The data to add to @a heap.
* @return TRUE on success, NULL on failure. Increases the size of the heap if
* @return EINA_TRUE on success, NULL on failure. Increases the size of the heap if
* it becomes larger than available space.
*/
EAPI int
@ -134,16 +134,16 @@ ecore_sheap_insert(Ecore_Sheap *heap, void *data)
int parent;
int position;
CHECK_PARAM_POINTER_RETURN("heap", heap, FALSE);
CHECK_PARAM_POINTER_RETURN("heap", heap, EINA_FALSE);
/*
* Increase the size of the allocated data area if there isn't enough
* space available to add this data
*/
if (heap->size >= heap->space)
return FALSE;
return EINA_FALSE;
heap->sorted = FALSE;
heap->sorted = EINA_FALSE;
/*
* Place the data at the end of the heap initially. Then determine the
@ -209,7 +209,7 @@ ecore_sheap_insert(Ecore_Sheap *heap, void *data)
}
}
return TRUE;
return EINA_TRUE;
}
/**
@ -227,7 +227,7 @@ ecore_sheap_extract(Ecore_Sheap *heap)
if (heap->size < 1)
return NULL;
heap->sorted = FALSE;
heap->sorted = EINA_FALSE;
extreme = heap->data[0];
heap->size--;
@ -258,7 +258,7 @@ ecore_sheap_extreme(Ecore_Sheap *heap)
* @param heap The heap to search for the item to change
* @param item The item in the heap to change
* @param newval The new value assigned to the item in the heap
* @return