aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilippe Caseiro <puppetmaster.e17@gmail.com>2006-01-29 21:02:50 +0100
committerPuppet_Master <puppetmaster.e17@gmail.com>2006-01-29 21:02:50 +0100
commitd6e8125bafff0c44f79037bfc122bddaa71c3722 (patch)
treea69fac0a3e19d9cc3efff57867f256741f78ff73
parentupdating todo list (diff)
downloadensorcel-d6e8125bafff0c44f79037bfc122bddaa71c3722.tar.gz
Indent cleaning
update TODO list with the bug of segv .... moaf good night
-rw-r--r--TODO3
-rw-r--r--src/cmd_launch.c18
-rw-r--r--src/ensorcel_about.c1
-rw-r--r--src/ensorcel_info_get.c9
-rw-r--r--src/ensorcel_info_show.c12
-rw-r--r--src/ensorcel_launch.c49
-rw-r--r--src/ensorcel_string_funcs.c6
-rw-r--r--src/ensorcel_tree_create.c4
8 files changed, 48 insertions, 54 deletions
diff --git a/TODO b/TODO
index 40ed621..b140824 100644
--- a/TODO
+++ b/TODO
@@ -24,3 +24,6 @@ implémenter l'objet pour editer les fichiers textes
== IMPORTANT ==
coder ensorcel_error_message ...
+
+== IMPORTANT ==
+Résoudre le bug du segv ou bout de 3 selections ... de spell
diff --git a/src/cmd_launch.c b/src/cmd_launch.c
index c0a3fe2..4912ace 100644
--- a/src/cmd_launch.c
+++ b/src/cmd_launch.c
@@ -53,20 +53,20 @@ static int ensorcel_exe_data (void *data, int type, void *event)
static int ensorcel_exe_exit (void *data, int type, void *event)
{
Ecore_Event_Signal_Exit *e;
-
+
Ensorcel_Exe_Strings *strings;
strings = (Ensorcel_Exe_Strings *) data;
- e = (Ecore_Event_Signal_Exit *)event;
+ e = (Ecore_Event_Signal_Exit *) event;
strings->tb_exe = ensorcel_format_string (strings->str_exe);
- /*
- printf("This callback handles event type: %i\n", ECORE_EVENT_SIGNAL_EXIT);
- printf("Event type recieved: %i\n", ev_type);
- if (e->interrupt) printf("Exit: interrupt\n");
- if (e->quit) printf("Exit: quit\n");
- if (e->terminate) printf("Exit: terminate\n");
- */
+ /*
+ * printf("This callback handles event type: %i\n", ECORE_EVENT_SIGNAL_EXIT);
+ * printf("Event type recieved: %i\n", ev_type);
+ * if (e->interrupt) printf("Exit: interrupt\n");
+ * if (e->quit) printf("Exit: quit\n");
+ * if (e->terminate) printf("Exit: terminate\n");
+ */
printf ("\n\necore_main_loop_quit\n\n");
ecore_main_loop_quit ();
if (strings->str_exe)
diff --git a/src/ensorcel_about.c b/src/ensorcel_about.c
index a99635b..2c32e0e 100644
--- a/src/ensorcel_about.c
+++ b/src/ensorcel_about.c
@@ -56,4 +56,5 @@ void ensorcel_about_window (void *data _UNUSED_)
etk_container_add (ETK_CONTAINER (win), fm_main);
etk_widget_show_all (win);
+
}
diff --git a/src/ensorcel_info_get.c b/src/ensorcel_info_get.c
index ac12013..d496997 100644
--- a/src/ensorcel_info_get.c
+++ b/src/ensorcel_info_get.c
@@ -175,7 +175,7 @@ char *ensorcel_spell_status_get (Ecore_List * list)
return ("Not Installed");
}
-char *ensorcel_spell_installed_version_get (Ecore_List * list)
+char *ensorcel_spell_installed_version_get (Ecore_List * list)
{
char *string;
@@ -196,13 +196,10 @@ char *ensorcel_spell_installed_version_get (Ecore_List * list)
return ("-");
}
-void ensorcel_spell_description_put (char *name, Etk_Label *label)
+void ensorcel_spell_description_put (char *name, Etk_Label * label)
{
char cmd[80];
sprintf (cmd, "gaze -q what %s", name);
-
- printf("DEBUG : LANCEMENT DE %s\n\n\n",cmd);
-
- ensorcel_cmd_run(cmd, ETK_LABEL(label));
+ ensorcel_cmd_run (cmd, ETK_LABEL (label));
}
diff --git a/src/ensorcel_info_show.c b/src/ensorcel_info_show.c
index 4f92467..c30b782 100644
--- a/src/ensorcel_info_show.c
+++ b/src/ensorcel_info_show.c
@@ -11,7 +11,6 @@ void ensorcel_details_show (char *name, char *ver, char *last, char *status,
if ((strcmp ("---", ver) != 0) && (strcmp ("--", ver) != 0))
{
char l_name[128];
- //char *desc;
int len;
len = strlen (name) + 9;
@@ -29,15 +28,8 @@ void ensorcel_details_show (char *name, char *ver, char *last, char *status,
etk_widget_size_request_set (widget[7], 500, 400);
- printf("_DEBUG_ J'appel ensorcel_spell_description_get (%s)\n",name);
- label = etk_label_new ("Loading label");
- printf("_DEBUG_ :: desc = ensorcel_spell_description_get (%s , %p)\n",name, (Etk_Label *)label);
- //desc = ensorcel_spell_description_put (name, (Etk_Label *)label);
- ensorcel_spell_description_put (name, (Etk_Label *)label);
- //printf("_DEBUG_ ensorcel_spell_description_get ended ...:\n|%s|\n",desc);
-
- //if (desc)
- // free (desc);
+ label = etk_label_new (_("Loading Description"));
+ ensorcel_spell_description_put (name, (Etk_Label *) label);
etk_container_add (ETK_CONTAINER (widget[7]), label);
diff --git a/src/ensorcel_launch.c b/src/ensorcel_launch.c
index 9ce4eea..d4d1f92 100644
--- a/src/ensorcel_launch.c
+++ b/src/ensorcel_launch.c
@@ -41,61 +41,62 @@ static int ensorcel_exe_data (void *data, int type, void *event)
static int ensorcel_exe_exit (void *data, int type, void *event)
{
Ecore_Event_Signal_Exit *e;
-
+
Ensorcel_Exe_Strings *strings;
strings = (Ensorcel_Exe_Strings *) data;
- e = (Ecore_Event_Signal_Exit *)event;
+ e = (Ecore_Event_Signal_Exit *) event;
strings->tb_exe = ensorcel_format_string (strings->str_exe);
- etk_label_set(strings->label, strings->tb_exe);
+ etk_label_set (strings->label, strings->tb_exe);
if (strings->str_exe)
free (strings->str_exe);
if (strings->tb_exe)
{
- printf("Free strings->tb_exe\n");
- free(strings->tb_exe);
+ printf ("Free strings->tb_exe\n");
+ free (strings->tb_exe);
}
if (strings)
{
- printf("Free strings\n");
- free(strings);
+ printf ("Free strings\n");
+ free (strings);
}
-
+
return 1;
}
-int ensorcel_exe_pipe_run (const char *exe_cmd, Ensorcel_Exe_Strings *strings)
+int ensorcel_exe_pipe_run (const char *exe_cmd, Ensorcel_Exe_Strings * strings)
{
Ecore_Exe *exe;
-
+
strings->exe_data = ecore_event_handler_add (ECORE_EXE_EVENT_DATA, ensorcel_exe_data, strings);
strings->exe_exit = ecore_event_handler_add (ECORE_EXE_EVENT_DEL, ensorcel_exe_exit, strings);
- exe = ecore_exe_pipe_run (exe_cmd, ECORE_EXE_PIPE_READ | ECORE_EXE_PIPE_READ_LINE_BUFFERED, NULL);
-
+ exe =
+ ecore_exe_pipe_run (exe_cmd, ECORE_EXE_PIPE_READ | ECORE_EXE_PIPE_READ_LINE_BUFFERED, NULL);
+
if (!exe)
{
- printf("Error Running ecore_exe_pipe_run\n");
- return -1;
+ printf ("Error Running ecore_exe_pipe_run\n");
+ return -1;
}
return 1;
}
/* DON'T FORGET FREE THE RETURNED VALUE */
-void ensorcel_cmd_run (const char *exe_cmd, Etk_Label *label)
+void ensorcel_cmd_run (const char *exe_cmd, Etk_Label * label)
{
- Ensorcel_Exe_Strings *strings;
-
- strings = (Ensorcel_Exe_Strings *) malloc (sizeof (Ensorcel_Exe_Strings));
- strings->str_exe = calloc (1, 1);
- strings->tb_exe = calloc (1, 1);
- strings->label = label;
-
- ensorcel_exe_pipe_run (exe_cmd,strings);
-
+ Ensorcel_Exe_Strings *strings;
+
+ strings = (Ensorcel_Exe_Strings *) malloc (sizeof (Ensorcel_Exe_Strings));
+ strings->str_exe = calloc (1, 1);
+ strings->tb_exe = calloc (1, 1);
+ strings->label = label;
+
+ ensorcel_exe_pipe_run (exe_cmd, strings);
+
}
/*DON'T FORGET FREE THE RETURNED VALUE */
diff --git a/src/ensorcel_string_funcs.c b/src/ensorcel_string_funcs.c
index f1831fc..957f7a7 100644
--- a/src/ensorcel_string_funcs.c
+++ b/src/ensorcel_string_funcs.c
@@ -119,8 +119,8 @@ char *ensorcel_format_string (char *string)
char *tb_str;
int nb_eol;
int len;
-
- printf("DEBUG ensorcel_format_string\n");
+
+ printf ("DEBUG ensorcel_format_string\n");
len = strlen (string);
@@ -163,7 +163,7 @@ char *ensorcel_format_string (char *string)
tb_str += i - i_old;
*tb_str = '\0';
- printf("RESULT ensorcel_format_string : %s\n",tb_string);
+ printf ("RESULT ensorcel_format_string : %s\n", tb_string);
return (tb_string);
}
diff --git a/src/ensorcel_tree_create.c b/src/ensorcel_tree_create.c
index 3a47ff5..7fe8506 100644
--- a/src/ensorcel_tree_create.c
+++ b/src/ensorcel_tree_create.c
@@ -9,14 +9,14 @@ int ensorcel_grimoire_row_create (Ensorcel_Tree_Skel * Tree_Skel)
if (!ecore_file_exists (ENSORCELGRIMOIREFILE))
{
- printf ("no %s found\n", ENSORCELGRIMOIREFILE);
+ printf ("no %s found\n", ENSORCELGRIMOIREFILE);
return (EXIT_FAILURE);
}
fd = fopen (ENSORCELGRIMOIREFILE, "r");
if (!fd)
{
- printf ("%s can't be opened\n", ENSORCELGRIMOIREFILE);
+ printf ("%s can't be opened\n", ENSORCELGRIMOIREFILE);
return (EXIT_FAILURE);
}