aboutsummaryrefslogtreecommitdiff
path: root/src/espik.c
diff options
context:
space:
mode:
authorBertrand Jacquin (Beber) <beber@setibzh.com>2006-01-23 02:39:49 +0100
committerBertrand Jacquin (Beber) <beber@setibzh.com>2006-01-23 02:39:49 +0100
commitf9aeaea57306b88e8a7507a3873f0313dec1a061 (patch)
treee24d2b8a30e2ec07d9f0a15c46b84d6a021f79a8 /src/espik.c
parentdel unused files and code (diff)
downloadespik-f9aeaea57306b88e8a7507a3873f0313dec1a061.tar.xz
More back to home
Diffstat (limited to 'src/espik.c')
-rw-r--r--src/espik.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/espik.c b/src/espik.c
index f4fce5a..b851fb0 100644
--- a/src/espik.c
+++ b/src/espik.c
@@ -39,7 +39,14 @@ static void espik_destroy_ptr(void *ptr)
void espik_free (void *ptr)
{
+ espik_enter();
ecore_list_append (ptr_list, ptr);
+ espik_leave();
+}
+
+void espik_shutdown()
+{
+ ecore_main_loop_quit();
}
/* Use to replace EOL ('\n') with NULL ('\0') */
@@ -64,6 +71,7 @@ int del_backslash (char *msg)
int main (int argc, char **argv)
{
Ecore_Fd_Handler *fd_kb;
+ __indent_level = 0;
espik_enter();
printf ("Welcome to %s %s\n", APPS_NAME, ESPIK_VERSION);
@@ -102,7 +110,7 @@ int main (int argc, char **argv)
/* Handler Keyboard */
fd_kb = ecore_main_fd_handler_add (STDIN_FILENO, ECORE_FD_READ, kb_get,
NULL, NULL, NULL);
- espik_free(kb_get);
+ espik_free (fd_kb);
if (!fd_kb)
{
printf ("Cannot ecore_main_fd_handler_add\n");
@@ -113,8 +121,7 @@ int main (int argc, char **argv)
ecore_main_loop_begin ();
- ecore_main_fd_handler_del (fd_kb);
-
+ espik_shutdown();
espik_debug_print ("end");
espik_config_shutdown (a_infos);