aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/ecore/src/lib/ecore
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2009-12-21 17:32:19 +0000
committerCedric BAIL <cedric.bail@free.fr>2009-12-21 17:32:19 +0000
commitd8e18953501c8bed701d66d0acdd4153b1122206 (patch)
treec75a2f4ce26f4861de6ce956866f8973f2d3a1f0 /legacy/ecore/src/lib/ecore
parent * eet: Update ChangeLog :-) (diff)
downloadefl-d8e18953501c8bed701d66d0acdd4153b1122206.tar.gz
* ecore: Use eina_log.
Patch from Mathieu Taillefumier. SVN revision: 44637
Diffstat (limited to 'legacy/ecore/src/lib/ecore')
-rw-r--r--legacy/ecore/src/lib/ecore/ecore.c42
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_exe.c63
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_glib.c5
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_hash.c6
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_main.c25
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_pipe.c32
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_private.h35
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_signal.c36
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_timer.c2
-rw-r--r--legacy/ecore/src/lib/ecore/ecore_value.c13
10 files changed, 147 insertions, 112 deletions
diff --git a/legacy/ecore/src/lib/ecore/ecore.c b/legacy/ecore/src/lib/ecore/ecore.c
index cd648e650e..ff00ff4a56 100644
--- a/legacy/ecore/src/lib/ecore/ecore.c
+++ b/legacy/ecore/src/lib/ecore/ecore.c
@@ -34,7 +34,7 @@
static const char *_ecore_magic_string_get(Ecore_Magic m);
static int _ecore_init_count = 0;
-
+EAPI int _ecore_log_dom = -1;
int _ecore_fps_debug = 0;
/** OpenBSD does not define CODESET
@@ -79,7 +79,7 @@ ecore_init(void)
/*
if (strcmp(nl_langinfo(CODESET), "UTF-8"))
{
- printf("WARNING: not a utf8 locale!\n");
+ WRN("Not a utf8 locale!");
}
*/
#ifdef HAVE_EVIL
@@ -88,6 +88,11 @@ ecore_init(void)
#endif
if (!eina_init())
goto shutdown_evil;
+ _ecore_log_dom = eina_log_domain_register("Ecore",ECORE_DEFAULT_LOG_COLOR);
+ if (_ecore_log_dom < 0) {
+ EINA_LOG_ERR("Ecore was unable to create a log domain.");
+ goto shutdown_log_dom;
+ }
if (getenv("ECORE_FPS_DEBUG")) _ecore_fps_debug = 1;
if (_ecore_fps_debug) _ecore_fps_debug_init();
_ecore_signal_init();
@@ -98,6 +103,8 @@ ecore_init(void)
return _ecore_init_count;
+ shutdown_log_dom:
+ eina_shutdown();
shutdown_evil:
#ifdef HAVE_EVIL
evil_shutdown();
@@ -134,6 +141,8 @@ ecore_shutdown(void)
_ecore_event_shutdown();
_ecore_main_shutdown();
_ecore_signal_shutdown();
+ eina_log_domain_unregister(_ecore_log_dom);
+ _ecore_log_dom = -1;
eina_shutdown();
#ifdef HAVE_EVIL
evil_shutdown();
@@ -145,25 +154,22 @@ ecore_shutdown(void)
EAPI void
_ecore_magic_fail(const void *d, Ecore_Magic m, Ecore_Magic req_m, const char *fname)
{
- fprintf(stderr,
- "\n"
- "*** ECORE ERROR: Ecore Magic Check Failed!!!\n"
- "*** IN FUNCTION: %s()\n", fname);
+ ERR("\n"
+ "*** ECORE ERROR: Ecore Magic Check Failed!!!\n"
+ "*** IN FUNCTION: %s()", fname);
if (!d)
- fprintf(stderr, " Input handle pointer is NULL!\n");
+ ERR(" Input handle pointer is NULL!");
else if (m == ECORE_MAGIC_NONE)
- fprintf(stderr, " Input handle has already been freed!\n");
+ ERR(" Input handle has already been freed!");
else if (m != req_m)
- fprintf(stderr, " Input handle is wrong type\n"
- " Expected: %08x - %s\n"
- " Supplied: %08x - %s\n",
- (unsigned int)req_m, _ecore_magic_string_get(req_m),
- (unsigned int)m, _ecore_magic_string_get(m));
- fprintf(stderr,
- "*** NAUGHTY PROGRAMMER!!!\n"
- "*** SPANK SPANK SPANK!!!\n"
- "*** Now go fix your code. Tut tut tut!\n"
- "\n");
+ ERR(" Input handle is wrong type\n"
+ " Expected: %08x - %s\n"
+ " Supplied: %08x - %s",
+ (unsigned int)req_m, _ecore_magic_string_get(req_m),
+ (unsigned int)m, _ecore_magic_string_get(m));
+ ERR("*** NAUGHTY PROGRAMMER!!!\n"
+ "*** SPANK SPANK SPANK!!!\n"
+ "*** Now go fix your code. Tut tut tut!");
if (getenv("ECORE_ERROR_ABORT")) abort();
}
diff --git a/legacy/ecore/src/lib/ecore/ecore_exe.c b/legacy/ecore/src/lib/ecore/ecore_exe.c
index cc29e4c2fe..8c0f07ddeb 100644
--- a/legacy/ecore/src/lib/ecore/ecore_exe.c
+++ b/legacy/ecore/src/lib/ecore/ecore_exe.c
@@ -160,7 +160,7 @@ _ecore_exe_check_errno(int result, const char *file, int line)
case EAGAIN:
case EINTR:
{ /* Not now, try later. */
- fprintf(stderr, "*** Must try again in %s @%u.\n", file, line);
+ ERR("*** Must try again in %s @%u.", file, line);
result = -1;
break;
}
@@ -169,15 +169,15 @@ _ecore_exe_check_errno(int result, const char *file, int line)
case ENFILE:
case ENOLCK:
{ /* Low on resources. */
- fprintf(stderr, "*** Low on resources in %s @%u.\n", file,
- line);
+ ERR("*** Low on resources in %s @%u.", file,
+ line);
result = 0;
break;
}
case EIO:
{ /* I/O error. */
- fprintf(stderr, "*** I/O error in %s @%u.\n", file, line);
+ ERR("*** I/O error in %s @%u.", file, line);
result = 0;
break;
}
@@ -191,24 +191,22 @@ _ecore_exe_check_errno(int result, const char *file, int line)
case EPERM:
case EBUSY:
{ /* Programmer fucked up. */
- fprintf(stderr,
- "*** NAUGHTY PROGRAMMER!!!\n"
- "*** SPANK SPANK SPANK!!!\n"
- "*** Now go fix your code in %s @%u. Tut tut tut!\n"
- "\n", file, line);
+ ERR("*** NAUGHTY PROGRAMMER!!!\n"
+ "*** SPANK SPANK SPANK!!!\n"
+ "*** Now go fix your code in %s @%u. Tut tut tut!",
+ file, line);
result = 0;
break;
}
default:
{ /* Unsupported errno code, please add this one. */
- fprintf(stderr,
- "*** NAUGHTY PROGRAMMER!!!\n"
- "*** SPANK SPANK SPANK!!!\n"
- "*** Unsupported errno code %d, please add this one.\n"
- "*** Now go fix your code in %s @%u, from %s @%u. Tut tut tut!\n"
- "\n", saved_errno, __FILE__, __LINE__, file, line);
- result = 0;
+ ERR("*** NAUGHTY PROGRAMMER!!!\n"
+ "*** SPANK SPANK SPANK!!!\n"
+ "*** Unsupported errno code %d, please add this one.\n"
+ "*** Now go fix your code in %s @%u, from %s @%u. Tut tut tut!",
+ saved_errno, __FILE__, __LINE__, file, line);
+ result = 0;
break;
}
}
@@ -400,7 +398,7 @@ ecore_exe_pipe_run(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data)
if (pid == -1)
{
- fprintf(stderr, "Failed to fork process\n");
+ ERR("Failed to fork process");
pid = 0;
}
else if (pid == 0) /* child */
@@ -489,8 +487,8 @@ ecore_exe_pipe_run(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data)
if (vfork_exec_errno != 0)
{
n = vfork_exec_errno;
- fprintf(stderr, "Could not start \"%s\"\n",
- exe_cmd);
+ ERR("Could not start \"%s\"",
+ exe_cmd);
pid = 0;
}
break;
@@ -604,7 +602,7 @@ ecore_exe_pipe_run(const char *exe_cmd, Ecore_Exe_Flags flags, const void *data)
if (e) /* Send the event. */
ecore_event_add(ECORE_EXE_EVENT_ADD, e,
_ecore_exe_event_add_free, NULL);
- /* printf("Running as %d for %s.\n", exe->pid, exe->cmd); */
+ /* INF("Running as %d for %s.\n", exe->pid, exe->cmd); */
}
errno = n;
@@ -1115,7 +1113,7 @@ ecore_exe_terminate(Ecore_Exe *exe)
return;
}
_ecore_exe_dead_attach(exe);
- printf("Sending TERM signal to %s (%d).\n", exe->cmd, exe->pid);
+ INF("Sending TERM signal to %s (%d).", exe->cmd, exe->pid);
kill(exe->pid, SIGTERM);
}
@@ -1145,7 +1143,7 @@ ecore_exe_kill(Ecore_Exe *exe)
ecore_timer_add(10.0, _ecore_exe_make_sure_its_really_dead, dead);
}
- printf("Sending KILL signal to %s (%d).\n", exe->cmd, exe->pid);
+ INF("Sending KILL signal to %s (%d).", exe->cmd, exe->pid);
kill(exe->pid, SIGKILL);
}
@@ -1236,11 +1234,11 @@ _ecore_exe_make_sure_its_dead(void *data)
if ((exe = _ecore_exe_is_it_alive(dead->pid)) != NULL)
{
if (dead->cmd)
- printf("Sending KILL signal to alledgedly dead %s (%d).\n",
+ INF("Sending KILL signal to alledgedly dead %s (%d).",
dead->cmd, dead->pid);
else
- printf("Sending KILL signal to alledgedly dead PID %d.\n",
- dead->pid);
+ INF("Sending KILL signal to alledgedly dead PID %d.",
+ dead->pid);
exe->doomsday_clock =
ecore_timer_add(10.0, _ecore_exe_make_sure_its_really_dead,
dead);
@@ -1267,12 +1265,11 @@ _ecore_exe_make_sure_its_really_dead(void *data)
if ((exe = _ecore_exe_is_it_alive(dead->pid)) != NULL)
{
- printf
- ("RUN! The zombie wants to eat your brains! And your CPU!\n");
+ ERR("RUN! The zombie wants to eat your brains! And your CPU!");
if (dead->cmd)
- printf("%s (%d) is not really dead.\n", dead->cmd, dead->pid);
+ INF("%s (%d) is not really dead.", dead->cmd, dead->pid);
else
- printf("PID %d is not really dead.\n", dead->pid);
+ INF("PID %d is not really dead.", dead->pid);
exe->doomsday_clock = NULL;
}
IF_FREE(dead->cmd);
@@ -1508,15 +1505,13 @@ _ecore_exe_data_generic_handler(void *data, Ecore_Fd_Handler *fd_handler,
if (flags & ECORE_EXE_PIPE_READ)
{
if (exe->read_data_size)
- printf
- ("There are %d bytes left unsent from the dead exe %s.\n",
+ INF("There are %d bytes left unsent from the dead exe %s.",
exe->read_data_size, exe->cmd);
}
else
{
if (exe->error_data_size)
- printf
- ("There are %d bytes left unsent from the dead exe %s.\n",
+ INF("There are %d bytes left unsent from the dead exe %s.",
exe->error_data_size, exe->cmd);
}
/* Thought about this a bit. If the exe has actually
@@ -1569,7 +1564,7 @@ _ecore_exe_data_write_handler(void *data, Ecore_Fd_Handler *fd_handler __UNUSED_
int ok = 0;
int result;
- printf("Closing stdin for %s\n", exe->cmd);
+ INF("Closing stdin for %s", exe->cmd);
/* if (exe->child_fd_write != -1) E_NO_ERRNO(result, fsync(exe->child_fd_write), ok); This a) doesn't work, and b) isn't needed. */
IF_FN_DEL(ecore_main_fd_handler_del, exe->write_fd_handler);
if (exe->child_fd_write != -1)
diff --git a/legacy/ecore/src/lib/ecore/ecore_glib.c b/legacy/ecore/src/lib/ecore/ecore_glib.c
index f2794213d4..c635a82c32 100644
--- a/legacy/ecore/src/lib/ecore/ecore_glib.c
+++ b/legacy/ecore/src/lib/ecore/ecore_glib.c
@@ -12,6 +12,7 @@
#ifdef HAVE_GLIB
#include <glib.h>
+#include "ecore_private.h"
static Eina_Bool _ecore_glib_active = EINA_FALSE;
static int (*_ecore_glib_select_original)(int, fd_set*, fd_set*, fd_set*, struct timeval *);
@@ -28,8 +29,8 @@ _ecore_glib_fds_resize(size_t size)
void *tmp = realloc(_ecore_glib_fds, sizeof(GPollFD) * size);
if (!tmp)
{
- fprintf(stderr, "ERROR: Could not realloc from %zu to %zu buckets.\n",
- _ecore_glib_fds_size, size);
+ ERR("Could not realloc from %zu to %zu buckets.",
+ _ecore_glib_fds_size, size);
return EINA_FALSE;
}
diff --git a/legacy/ecore/src/lib/ecore/ecore_hash.c b/legacy/ecore/src/lib/ecore/ecore_hash.c
index 90e0cbace7..4f1050f7d8 100644
--- a/legacy/ecore/src/lib/ecore/ecore_hash.c
+++ b/legacy/ecore/src/lib/ecore/ecore_hash.c
@@ -366,10 +366,10 @@ ecore_hash_dump_graph(Ecore_Hash *hash)
Ecore_Hash_Node *node;
for (node = hash->buckets[i]; node; node = node->next)
n++;
- printf("%d\t%u\n", i, n);
+ INF("%d\t%u", i, n);
}
else
- printf("%d\t0\n", i);
+ INF("%d\t0", i);
}
/**
@@ -395,7 +395,7 @@ ecore_hash_dump_stats(Ecore_Hash *hash)
}
}
variance = (sum_n_2 - ((sum_n * sum_n) / (double)i)) / (double)i;
- printf("Average length: %f\n\tvariance^2: %f\n", (sum_n / (double)i),
+ INF("Average length: %f\n\tvariance^2: %f", (sum_n / (double)i),
variance);
}
diff --git a/legacy/ecore/src/lib/ecore/ecore_main.c b/legacy/ecore/src/lib/ecore/ecore_main.c
index 502b9f07de..0a3205a4af 100644
--- a/legacy/ecore/src/lib/ecore/ecore_main.c
+++ b/legacy/ecore/src/lib/ecore/ecore_main.c
@@ -379,10 +379,9 @@ _ecore_main_shutdown(void)
{
if (in_main_loop)
{
- fprintf(stderr,
- "\n"
- "*** ECORE WARINING: Calling ecore_shutdown() while still in the main loop.\n"
- "*** Program may crash or behave strangely now.\n");
+ ERR("\n"
+ "*** ECORE WARINING: Calling ecore_shutdown() while still in the main loop.\n"
+ "*** Program may crash or behave strangely now.");
return;
}
while (fd_handlers)
@@ -510,7 +509,7 @@ _ecore_main_select(double timeout)
static void
_ecore_main_fd_handlers_bads_rem(void)
{
- fprintf(stderr, "Removing bad fds\n");
+ ERR("Removing bad fds");
Ecore_Fd_Handler *fdh;
Eina_Inlist *l;
@@ -522,20 +521,20 @@ _ecore_main_fd_handlers_bads_rem(void)
if ((fcntl(fdh->fd, F_GETFD) < 0) && (errno == EBADF))
{
- fprintf(stderr, "Found bad fd at index %d\n", fdh->fd);
+ ERR("Found bad fd at index %d", fdh->fd);
if (fdh->flags & ECORE_FD_ERROR)
{
- fprintf(stderr, "Fd set for error! calling user\n");
+ ERR("Fd set for error! calling user");
if (!fdh->func(fdh->data, fdh))
{
- fprintf(stderr, "Fd function err returned 0, remove it\n");
+ ERR("Fd function err returned 0, remove it");
fdh->delete_me = 1;
fd_handlers_delete_me = 1;
}
}
else
{
- fprintf(stderr, "Problematic fd found at %d! setting it for delete\n", fdh->fd);
+ ERR("Problematic fd found at %d! setting it for delete", fdh->fd);
fdh->delete_me = 1;
fd_handlers_delete_me = 1;
}
@@ -560,7 +559,7 @@ _ecore_main_fd_handlers_cleanup(void)
l = l->next;
if (fdh->delete_me)
{
-// fprintf(stderr, "Removing fd %d\n", fdh->fd);
+// ERR("Removing fd %d", fdh->fd);
fd_handlers = (Ecore_Fd_Handler *) eina_inlist_remove(EINA_INLIST_GET(fd_handlers),
EINA_INLIST_GET(fdh));
ECORE_MAGIC_SET(fdh, ECORE_MAGIC_NONE);
@@ -878,13 +877,13 @@ _ecore_main_win32_select(int nfds, fd_set *readfds, fd_set *writefds,
char *msg;
msg = evil_last_error_get();
- printf (" * %s\n", msg);
+ ERR(" * %s\n", msg);
free(msg);
res = -1;
}
else if (result == WAIT_TIMEOUT)
{
- printf ("time out\n");
+ ERR("time out\n");
res = 0;
}
else if (result == (WAIT_OBJECT_0 + objects_nbr))
@@ -928,7 +927,7 @@ _ecore_main_win32_select(int nfds, fd_set *readfds, fd_set *writefds,
}
else
{
- fprintf(stderr, "unknown result...\n");
+ ERR(stderr, "unknown result...\n");
res = -1;
}
diff --git a/legacy/ecore/src/lib/ecore/ecore_pipe.c b/legacy/ecore/src/lib/ecore/ecore_pipe.c
index 149d6f8ce2..6c52731856 100644
--- a/legacy/ecore/src/lib/ecore/ecore_pipe.c
+++ b/legacy/ecore/src/lib/ecore/ecore_pipe.c
@@ -415,8 +415,8 @@ ecore_pipe_write(Ecore_Pipe *p, const void *buffer, unsigned int nbytes)
else if (ret > 0)
{
/* XXX What should we do here? */
- fprintf(stderr, "The length of the data was not written complete"
- " to the pipe\n");
+ ERR("The length of the data was not written complete"
+ " to the pipe");
return FALSE;
}
else if (ret == PIPE_FD_ERROR && errno == EPIPE)
@@ -430,9 +430,9 @@ ecore_pipe_write(Ecore_Pipe *p, const void *buffer, unsigned int nbytes)
;
else
{
- fprintf(stderr, "An unhandled error (ret: %d errno: %d)"
- "occured while writing to the pipe the length\n",
- ret, errno);
+ ERR("An unhandled error (ret: %d errno: %d)"
+ "occured while writing to the pipe the length",
+ ret, errno);
}
}
while (retry--);
@@ -464,9 +464,9 @@ ecore_pipe_write(Ecore_Pipe *p, const void *buffer, unsigned int nbytes)
;
else
{
- fprintf(stderr, "An unhandled error (ret: %d errno: %d)"
- "occured while writing to the pipe the length\n",
- ret, errno);
+ ERR("An unhandled error (ret: %d errno: %d)"
+ "occured while writing to the pipe the length",
+ ret, errno);
}
}
while (retry--);
@@ -503,8 +503,8 @@ _ecore_pipe_read(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
else if (ret > 0)
{
/* XXX What should we do here? */
- fprintf(stderr, "Only read %d bytes from the pipe, although"
- " we need to read %d bytes.\n", ret, sizeof(p->len));
+ ERR("Only read %d bytes from the pipe, although"
+ " we need to read %d bytes.", ret, sizeof(p->len));
}
else if (ret == 0)
{
@@ -519,9 +519,9 @@ _ecore_pipe_read(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
return ECORE_CALLBACK_RENEW;
else
{
- fprintf(stderr, "An unhandled error (ret: %d errno: %d)"
- "occured while reading from the pipe the length\n",
- ret, errno);
+ ERR("An unhandled error (ret: %d errno: %d)"
+ "occured while reading from the pipe the length",
+ ret, errno);
return ECORE_CALLBACK_RENEW;
}
#else
@@ -575,9 +575,9 @@ _ecore_pipe_read(void *data, Ecore_Fd_Handler *fd_handler __UNUSED__)
return ECORE_CALLBACK_RENEW;
else
{
- fprintf(stderr, "An unhandled error (ret: %d errno: %d)"
- "occured while reading from the pipe the data\n",
- ret, errno);
+ ERR("An unhandled error (ret: %d errno: %d)"
+ "occured while reading from the pipe the data",
+ ret, errno);
return ECORE_CALLBACK_RENEW;
}
#else
diff --git a/legacy/ecore/src/lib/ecore/ecore_private.h b/legacy/ecore/src/lib/ecore/ecore_private.h
index b1c7f1fbe1..ca9c5b36e0 100644
--- a/legacy/ecore/src/lib/ecore/ecore_private.h
+++ b/legacy/ecore/src/lib/ecore/ecore_private.h
@@ -23,6 +23,41 @@
# undef EAPI
#endif
+extern int _ecore_log_dom ;
+#ifdef _ECORE_DEFAULT_LOG_DOM
+# undef _ECORE_DEFAULT_LOG_DOM
+#endif
+#define _ECORE_DEFAULT_LOG_DOM _ecore_log_dom
+
+#ifdef ECORE_DEFAULT_LOG_COLOR
+# undef ECORE_DEFAULT_LOG_COLOR
+#endif
+#define ECORE_DEFAULT_LOG_COLOR EINA_COLOR_BLUE
+
+#ifdef ERR
+# undef ERR
+#endif
+#define ERR(...) EINA_LOG_DOM_ERR(_ECORE_DEFAULT_LOG_DOM, __VA_ARGS__)
+
+#ifdef DBG
+# undef DBG
+#endif
+#define DBG(...) EINA_LOG_DOM_DBG(_ECORE_DEFAULT_LOG_DOM, __VA_ARGS__)
+
+#ifdef INF
+# undef INF
+#endif
+#define INF(...) EINA_LOG_DOM_INFO(_ECORE_DEFAULT_LOG_DOM, __VA_ARGS__)
+
+#ifdef WRN
+# undef WRN
+#endif
+#define WRN(...) EINA_LOG_DOM_WARN(_ECORE_DEFAULT_LOG_DOM, __VA_ARGS__)
+
+#ifdef CRIT
+# undef CRIT
+#endif
+#define CRIT(...) EINA_LOG_DOM_CRIT(_ECORE_DEFAULT_LOG_DOM, __VA_ARGS__)
#ifdef _WIN32
# ifdef EFL_ECORE_BUILD
# ifdef DLL_EXPORT
diff --git a/legacy/ecore/src/lib/ecore/ecore_signal.c b/legacy/ecore/src/lib/ecore/ecore_signal.c
index baa572c335..89a38ed299 100644
--- a/legacy/ecore/src/lib/ecore/ecore_signal.c
+++ b/legacy/ecore/src/lib/ecore/ecore_signal.c
@@ -199,8 +199,8 @@ _ecore_signal_call(void)
#endif
sigprocmask(SIG_BLOCK, &newset, &oldset);
if (sigchld_count > MAXSIGQ)
- printf("ECORE WARNING. %i SIGCHLD in queue. max queue size %i. losing "
- "siginfo for extra signals.\n", sigchld_count, MAXSIGQ);
+ WRN("%i SIGCHLD in queue. max queue size %i. losing "
+ "siginfo for extra signals.", sigchld_count, MAXSIGQ);
for (n = 0; n < sigchld_count; n++)
{
pid_t pid;
@@ -271,8 +271,8 @@ _ecore_signal_call(void)
sigchld_count = 0;
if (sigusr1_count > MAXSIGQ)
- printf("ECORE WARNING. %i SIGUSR1 in queue. max queue size %i. losing "
- "siginfo for extra signals.\n", sigusr1_count, MAXSIGQ);
+ WRN("%i SIGUSR1 in queue. max queue size %i. losing "
+ "siginfo for extra signals.", sigusr1_count, MAXSIGQ);
for (n = 0; n < sigusr1_count; n++)
{
Ecore_Event_Signal_User *e;
@@ -292,8 +292,8 @@ _ecore_signal_call(void)
sigusr1_count = 0;
if (sigusr2_count > MAXSIGQ)
- printf("ECORE WARNING. %i SIGUSR2 in queue. max queue size %i. losing "
- "siginfo for extra signals.\n", sigusr2_count, MAXSIGQ);
+ WRN("%i SIGUSR2 in queue. max queue size %i. losing "
+ "siginfo for extra signals.", sigusr2_count, MAXSIGQ);
for (n = 0; n < sigusr2_count; n++)
{
Ecore_Event_Signal_User *e;
@@ -313,8 +313,8 @@ _ecore_signal_call(void)
sigusr2_count = 0;
if (sighup_count > MAXSIGQ)
- printf("ECORE WARNING. %i SIGHUP in queue. max queue size %i. losing "
- "siginfo for extra signals.\n", sighup_count, MAXSIGQ);
+ WRN("%i SIGHUP in queue. max queue size %i. losing "
+ "siginfo for extra signals.", sighup_count, MAXSIGQ);
for (n = 0; n < sighup_count; n++)
{
Ecore_Event_Signal_Hup *e;
@@ -332,8 +332,8 @@ _ecore_signal_call(void)
sighup_count = 0;
if (sigquit_count > MAXSIGQ)
- printf("ECORE WARNING. %i SIGQUIT in queue. max queue size %i. losing "
- "siginfo for extra signals.\n", sigquit_count, MAXSIGQ);
+ WRN("%i SIGQUIT in queue. max queue size %i. losing "
+ "siginfo for extra signals.", sigquit_count, MAXSIGQ);
for (n = 0; n < sigquit_count; n++)
{
Ecore_Event_Signal_Exit *e;
@@ -353,8 +353,8 @@ _ecore_signal_call(void)
sigquit_count = 0;
if (sigint_count > MAXSIGQ)
- printf("ECORE WARNING. %i SIGINT in queue. max queue size %i. losing "
- "siginfo for extra signals.\n", sigint_count, MAXSIGQ);
+ WRN("%i SIGINT in queue. max queue size %i. losing "
+ "siginfo for extra signals.", sigint_count, MAXSIGQ);
for (n = 0; n < sigint_count; n++)
{
Ecore_Event_Signal_Exit *e;
@@ -374,8 +374,8 @@ _ecore_signal_call(void)
sigint_count = 0;
if (sigterm_count > MAXSIGQ)
- printf("ECORE WARNING. %i SIGTERM in queue. max queue size %i. losing "
- "siginfo for extra signals.\n", sigterm_count, MAXSIGQ);
+ WRN("%i SIGTERM in queue. max queue size %i. losing "
+ "siginfo for extra signals.", sigterm_count, MAXSIGQ);
for (n = 0; n < sigterm_count; n++)
{
Ecore_Event_Signal_Exit *e;
@@ -396,8 +396,8 @@ _ecore_signal_call(void)
#ifdef SIGPWR
if (sigpwr_count > MAXSIGQ)
- printf("ECORE WARNING. %i SIGPWR in queue. max queue size %i. losing "
- "siginfo for extra signals.\n", sigpwr_count, MAXSIGQ);
+ WRN("%i SIGPWR in queue. max queue size %i. losing "
+ "siginfo for extra signals.", sigpwr_count, MAXSIGQ);
for (n = 0; n < sigpwr_count; n++)
{
Ecore_Event_Signal_Power *e;
@@ -419,8 +419,8 @@ _ecore_signal_call(void)
for (i = 0; i < num; i++)
{
if (sigrt_count[i] > MAXSIGQ)
- printf("ECORE WARNING. %i SIGRT%i in queue. max queue size %i. losing "
- "siginfo for extra signals.\n", i + 1, sigrt_count[i], MAXSIGQ);
+ WRN("%i SIGRT%i in queue. max queue size %i. losing "
+ "siginfo for extra signals.", i + 1, sigrt_count[i], MAXSIGQ);
for (n = 0; n < sigrt_count[i]; n++)
{
Ecore_Event_Signal_Realtime *e;
diff --git a/legacy/ecore/src/lib/ecore/ecore_timer.c b/legacy/ecore/src/lib/ecore/ecore_timer.c
index 7a884ac3a4..3a5d074b3f 100644
--- a/legacy/ecore/src/lib/ecore/ecore_timer.c
+++ b/legacy/ecore/src/lib/ecore/ecore_timer.c
@@ -68,7 +68,7 @@ ecore_timer_precision_set(double value)
{
if (value < 0.0)
{
- fprintf(stderr, "ERROR: precision %f less than zero, ignored\n", value);
+ ERR("Precision %f less than zero, ignored", value);
return;
}
precision = value;
diff --git a/legacy/ecore/src/lib/ecore/ecore_value.c b/legacy/ecore/src/lib/ecore/ecore_value.c
index ea098f683a..d1392c7ad1 100644
--- a/legacy/ecore/src/lib/ecore/ecore_value.c
+++ b/legacy/ecore/src/lib/ecore/ecore_value.c
@@ -53,13 +53,12 @@ EAPI const unsigned int ecore_prime_table[] =
EAPI void
ecore_print_warning(const char *function, const char *sparam)
{
- fprintf(stderr, "***** Developer Warning ***** :\n"
- "\tThis program is calling:\n\n"
- "\t%s();\n\n"
- "\tWith the parameter:\n\n"
- "\t%s\n\n"
- "\tbeing NULL. Please fix your program.\n", function, sparam);
- fflush(stderr);
+ WRN("***** Developer Warning ***** :\n"
+ "\tThis program is calling:\n\n"
+ "\t%s();\n\n"
+ "\tWith the parameter:\n\n"
+ "\t%s\n\n"
+ "\tbeing NULL. Please fix your program.", function, sparam);
if (getenv("ECORE_ERROR_ABORT")) abort();
}