remove trailing spaces

SVN revision: 37851
This commit is contained in:
Vincent Torri 2008-11-29 11:23:17 +00:00
parent e12623ee46
commit b1f46fb7e8
23 changed files with 265 additions and 271 deletions

View File

@ -1,4 +1,3 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif

View File

@ -14,22 +14,22 @@ static double animators_frametime = 1.0 / 30.0;
* @param data The data to pass to the function
* @return A handle to the new animator
* @ingroup Ecore_Animator_Group
*
*
* This function adds a animator and returns its handle on success and NULL on
* failure. The function @p func will be called every N seconds where N is the
* frametime interval set by ecore_animator_frametime_set(). The function will
* be passed the @p data pointer as its parameter.
*
* When the animator @p func is called, it must return a value of either 1 or 0.
* If it returns 1 (or ECORE_CALLBACK_RENEW), it will be called again at the
* next tick, or if it returns 0 (or ECORE_CALLBACK_CANCEL) it will be deleted
*
* When the animator @p func is called, it must return a value of either 1 or 0.
* If it returns 1 (or ECORE_CALLBACK_RENEW), it will be called again at the
* next tick, or if it returns 0 (or ECORE_CALLBACK_CANCEL) it will be deleted
* automatically making any references/handles for it invalid.
*/
EAPI Ecore_Animator *
ecore_animator_add(int (*func) (void *data), const void *data)
{
Ecore_Animator *animator;
if (!func) return NULL;
animator = calloc(1, sizeof(Ecore_Animator));
if (!animator) return NULL;
@ -47,7 +47,7 @@ ecore_animator_add(int (*func) (void *data), const void *data)
* @param animator The animator to delete
* @return The data pointer set for the animator
* @ingroup Ecore_Animator_Group
*
*
* Delete the specified @p aqnimator from the set of animators that are executed
* during main loop execution. This function returns the data parameter that
* was being passed to the callback on success, or NULL on failure. After this
@ -72,7 +72,7 @@ ecore_animator_del(Ecore_Animator *animator)
/**
* Set the animator call interval in seconds.
* @param frametime The time in seconds in between animator ticks.
*
*
* This function sets the time interval (in seconds) inbetween animator ticks.
*/
EAPI void
@ -93,7 +93,7 @@ ecore_animator_frametime_set(double frametime)
/**
* Get the animator call interval in seconds.
* @return The time in second in between animator ticks.
*
*
* this function retrieves the time inbetween animator ticks, in seconds.
*/
EAPI double
@ -109,11 +109,11 @@ _ecore_animator_shutdown(void)
{
ecore_timer_del(timer);
timer = NULL;
}
}
while (animators)
{
Ecore_Animator *animator;
animator = animators;
animators = _ecore_list2_remove(animators, animator);
ECORE_MAGIC_SET(animator, ECORE_MAGIC_NONE);
@ -129,7 +129,7 @@ _ecore_animator(void *data __UNUSED__)
for (l = (Ecore_List2 *)animators; l;)
{
Ecore_Animator *animator;
animator = (Ecore_Animator *)l;
l = l->next;
if (!animator->delete_me)
@ -146,7 +146,7 @@ _ecore_animator(void *data __UNUSED__)
for (l = (Ecore_List2 *)animators; l;)
{
Ecore_Animator *animator;
animator = (Ecore_Animator *)l;
l = l->next;
if (animator->delete_me)

View File

@ -1,4 +1,3 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
@ -17,7 +16,7 @@ static char **app_argv = NULL;
* Set up the programs command-line arguments.
* @param argc The same as passed as argc to the programs main() function
* @param argv The same as passed as argv to the programs main() function
*
*
* A call to this function will store the programs command-line arguments
* for later use by ecore_app_restart() or ecore_app_args_get().
*/
@ -34,7 +33,7 @@ ecore_app_args_set(int argc, const char **argv)
* Return the programs stored command-line arguments.
* @param argc A pointer to the return value to hold argc
* @param argv A pointer to the return value to hold argv
*
*
* When called, this funciton returns the arguments for the program stored by
* ecore_app_args_set(). The integer pointed to by @p argc will be filled, if
* the pointer is not NULL, and the string array pointer @p argv will be filled
@ -50,7 +49,7 @@ ecore_app_args_get(int *argc, char ***argv)
/**
* Restart the program executable with the command-line arguments stored.
*
*
* This function will restart & re-execute this program in place of itself
* using the command-line arguments stored by ecore_app_args_set(). This is
* an easy way for a program to restart itself for cleanup purposes,
@ -61,7 +60,7 @@ ecore_app_restart(void)
{
char *args[4096];
int i;
if ((app_argc < 1) || (!app_argv)) return;
if (app_argc >= 4096) return;
for (i = 0; i < app_argc; i++) args[i] = app_argv[i];

View File

@ -24,21 +24,21 @@ static void *ecore_raw_event_event = NULL;
* @param func The function to call when the event is found in the queue
* @param data A data pointer to pass to the called function @p func
* @return A new Event handler, or NULL on failure
*
*
* Add an event handler to the list of handlers. This will, on success, return
* a handle to the event handler object that was created, that can be used
* later to remove the handler using ecore_event_handler_del(). The @p type
* later to remove the handler using ecore_event_handler_del(). The @p type
* parameter is the iteger of the event type that will trigger this callback
* to be called. The callback @p func is called when this event is processed
* and will be passed the event type, a pointer to the private event
* structure that is specific to that event type, and a data pointer that is
* structure that is specific to that event type, and a data pointer that is
* provided in this call as the @p data parameter.
*
* When the callback @p func is called, it must return 1 or 0. If it returns
* 1 (or ECORE_CALLBACK_RENEW), It will keep being called as per normal, for
* each handler set up for that event type. If it returns 0 (or
*
* When the callback @p func is called, it must return 1 or 0. If it returns
* 1 (or ECORE_CALLBACK_RENEW), It will keep being called as per normal, for
* each handler set up for that event type. If it returns 0 (or
* ECORE_CALLBACK_CANCEL), it will cease processing handlers for that particular
* event, so all handler set to handle that event type that have not already
* event, so all handler set to handle that event type that have not already
* been called, will not be.
*/
EAPI Ecore_Event_Handler *
@ -57,14 +57,14 @@ ecore_event_handler_add(int type, int (*func) (void *data, int type, void *event
if (type >= (event_handlers_num - 1))
{
int p_alloc_num;
p_alloc_num = event_handlers_alloc_num;
event_handlers_num = type + 1;
if (event_handlers_num > event_handlers_alloc_num)
{
Ecore_Event_Handler **new_handlers;
int i;
event_handlers_alloc_num = ((event_handlers_num + 16) / 16) * 16;
new_handlers = realloc(event_handlers, event_handlers_alloc_num * sizeof(Ecore_Event_Handler *));
if (!new_handlers)
@ -85,7 +85,7 @@ ecore_event_handler_add(int type, int (*func) (void *data, int type, void *event
* Delete an event handler.
* @param event_handler Event handler handle to delete
* @return Data passed to handler
*
*
* Delete a specified event handler from the handler list. On success this will
* delete the event handler and return the pointer passed as @p data when the
* handler was added by ecore_event_handler_add(). On failure NULL will be
@ -95,8 +95,8 @@ EAPI void *
ecore_event_handler_del(Ecore_Event_Handler *event_handler)
{
Ecore_List2_Data *node;
if (!ECORE_MAGIC_CHECK(event_handler, ECORE_MAGIC_EVENT_HANDLER))
if (!ECORE_MAGIC_CHECK(event_handler, ECORE_MAGIC_EVENT_HANDLER))
{
ECORE_MAGIC_FAIL(event_handler, ECORE_MAGIC_EVENT_HANDLER,
"ecore_event_handler_del");
@ -109,7 +109,7 @@ ecore_event_handler_del(Ecore_Event_Handler *event_handler)
return event_handler->data;
}
static void
static void
_ecore_event_generic_free (void *data __UNUSED__, void *event)
{
free (event);
@ -122,10 +122,10 @@ _ecore_event_generic_free (void *data __UNUSED__, void *event)
* @param func_free The function to be called to free this private structure
* @param data The data pointer to be passed to the free function
* @return A Handle for that event
*
*
* On success this function returns a handle to an event on the event queue, or
* NULL if it fails. If it succeeds, an event of type @p type will be added
* to the queue for processing by event handlers added by
* to the queue for processing by event handlers added by
* ecore_event_handler_add(). The @p ev parameter will be a pointer to the event
* private data that is specific to that event type. When the event is no
* longer needed, @p func_free will be called and passed the private structure
@ -147,7 +147,7 @@ ecore_event_add(int type, void *ev, void (*func_free) (void *data, void *ev), vo
* Delete an event from the queue.
* @param event The event handle to delete
* @return The data pointer originally set for the event free function
*
*
* This deletes the event @p event from the event queue, and returns the
* @p data parameer originally set when adding it with ecore_event_add(). This
* does not immediately call the free function, and it may be called later on
@ -157,9 +157,9 @@ ecore_event_add(int type, void *ev, void (*func_free) (void *data, void *ev), vo
EAPI void *
ecore_event_del(Ecore_Event *event)
{
if (!ECORE_MAGIC_CHECK(event, ECORE_MAGIC_EVENT))
if (!ECORE_MAGIC_CHECK(event, ECORE_MAGIC_EVENT))
{
ECORE_MAGIC_FAIL(event, ECORE_MAGIC_EVENT, "ecore_event_del");
ECORE_MAGIC_FAIL(event, ECORE_MAGIC_EVENT, "ecore_event_del");
return NULL;
}
event->delete_me = 1;
@ -169,8 +169,8 @@ ecore_event_del(Ecore_Event *event)
/**
* Allocate a new event type id sensibly and return the new id.
* @return A new event type id.
*
* This function allocates a new event type id and returns it. Once an event
*
* This function allocates a new event type id and returns it. Once an event
* type has been allocated it can never be de-allocated during the life of
* the program. There is no guarantee of the contents of this event ID, or how
* it is calculated, except that the ID will be unique to the current instance
@ -190,8 +190,8 @@ ecore_event_type_new(void)
* @param func_end Function to call after the queu has been filtered
* @param data Data to pass to the filter functions
* @return A filter handle
*
* This adds a filter to call callbacks to loop through the event queue and
*
* This adds a filter to call callbacks to loop through the event queue and
* filter events out of the queue. On failure NULL is returned. On success a
* Filter handle is returned. Filters are called on the queue just before
* Event handler processing to try and remove redundant events. Just as
@ -207,7 +207,7 @@ EAPI Ecore_Event_Filter *
ecore_event_filter_add(void * (*func_start) (void *data), int (*func_filter) (void *data, void *loop_data, int type, void *event), void (*func_end) (void *data, void *loop_data), const void *data)
{
Ecore_Event_Filter *ef;
if (!func_filter) return NULL;
ef = calloc(1, sizeof(Ecore_Event_Filter));
if (!ef) return NULL;
@ -224,14 +224,14 @@ ecore_event_filter_add(void * (*func_start) (void *data), int (*func_filter) (vo
* Delete an event filter.
* @param ef The event filter handle
* @return The data set for the filter
*
*
* Delete a filter that has been added by its @p ef handle. On success this
* will return the data pointer set when this filter was added. On failure
* NULL is returned.
*/
EAPI void *
ecore_event_filter_del(Ecore_Event_Filter *ef)
{
{
if (!ECORE_MAGIC_CHECK(ef, ECORE_MAGIC_EVENT_FILTER))
{
ECORE_MAGIC_FAIL(ef, ECORE_MAGIC_EVENT_FILTER, "ecore_event_filter_del");
@ -245,11 +245,11 @@ ecore_event_filter_del(Ecore_Event_Filter *ef)
/**
* Return the current event type being handled.
* @return The current event type being handled if inside a handler callback
*
*
* If the program is currently inside an Ecore event handler callback this
* will return the type of the current event being processed. If Ecore is
* not inside an event handler, ECORE_EVENT_NONE is returned.
*
*
* This is useful when certain Ecore modules such as Ecore_Evas "swallow"
* events and not all the original information is passed on. In special cases
* this extra information may be useful or needed and using this call can let
@ -265,11 +265,11 @@ ecore_event_current_type_get(void)
/**
* Return the current event type pointer handled.
* @return The current event pointer being handled if inside a handler callback
*
*
* If the program is currently inside an Ecore event handler callback this
* will return the pointer of the current event being processed. If Ecore is
* not inside an event handler, NULL will be returned.
*
*
* This is useful when certain Ecore modules such as Ecore_Evas "swallow"
* events and not all the original information is passed on. In special cases
* this extra information may be useful or needed and using this call can let
@ -286,14 +286,14 @@ void
_ecore_event_shutdown(void)
{
int i;
while (events) _ecore_event_del(events);
for (i = 0; i < event_handlers_num; i++)
{
while (event_handlers[i])
{
Ecore_Event_Handler *eh;
eh = event_handlers[i];
event_handlers[i] = _ecore_list2_remove(event_handlers[i], eh);
ECORE_MAGIC_SET(eh, ECORE_MAGIC_NONE);
@ -303,7 +303,7 @@ _ecore_event_shutdown(void)
while (event_handlers_delete_list)
{
Ecore_List2_Data *ehd;
ehd = event_handlers_delete_list;
event_handlers_delete_list = _ecore_list2_remove(event_handlers_delete_list, ehd);
free(ehd);
@ -315,9 +315,9 @@ _ecore_event_shutdown(void)
while (event_filters)
{
Ecore_Event_Filter *ef;
ef = event_filters;
event_filters = _ecore_list2_remove(event_filters, ef);
event_filters = _ecore_list2_remove(event_filters, ef);
ECORE_MAGIC_SET(ef, ECORE_MAGIC_NONE);
free(ef);
}
@ -335,7 +335,7 @@ Ecore_Event *
_ecore_event_add(int type, void *ev, void (*func_free) (void *data, void *ev), void *data)
{
Ecore_Event *e;
e = calloc(1, sizeof(Ecore_Event));
if (!e) return NULL;
ECORE_MAGIC_SET(e, ECORE_MAGIC_EVENT);
@ -352,7 +352,7 @@ void *
_ecore_event_del(Ecore_Event *event)
{
void *data;
data = event->data;
if (event->func_free) event->func_free(event->data, event->event);
events = _ecore_list2_remove(events, event);
@ -440,7 +440,7 @@ _ecore_event_call(void)
// printf("EVENT BATCH DONE\n");
ecore_raw_event_type = ECORE_EVENT_NONE;
ecore_raw_event_event = NULL;
while (events) _ecore_event_del(events);
while (event_handlers_delete_list)
{
@ -458,7 +458,7 @@ EAPI void *
_ecore_event_signal_user_new(void)
{
Ecore_Event_Signal_User *e;
e = calloc(1, sizeof(Ecore_Event_Signal_User));
return e;
}
@ -467,7 +467,7 @@ void *
_ecore_event_signal_hup_new(void)
{
Ecore_Event_Signal_Hup *e;
e = calloc(1, sizeof(Ecore_Event_Signal_Hup));
return e;
}
@ -476,7 +476,7 @@ void *
_ecore_event_signal_exit_new(void)
{
Ecore_Event_Signal_Exit *e;
e = calloc(1, sizeof(Ecore_Event_Signal_Exit));
return e;
}
@ -485,7 +485,7 @@ void *
_ecore_event_signal_power_new(void)
{
Ecore_Event_Signal_Power *e;
e = calloc(1, sizeof(Ecore_Event_Signal_Power));
return e;
}

View File

@ -212,10 +212,10 @@ static int run_pri = ECORE_EXE_PRIORITY_INHERIT;
/**
* Sets the priority at which to launch processes
*
* This sets the priority of processes run by ecore_exe_run() and
* This sets the priority of processes run by ecore_exe_run() and
* ecore_exe_pipe_run(). If set to ECORE_EXE_PRIORITY_INHERIT child processes
* inherit the priority of their parent. This is the default.
*
*
* @param pri value -20 to 19 or ECORE_EXE_PRIORITY_INHERIT
* @ingroup Ecore_Exe_Basic_Group
*/
@ -228,10 +228,10 @@ ecore_exe_run_priority_set(int pri)
/**
* Gets the priority at which to launch processes
*
* This gets ths priority of launched processes. See
* This gets ths priority of launched processes. See
* ecore_exe_run_priority_set() for details. This just returns the value set
* by this call.
*
*
* @return the value set by ecore_exe_run_priority_set()
* @ingroup Ecore_Exe_Basic_Group
*/
@ -330,7 +330,7 @@ ecore_exe_pipe_run(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data)
if ((flags & ECORE_EXE_PIPE_AUTO) && (!(flags & ECORE_EXE_PIPE_ERROR))
&& (!(flags & ECORE_EXE_PIPE_READ)))
/* We need something to auto pipe. */
flags |= ECORE_EXE_PIPE_READ | ECORE_EXE_PIPE_ERROR;
flags |= ECORE_EXE_PIPE_READ | ECORE_EXE_PIPE_ERROR;
exe->child_fd_error = -1;
exe->child_fd_read = -1;
@ -374,11 +374,11 @@ ecore_exe_pipe_run(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data)
{
pid_t pid = 0;
volatile int vfork_exec_errno = 0;
/* FIXME: I should double check this. After a quick look around, this is already done, but via a more modern method. */
/* signal(SIGPIPE, SIG_IGN); We only want EPIPE on errors */
pid = fork();
if (pid == -1)
{
fprintf(stderr, "Failed to fork process\n");
@ -434,7 +434,7 @@ ecore_exe_pipe_run(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data)
if (flags & ECORE_EXE_PIPE_WRITE)
E_NO_ERRNO(result, close(writePipe[0]), ok);
E_NO_ERRNO(result, close(statusPipe[1]), ok);
_exit(-1);
}
else /* parent */
@ -442,13 +442,13 @@ ecore_exe_pipe_run(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data)
/* Close the unused pipes. */
E_NO_ERRNO(result, close(statusPipe[1]), ok);
/* FIXME: after having a good look at the current e fd
/* FIXME: after having a good look at the current e fd
* handling, investigate fcntl(dataPipe[x], F_SETSIG, ...) */
/* FIXME: above F_SETSIG etc. - this is async SIGIO based IO
* which is also linux specific so we probably don't want to
* do this as long as select() is working fine. the only time
* we really want to think of SIGIO async IO is when it all
* actually works basically everywhere and we can turn all
* actually works basically everywhere and we can turn all
* IO into DMA async activities (i.e. you do a read() then
* the read is complete not on return but when you get a
* SIGIO - the read() just starts the transfer and it is
@ -463,7 +463,7 @@ ecore_exe_pipe_run(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data)
for (;;)
{
char buf;
E_NO_ERRNO(result, read(statusPipe[0], &buf, 1), ok);
if (result == 0)
{
@ -560,7 +560,7 @@ ecore_exe_pipe_run(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data)
ok = 0;
}
}
exes = _ecore_list2_append(exes, exe);
n = 0;
}
@ -579,7 +579,7 @@ ecore_exe_pipe_run(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data)
else
{
Ecore_Exe_Event_Add *e;
e = _ecore_exe_event_add_new();
e->exe = exe;
if (e) /* Send the event. */
@ -587,7 +587,7 @@ ecore_exe_pipe_run(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data)
_ecore_exe_event_add_free, NULL);
/* printf("Running as %d for %s.\n", exe->pid, exe->cmd); */
}
errno = n;
return exe;
}
@ -1448,7 +1448,7 @@ _ecore_exe_data_generic_handler(void *data, Ecore_Fd_Handler * fd_handler,
lost_exe = 0;
errno = 0;
if ((num = read(child_fd, buf, READBUFSIZ)) < 1)
/* FIXME: SPEED/SIZE TRADE OFF - add a smaller READBUFSIZE
/* FIXME: SPEED/SIZE TRADE OFF - add a smaller READBUFSIZE
* (currently 64k) to inbuf, use that instead of buf, and
* save ourselves a memcpy(). */
{

View File

@ -218,7 +218,7 @@ ecore_hash_hash_set(Ecore_Hash *hash, Ecore_Hash *set)
* @return @c TRUE on success, @c FALSE on error.
* @ingroup Ecore_Data_Hash_ADT_Destruction_Group
*/
EAPI void
EAPI void
ecore_hash_destroy(Ecore_Hash *hash)
{
unsigned int i = 0;
@ -281,7 +281,7 @@ ecore_hash_count(Ecore_Hash *hash)
* @return TRUE on success, FALSE otherwise.
* @ingroup Ecore_Data_Hash_ADT_Traverse_Group
*/
EAPI int
EAPI int
ecore_hash_for_each_node(Ecore_Hash *hash, Ecore_For_Each for_each_func, void *user_data)
{
unsigned int i = 0;

View File

@ -77,7 +77,7 @@ _ecore_idle_enterer_shutdown(void)
while (idle_enterers)
{
Ecore_Idle_Enterer *ie;
ie = idle_enterers;
idle_enterers = _ecore_list2_remove(idle_enterers, ie);
ECORE_MAGIC_SET(ie, ECORE_MAGIC_NONE);
@ -90,11 +90,11 @@ void
_ecore_idle_enterer_call(void)
{
Ecore_List2 *l;
for (l = (Ecore_List2 *)idle_enterers; l; l = l->next)
{
Ecore_Idle_Enterer *ie;
ie = (Ecore_Idle_Enterer *)l;
if (!ie->delete_me)
{
@ -106,7 +106,7 @@ _ecore_idle_enterer_call(void)
for (l = (Ecore_List2 *)idle_enterers; l;)
{
Ecore_Idle_Enterer *ie;
ie = (Ecore_Idle_Enterer *)l;
l = l->next;
if (ie->delete_me)

View File

@ -53,7 +53,7 @@ _ecore_idle_exiter_shutdown(void)
while (idle_exiters)
{
Ecore_Idle_Exiter *ie;
ie = idle_exiters;
idle_exiters = _ecore_list2_remove(idle_exiters, ie);
ECORE_MAGIC_SET(ie, ECORE_MAGIC_NONE);
@ -66,11 +66,11 @@ void
_ecore_idle_exiter_call(void)
{
Ecore_List2 *l;
for (l = (Ecore_List2 *)idle_exiters; l; l = l->next)
{
Ecore_Idle_Exiter *ie;
ie = (Ecore_Idle_Exiter *)l;
if (!ie->delete_me)
{
@ -82,7 +82,7 @@ _ecore_idle_exiter_call(void)
for (l = (Ecore_List2 *)idle_exiters; l;)
{
Ecore_Idle_Exiter *ie;
ie = (Ecore_Idle_Exiter *)l;
l = l->next;
if (ie->delete_me)

View File

@ -13,8 +13,8 @@ static int idlers_delete_me = 0;
*
* Add an idler handle to the event loop, returning a handle on success and
* NULL otherwise. The function @p func will be called repeatedly while
* no other events are ready to be processed, as long as it returns 1
* (or ECORE_CALLBACK_RENEW). A return of 0 (or ECORE_CALLBACK_CANCEL) deletes
* no other events are ready to be processed, as long as it returns 1
* (or ECORE_CALLBACK_RENEW). A return of 0 (or ECORE_CALLBACK_CANCEL) deletes
* the idler.
*
* Idlers are useful for progressively prossessing data without blocking.
@ -61,7 +61,7 @@ _ecore_idler_shutdown(void)
while (idlers)
{
Ecore_Idler *ie;
ie = idlers;
idlers = _ecore_list2_remove(idlers, ie);
ECORE_MAGIC_SET(ie, ECORE_MAGIC_NONE);
@ -78,7 +78,7 @@ _ecore_idler_call(void)
for (l = (Ecore_List2 *)idlers; l; l = l->next)
{
Ecore_Idler *ie;
ie = (Ecore_Idler *)l;
if (!ie->delete_me)
{
@ -90,7 +90,7 @@ _ecore_idler_call(void)
for (l = (Ecore_List2 *)idlers; l;)
{
Ecore_Idler *ie;
ie = (Ecore_Idler *)l;
l = l->next;
if (ie->delete_me)

View File

@ -36,13 +36,13 @@ static void *_ecore_list_find(Ecore_List *list, Ecore_Compare_Cb function,
/* Sorting functions */
static Ecore_List_Node *_ecore_list_node_mergesort(Ecore_List_Node *first,
int n, Ecore_Compare_Cb compare, int order);
static Ecore_List_Node *_ecore_list_node_merge(Ecore_List_Node *first,
static Ecore_List_Node *_ecore_list_node_merge(Ecore_List_Node *first,
Ecore_List_Node *second,
Ecore_Compare_Cb compare,
int order);
static Ecore_List_Node *_ecore_dlist_node_mergesort(Ecore_List_Node *first,
int n, Ecore_Compare_Cb compare, int order);
static Ecore_List_Node *_ecore_dlist_node_merge(Ecore_List_Node *first,
static Ecore_List_Node *_ecore_dlist_node_merge(Ecore_List_Node *first,
Ecore_List_Node *second,
Ecore_Compare_Cb compare,
int order);
@ -259,7 +259,7 @@ ecore_list_new(void)
* @return @c TRUE if successful, @c FALSE if an error occurs.
* @ingroup Ecore_Data_List_Creation_Group
*/
EAPI int
EAPI int
ecore_list_init(Ecore_List *list)
{
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
@ -274,7 +274,7 @@ ecore_list_init(Ecore_List *list)
* @param list The list to be freed.
* @ingroup Ecore_Data_List_Creation_Group
*/
EAPI void
EAPI void
ecore_list_destroy(Ecore_List *list)
{
void *data;
@ -298,7 +298,7 @@ ecore_list_destroy(Ecore_List *list)
* @param free_func The function that will free the key data.
* @return @c TRUE on successful set, @c FALSE otherwise.
*/
EAPI int
EAPI int
ecore_list_free_cb_set(Ecore_List *list, Ecore_Free_Cb free_func)
{
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
@ -313,7 +313,7 @@ ecore_list_free_cb_set(Ecore_List *list, Ecore_Free_Cb free_func)
* @param list The list to check for nodes
* @return @c TRUE if no nodes in list, @c FALSE if the list contains nodes
*/
EAPI int
EAPI int
ecore_list_empty_is(Ecore_List *list)
{
int ret = TRUE;
@ -331,7 +331,7 @@ ecore_list_empty_is(Ecore_List *list)
* @param list The list to return the number of the current node.
* @return The number of the current node in the list.
*/
EAPI int
EAPI int
ecore_list_index(Ecore_List *list)
{
int ret;
@ -348,7 +348,7 @@ ecore_list_index(Ecore_List *list)
* @param list The list to find the number of nodes
* @return The number of nodes in the list.
*/
EAPI int
EAPI int
ecore_list_count(Ecore_List *list)
{
int ret = 0;
@ -373,7 +373,7 @@ Functions that are used to add nodes to an Ecore_List.
* @return @c FALSE if an error occurs, @c TRUE if appended successfully
* @ingroup Ecore_Data_List_Add_Item_Group
*/
EAPI inline int
EAPI inline int
ecore_list_append(Ecore_List *list, void *data)
{
int ret;
@ -390,7 +390,7 @@ ecore_list_append(Ecore_List *list, void *data)
}
/* For adding items to the end of the list */
static int
static int
_ecore_list_append_0(Ecore_List *list, Ecore_List_Node *end)
{
if (list->last)
@ -420,7 +420,7 @@ _ecore_list_append_0(Ecore_List *list, Ecore_List_Node *end)
* @return @c FALSE if an error occurs, @c TRUE if prepended successfully.
* @ingroup Ecore_Data_List_Add_Item_Group
*/
EAPI inline int
EAPI inline int
ecore_list_prepend(Ecore_List *list, void *data)
{
int ret;
@ -437,7 +437,7 @@ ecore_list_prepend(Ecore_List *list, void *data)
}
/* For adding items to the beginning of the list */
static int
static int
_ecore_list_prepend_0(Ecore_List *list, Ecore_List_Node *start)
{
/* Put it at the beginning of the list */
@ -462,7 +462,7 @@ _ecore_list_prepend_0(Ecore_List *list, Ecore_List_Node *start)
* @return @c FALSE if there is an error, @c TRUE on success
* @ingroup Ecore_Data_List_Add_Item_Group
*/
EAPI inline int
EAPI inline int
ecore_list_insert(Ecore_List *list, void *data)
{
int ret;
@ -479,7 +479,7 @@ ecore_list_insert(Ecore_List *list, void *data)
}
/* For adding items in front of the current position in the list */
static int
static int
_ecore_list_insert(Ecore_List *list, Ecore_List_Node *new_node)
{
/*
@ -521,7 +521,7 @@ _ecore_list_insert(Ecore_List *list, Ecore_List_Node *new_node)
* @ingroup Ecore_Data_List_Add_Item_Group
*/
EAPI int
EAPI int
ecore_list_append_list(Ecore_List *list, Ecore_List *append)
{
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
@ -553,7 +553,7 @@ ecore_list_append_list(Ecore_List *list, Ecore_List *append)
* @return @c FALSE if an error occurs, @c TRUE if prepended successfully.
* @ingroup Ecore_Data_List_Add_Item_Group
*/
EAPI int
EAPI int
ecore_list_prepend_list(Ecore_List *list, Ecore_List *prepend)
{
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
@ -648,7 +648,7 @@ _ecore_list_remove_0(Ecore_List *list)
* @return @c TRUE on success, @c FALSE on error
* @ingroup Ecore_Data_List_Remove_Item_Group
*/
EAPI int
EAPI int
ecore_list_remove_destroy(Ecore_List *list)
{
void *data;
@ -808,7 +808,7 @@ _ecore_list_index_goto(Ecore_List *list, int index)
if (index > ecore_list_count(list) || index < 0)
return NULL;
if (index < list->index)
if (index < list->index)
{
_ecore_list_first_goto(list);
i = 0;
@ -1053,7 +1053,7 @@ _ecore_list_next(Ecore_List *list)
* @note The data for each item on the list is not freed by
* @c ecore_list_clear().
*/
EAPI int
EAPI int
ecore_list_clear(Ecore_List *list)
{
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
@ -1071,7 +1071,7 @@ ecore_list_clear(Ecore_List *list)
* @return Returns @c TRUE on success, @c FALSE on failure.
* @ingroup Ecore_Data_List_Traverse_Group
*/
EAPI int
EAPI int
ecore_list_for_each(Ecore_List *list, Ecore_For_Each function, void *user_data)
{
int ret;
@ -1084,7 +1084,7 @@ ecore_list_for_each(Ecore_List *list, Ecore_For_Each function, void *user_data)
}
/* The real meat of executing the function for each data node */
static int
static int
_ecore_list_for_each(Ecore_List *list, Ecore_For_Each function, void *user_data)
{
void *value;
@ -1147,14 +1147,14 @@ EAPI int
ecore_list_sort(Ecore_List *list, Ecore_Compare_Cb compare, char order)
{
CHECK_PARAM_POINTER_RETURN("list", list, 0);
if (list->nodes < 2)
return 1;
if (list->nodes < ECORE_MERGESORT_LIMIT)
return ecore_list_mergesort(list, compare, order);
if (!ecore_list_heapsort(list, compare, order))
return ecore_list_mergesort(list, compare, order);
return 1;
}
@ -1166,7 +1166,7 @@ ecore_list_sort(Ecore_List *list, Ecore_Compare_Cb compare, char order)
* ECORE_SORT_MAX
* @return true on success
*
* Mergesort is a stable, in-place sorting algorithm
* Mergesort is a stable, in-place sorting algorithm
*/
EAPI int
ecore_list_mergesort(Ecore_List *list, Ecore_Compare_Cb compare, char order)
@ -1217,14 +1217,14 @@ ecore_list_merge(Ecore_List *list, Ecore_List *l2, Ecore_Compare_Cb compare, cha
ecore_list_append_list(list, l2);
return;
}
if (order == ECORE_SORT_MIN)
order = 1;
else
order = -1;
list->first = _ecore_list_node_merge(list->first, l2->first, compare, order);
if ((order * compare(list->last->data, l2->last->data)) < 0)
list->last = l2->last;
@ -1371,7 +1371,7 @@ ecore_list_heapsort(Ecore_List *list, Ecore_Compare_Cb compare, char order)
}
/* Initialize a node to starting values */
EAPI int
EAPI int
ecore_list_node_init(Ecore_List_Node *node)
{
CHECK_PARAM_POINTER_RETURN("node", node, FALSE);
@ -1417,7 +1417,7 @@ ecore_list_node_new()
* @return @c TRUE.
* @ingroup Ecore_Data_List_Node_Group
*/
EAPI int
EAPI int
ecore_list_node_destroy(Ecore_List_Node *node, Ecore_Free_Cb free_func)
{
CHECK_PARAM_POINTER_RETURN("node", node, FALSE);
@ -1466,7 +1466,7 @@ ecore_dlist_new()
* @return @c TRUE if successful, @c FALSE if an error occurs.
* @ingroup Ecore_Data_DList_Creation_Group
*/
EAPI int
EAPI int
ecore_dlist_init(Ecore_DList *list)
{
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
@ -1481,7 +1481,7 @@ ecore_dlist_init(Ecore_DList *list)
* @param list The doubly linked list to be freed.
* @ingroup Ecore_Data_DList_Creation_Group
*/
EAPI void
EAPI void
ecore_dlist_destroy(Ecore_DList *list)
{
void *data;
@ -1505,7 +1505,7 @@ ecore_dlist_destroy(Ecore_DList *list)
* @return @c TRUE on success, @c FALSE on failure.
* @ingroup Ecore_Data_DList_Creation_Group
*/
EAPI int
EAPI int
ecore_dlist_free_cb_set(Ecore_DList *list, Ecore_Free_Cb free_func)
{
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
@ -1518,7 +1518,7 @@ ecore_dlist_free_cb_set(Ecore_DList *list, Ecore_Free_Cb free_func)
* @param list The given doubly linked list.
* @return @c TRUE if there are nodes, @c FALSE otherwise.
*/
EAPI int
EAPI int
ecore_dlist_empty_is(Ecore_DList *list)
{
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
@ -1531,7 +1531,7 @@ ecore_dlist_empty_is(Ecore_DList *list)
* @param list The given doubly linked list.
* @return The index of the current node.
*/
EAPI inline int
EAPI inline int
ecore_dlist_index(Ecore_DList *list)
{
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
@ -1552,7 +1552,7 @@ ecore_dlist_index(Ecore_DList *list)
* @return @c TRUE if the data is successfully appended, @c FALSE otherwise.
* @ingroup Ecore_Data_DList_Add_Item_Group
*/
EAPI int
EAPI int
ecore_dlist_append(Ecore_DList *list, void *data)
{
int ret;
@ -1579,7 +1579,7 @@ ecore_dlist_append(Ecore_DList *list, void *data)
* @return @c TRUE if the data is successfully prepended, @c FALSE otherwise.
* @ingroup Ecore_Data_DList_Add_Item_Group
*/
EAPI int
EAPI int
ecore_dlist_prepend(Ecore_DList *list, void *data)
{
int ret;
@ -1606,7 +1606,7 @@ ecore_dlist_prepend(Ecore_DList *list, void *data)
* @return @c TRUE on success, @c FALSE otherwise.
* @ingroup Ecore_Data_DList_Add_Item_Group
*/
EAPI int
EAPI int
ecore_dlist_insert(Ecore_DList *list, void *data)
{
int ret = TRUE;
@ -1649,7 +1649,7 @@ ecore_dlist_insert(Ecore_DList *list, void *data)
* @return @c TRUE if the data is successfully appended, @c FALSE otherwise.
* @ingroup Ecore_Data_DList_Add_Item_Group
*/
EAPI int
EAPI int
ecore_dlist_append_list(Ecore_DList *list, Ecore_DList *append)
{
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
@ -1682,7 +1682,7 @@ ecore_dlist_append_list(Ecore_DList *list, Ecore_DList *append)
* @return @c TRUE if the data is successfully prepended, @c FALSE otherwise.
* @ingroup Ecore_Data_DList_Add_Item_Group
*/
EAPI int
EAPI int
ecore_dlist_prepend_list(Ecore_DList *list, Ecore_DList *prepend)
{
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
@ -1766,7 +1766,7 @@ ecore_dlist_first_remove(Ecore_DList *list)
* @return @c TRUE on success, @c FALSE otherwise.
* @ingroup Ecore_Data_DList_Remove_Item_Group
*/
EAPI int
EAPI int
ecore_dlist_remove_destroy(Ecore_DList *list)
{
void *data;
@ -2013,7 +2013,7 @@ _ecore_dlist_previous(Ecore_DList *list)
*
* @return Returns TRUE on success, FALSE on errors
*/
EAPI int
EAPI int
ecore_dlist_clear(Ecore_DList *list)
{
CHECK_PARAM_POINTER_RETURN("list", list, FALSE);
@ -2039,14 +2039,14 @@ EAPI int
ecore_dlist_sort(Ecore_List *list, Ecore_Compare_Cb compare, char order)
{
CHECK_PARAM_POINTER_RETURN("list", list, 0);
if (list->nodes < 2)
return 1;
if (list->nodes < ECORE_MERGESORT_LIMIT)
return ecore_dlist_mergesort(list, compare, order);
if (!ecore_dlist_heapsort(list, compare, order))
return ecore_dlist_mergesort(list, compare, order);
return 1;
}
@ -2058,7 +2058,7 @@ ecore_dlist_sort(Ecore_List *list, Ecore_Compare_Cb compare, char order)
* ECORE_SORT_MAX
* @return true on success
*
* Mergesort is a stable, in-place sorting algorithm
* Mergesort is a stable, in-place sorting algorithm
*/
EAPI int
ecore_dlist_mergesort(Ecore_DList *list, Ecore_Compare_Cb compare, char order)
@ -2109,14 +2109,14 @@ ecore_dlist_merge(Ecore_DList *list, Ecore_DList *l2, Ecore_Compare_Cb compare,
ecore_dlist_append_list(list, l2);
return;
}
if (order == ECORE_SORT_MIN)
order = 1;
else
order = -1;
list->first = _ecore_dlist_node_merge(list->first, l2->first, compare, order);
if ((order * compare(list->last->data, l2->last->data)) < 0)
list->last = l2->last;
@ -2206,14 +2206,14 @@ _ecore_dlist_node_merge(Ecore_List_Node *first, Ecore_List_Node *second,
}
/* append the rest or set it to NULL */
if (first)
if (first)
{
ECORE_DLIST_NODE(first)->previous = ECORE_DLIST_NODE(l);
l->next = first;
}
else if (second)
{
ECORE_DLIST_NODE(second)->previous = ECORE_DLIST_NODE(l);
ECORE_DLIST_NODE(second)->previous = ECORE_DLIST_NODE(l);
l->next = second;
}
else
@ -2227,7 +2227,7 @@ _ecore_dlist_node_merge(Ecore_List_Node *first, Ecore_List_Node *second,
* @param node: the node to initialize
* @return Returns TRUE on success, FALSE on errors
*/
EAPI int
EAPI int
ecore_dlist_node_init(Ecore_DList_Node *node)
{
int ret;
@ -2270,7 +2270,7 @@ ecore_dlist_node_new()
* @param free_func: the callback function to execute on the data
* @return Returns TRUE on success, FALSE on error
*/
EAPI int
EAPI int
ecore_dlist_node_destroy(Ecore_DList_Node * node, Ecore_Free_Cb free_func)
{
CHECK_PARAM_POINTER_RETURN("node", node, FALSE);

View File

@ -115,7 +115,7 @@ ecore_main_loop_quit(void)
*
* Normally the return value from the @p func is "zero means this handler is
* finished and can be deleted" as is usual for handler callbacks. However,
* if the @p buf_func is supplied, then the return value from the @p func is
* if the @p buf_func is supplied, then the return value from the @p func is
* "non zero means the handler should be called again in a tight loop".
*
* @p buf_func is called during event loop handling to check if data that has
@ -123,8 +123,8 @@ ecore_main_loop_quit(void)
* read. Some systems (notably xlib) handle their own buffering, and would
* otherwise not work with select(). These systems should use a @p buf_func.
* This is a most annoying hack, only ecore_x uses it, so refer to that for
* an example. NOTE - @p func should probably return "one" always if
* @p buf_func is used, to avoid confusion with the other return value
* an example. NOTE - @p func should probably return "one" always if
* @p buf_func is used, to avoid confusion with the other return value
* semantics.
*
* @param fd The file descriptor to watch.

View File

@ -59,8 +59,8 @@ ecore_path_group_add(Ecore_Path_Group *group, const char *path)
CHECK_PARAM_POINTER("path", path);
if (!group->paths)
{
group->paths = ecore_list_new();
{
group->paths = ecore_list_new();
ecore_list_free_cb_set(group->paths, free);
}
@ -206,4 +206,3 @@ ecore_path_group_available_get(Ecore_Path_Group *group)
return avail;
}

View File

@ -232,4 +232,3 @@ ecore_plugin_available_get(Ecore_Path_Group *group)
return avail;
}

View File

@ -11,12 +11,12 @@ static int poller_walking = 0;
static double poll_interval = 0.125;
static double poll_cur_interval = 0.0;
static double last_tick = 0.0;
static Ecore_Poller *pollers[16] =
static Ecore_Poller *pollers[16] =
{
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL
};
static unsigned short poller_counters[16] =
static unsigned short poller_counters[16] =
{
0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0
@ -30,7 +30,7 @@ _ecore_poller_next_tick_eval(void)
{
int i;
double interval;
min_interval = -1;
for (i = 0; i < 15; i++)
{
@ -64,7 +64,7 @@ _ecore_poller_next_tick_eval(void)
else
{
double t;
if (!timer)
timer = ecore_timer_add(interval, _ecore_poller_cb_timer, NULL);
else
@ -76,7 +76,7 @@ _ecore_poller_next_tick_eval(void)
/* delete the timer and reset it to tick off in the new
*