aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilippe Caseiro <puppetmaster.e17@gmail.com>2006-01-30 15:06:28 +0100
committerPuppet_Master <puppetmaster.e17@gmail.com>2006-01-30 15:06:28 +0100
commit0245e0dd45b00632f4713fecd738d09326ce767a (patch)
treed03d7e491d7b24d71b1d2f1cad34c6a7a54290aa
parentcleaning some code (diff)
downloadensorcel-0245e0dd45b00632f4713fecd738d09326ce767a.tar.gz
Indent Fixing
SEGV ON SPELL LIST FIXED !!! SEGV ON FREE BSD FIXED (thanks CodeWarrior for this bug report)
-rw-r--r--TODO3
-rw-r--r--src/ensorcel.h8
-rw-r--r--src/ensorcel_error.c12
-rw-r--r--src/ensorcel_info_get.c6
-rw-r--r--src/ensorcel_launch.c16
-rw-r--r--src/ensorcel_spell.c20
-rw-r--r--src/ensorcel_tree_create.c6
7 files changed, 37 insertions, 34 deletions
diff --git a/TODO b/TODO
index 1988f24..44d5e45 100644
--- a/TODO
+++ b/TODO
@@ -1,6 +1,3 @@
-- Resoudre le bug du segv au bout de 3 selections de spell
- (added Mon Jan 30 11:25:20 2006, incomplete, priority veryhigh)
-
- Fixer le bug lame contiens lame donc erreur possible
(added Mon Jan 30 11:23:10 2006, incomplete, priority high)
diff --git a/src/ensorcel.h b/src/ensorcel.h
index 8c85013..6df69ae 100644
--- a/src/ensorcel.h
+++ b/src/ensorcel.h
@@ -26,7 +26,7 @@ struct _Ensorcel_Exe_Strings
{
char *str_exe;
char *tb_exe;
- Etk_Label *label;
+ Etk_Label *label;
};
typedef struct _Ensorcel_Button_Set Ensorcel_Button_Set;
@@ -96,7 +96,7 @@ void ensorcel_options_window_create (void *data);
void ensorcel_install_window_create (void *data);
void ensorcel_progress_window_create (void *data);
void ensorcel_spell_window_create (void *data);
-void ensorcel_error_popup(void *data);
+void ensorcel_error_popup (void *data);
Ensorcel_Tree_Skel *ensorcel_tree_initialise (int tree_w, int tree_h, const char *name_col1,
const char *name_col2, const char *name_col3,
@@ -168,7 +168,7 @@ Ecore_List *ensorcel_spell_info_get (Ecore_List * el_package_list, c
char *ensorcel_spell_lastest_get (Ecore_List * el_info);
char *ensorcel_spell_status_get (Ecore_List * list);
char *ensorcel_spell_installed_version_get (Ecore_List * list);
-void ensorcel_spell_description_put (char *name, Etk_Label *label);
+void ensorcel_spell_description_put (char *name, Etk_Label * label);
void ensorcel_details_show (char *name, char *ver, char *last, char *status,
@@ -187,7 +187,7 @@ char *ensorcel_format_string (char *string);
/*
* COMMAND LAUNCHER FUNCS
*/
-void ensorcel_cmd_run (const char *exe_cmd, Etk_Label *label);
+void ensorcel_cmd_run (const char *exe_cmd, Etk_Label * label);
/*
* SORCERY COMMANDS
diff --git a/src/ensorcel_error.c b/src/ensorcel_error.c
index 389e58d..86d08dc 100644
--- a/src/ensorcel_error.c
+++ b/src/ensorcel_error.c
@@ -16,8 +16,8 @@ void ensorcel_error_popup (void *data)
Etk_Widget *hbox;
Etk_Widget *bt_ok;
Etk_Widget *fm_main;
- Etk_Widget *image;
- char *msg;
+ Etk_Widget *image;
+ char *msg;
/*Etk_Widget *image; */
@@ -30,12 +30,12 @@ void ensorcel_error_popup (void *data)
vbox = etk_vbox_new (FALSE, 0);
hbox = etk_hbox_new (FALSE, 0);
fm_main = etk_frame_new (_("About"));
-
- sprintf (msg,"<h1>Ensorcel_Error</h1><br>%s",(char *)data);
-
+ sprintf (msg, "<h1>Ensorcel_Error</h1><br>%s", (char *)data);
+
+
lb_info = etk_label_new (msg);
- image = etk_image_new_from_file(IMGERROR);
+ image = etk_image_new_from_file (IMGERROR);
bt_ok = ensorcel_button_create ("Shit an Error ...", "clicked", IMGOKENSORCEL,
ETK_CALLBACK (_ensorcel_error_window_deleted_cb), win);
diff --git a/src/ensorcel_info_get.c b/src/ensorcel_info_get.c
index d496997..100c84e 100644
--- a/src/ensorcel_info_get.c
+++ b/src/ensorcel_info_get.c
@@ -86,8 +86,10 @@ Ecore_List *ensorcel_spell_info_get (Ecore_List * el_package_list, c
ecore_list_append (list, "");
}
}
- if (line)
- free (line);
+ /* VALGRIND SAYD INVALID FREE
+ * if (line)
+ * free (line);
+ */
}
if (ecore_list_nodes (list) > 0)
diff --git a/src/ensorcel_launch.c b/src/ensorcel_launch.c
index d493b60..5f1a7f9 100644
--- a/src/ensorcel_launch.c
+++ b/src/ensorcel_launch.c
@@ -49,9 +49,9 @@ static int ensorcel_exe_exit (void *data, int type, void *event)
strings->tb_exe = ensorcel_format_string (strings->str_exe);
- printf ("__DEBUG__ :: etk_label_set (%p, %s)\n",strings->label, strings->tb_exe);
+ printf ("__DEBUG__ :: etk_label_set (%p, %s)\n", strings->label, strings->tb_exe);
etk_label_set (strings->label, strings->tb_exe);
- printf ("__DEBUG__ :: DONE (%s)\n",etk_label_get (strings->label));
+ printf ("__DEBUG__ :: DONE (%s)\n", etk_label_get (strings->label));
if (strings->str_exe)
@@ -59,9 +59,10 @@ static int ensorcel_exe_exit (void *data, int type, void *event)
if (strings->tb_exe)
free (strings->tb_exe);
-
- if (strings)
- free (strings);
+ /* VALGRIND SAYD INVALID FREE
+ * if (strings)
+ * free (strings);
+ */
return 1;
}
@@ -72,8 +73,9 @@ int ensorcel_exe_pipe_run (const char *exe_cmd, Ensorcel_Exe_Strings * strings)
ecore_event_handler_add (ECORE_EXE_EVENT_DATA, ensorcel_exe_data, strings);
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");
diff --git a/src/ensorcel_spell.c b/src/ensorcel_spell.c
index e3727d4..4a6b7ec 100644
--- a/src/ensorcel_spell.c
+++ b/src/ensorcel_spell.c
@@ -29,23 +29,23 @@ static void _ensorcel_tree_row_selected (Etk_Object * object, Etk_Tree_Row * row
}
/* Called when a row is unselected */
-static void _ensorcel_tree_row_unselected (Etk_Object * object _UNUSED_, Etk_Tree_Row * row _UNUSED_,
- void *data)
+static void _ensorcel_tree_row_unselected (Etk_Object * object _UNUSED_,
+ Etk_Tree_Row * row _UNUSED_, void *data)
{
Ensorcel_Spell_Info_Widgets *tbs_infos = data;
- int i, j;
-
+ int i, j;
+
// etk_widget_hide_all(tbs_infos->tb_details);
// etk_object_destroy(ETK_OBJECT());
-
- for (j=0;j<5;j++)
+
+ for (j = 0; j < 5; j++)
{
- for (i=0;i<5;i++)
- etk_table_cell_clear(ETK_TABLE(tbs_infos->tb_details), i,j);
+ for (i = 0; i < 5; i++)
+ etk_table_cell_clear (ETK_TABLE (tbs_infos->tb_details), i, j);
}
-
+
// printf ("Row Unselected %p %p \n", object, row);
-
+
}
Ensorcel_Tree_Skel *ensorcel_spell_tree_create ()
diff --git a/src/ensorcel_tree_create.c b/src/ensorcel_tree_create.c
index 7fe8506..c7cf7c8 100644
--- a/src/ensorcel_tree_create.c
+++ b/src/ensorcel_tree_create.c
@@ -43,8 +43,10 @@ int ensorcel_grimoire_row_create (Ensorcel_Tree_Skel * Tree_Skel)
}
fclose (fd);
- if (ptr)
- free (ptr);
+ /* VALGRIND SAYD INVALID FREE
+ * if (ptr)
+ * free (ptr);
+ */
return (EXIT_SUCCESS);
}