From 004c7972cd88b4b46d6582b71f31e37d647500d3 Mon Sep 17 00:00:00 2001 From: Jean Sirmai Date: Mon, 23 Sep 2024 09:47:00 +0200 Subject: [PATCH] =?UTF-8?q?r=C3=A9organisation=20de=20la=20hi=C3=A9rarchie?= =?UTF-8?q?=20fsm=20et=20renommages=20/=20d=C3=A9placement=20parse,=20jour?= =?UTF-8?q?nal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/fsm/dispatch.c | 9 +++++---- src/fsm/engine/{engine.c => manager.c} | 0 src/fsm/{measure => measures}/data_list.c | 0 src/fsm/{measure => measures}/disp_list.c | 0 src/fsm/{measure/manage.c => measures/manager.c} | 13 +++++++++++-- src/fsm/{measure => measures}/tool_list.c | 0 src/fsm/{prefer.c => preferences/manager.c} | 10 +++++----- src/fsm/{result.c => results/manager.c} | 8 ++++---- src/{fsm => }/journal.c | 2 +- src/{ => util}/parse.c | 2 +- src/{widget => util}/tree.c | 0 11 files changed, 27 insertions(+), 17 deletions(-) rename src/fsm/engine/{engine.c => manager.c} (100%) rename src/fsm/{measure => measures}/data_list.c (100%) rename src/fsm/{measure => measures}/disp_list.c (100%) rename src/fsm/{measure/manage.c => measures/manager.c} (96%) rename src/fsm/{measure => measures}/tool_list.c (100%) rename src/fsm/{prefer.c => preferences/manager.c} (94%) rename src/fsm/{result.c => results/manager.c} (95%) rename src/{fsm => }/journal.c (99%) rename src/{ => util}/parse.c (99%) rename src/{widget => util}/tree.c (100%) diff --git a/src/fsm/dispatch.c b/src/fsm/dispatch.c index 1c4ddb4..d2fba21 100644 --- a/src/fsm/dispatch.c +++ b/src/fsm/dispatch.c @@ -98,7 +98,7 @@ void fsm_init (char *initial_message_from_main) fsm_journal_event (MESSAGE, FSM, "fsm/dispatch", "results list init()", ""); fsm_results_list_init(); - fsm_journal_event (MESSAGE, FSM, "fsm/dispatch", "displayable list init()", ""); + fsm_journal_event (MESSAGE, FSM, "fsm/dispatch", "displayables list init()", ""); fsm_displayable_list_init(); fsm_journal_event (MESSAGE, FSM, "fsm/dispatch", "preferences list init()", ""); @@ -118,7 +118,8 @@ static int preferences_have_been_modified = FALSE; void fsm_set_preferences_modified (bool value) { const char *str_value; - if (value) str_value = "FALSE"; else str_value = "TRUE"; + if (value) str_value = "FALSE"; else str_value = "TRUE"; // maladroit... TODO + fsm_journal_event (INFO, FSM, "fsm/dispatch", "preferences modified: value = ", @@ -155,7 +156,7 @@ void fsm_set_exec_edit (int choice) if (choice_EXEC_EDIT != choice) { fsm_journal_event (INFO, FSM, "fsm/dispatch", "set_exec_edit()", - concat (tab_0 [choice_EXEC_EDIT], " > ", tab_0 [choice], NULL)); + concat (tab_0 [choice_EXEC_EDIT], " > ", tab_0 [choice], NULL)); choice_EXEC_EDIT = choice; } } @@ -165,7 +166,7 @@ void fsm_set_state_rules_data (int choice) if (choice_STATE_RULES_DATA != choice) { fsm_journal_event (INFO, FSM, "fsm/dispatch", "set_state_rules_data()", - concat (tab_1 [choice_STATE_RULES_DATA], " > ", tab_1 [choice], NULL)); + concat (tab_1 [choice_STATE_RULES_DATA], " > ", tab_1 [choice], NULL)); choice_STATE_RULES_DATA = choice; } } diff --git a/src/fsm/engine/engine.c b/src/fsm/engine/manager.c similarity index 100% rename from src/fsm/engine/engine.c rename to src/fsm/engine/manager.c diff --git a/src/fsm/measure/data_list.c b/src/fsm/measures/data_list.c similarity index 100% rename from src/fsm/measure/data_list.c rename to src/fsm/measures/data_list.c diff --git a/src/fsm/measure/disp_list.c b/src/fsm/measures/disp_list.c similarity index 100% rename from src/fsm/measure/disp_list.c rename to src/fsm/measures/disp_list.c diff --git a/src/fsm/measure/manage.c b/src/fsm/measures/manager.c similarity index 96% rename from src/fsm/measure/manage.c rename to src/fsm/measures/manager.c index a3cb975..61e086d 100644 --- a/src/fsm/measure/manage.c +++ b/src/fsm/measures/manager.c @@ -91,12 +91,21 @@ void fsm_add_measure (char *measure_name) { fsm_journal_event (DEBUG, MEASURES_TOOLS, - "fsm/measure/manage/", + "fsm/measures/manager/", "fsm_add_measure()", measure_name); } -void fsm_measures_list_init() {if (0) fsm_tools_list_test();} +void fsm_measures_list_init() +{ + if (0) fsm_tools_list_test(); + + fsm_journal_event (DEBUG, + RESULTS, + "fsm/measures/manager", + "fsm measures list < ready to use", + ""); +} void fsm_rule_trig_measure (int rule_id, int object_id, int measure_id) {} diff --git a/src/fsm/measure/tool_list.c b/src/fsm/measures/tool_list.c similarity index 100% rename from src/fsm/measure/tool_list.c rename to src/fsm/measures/tool_list.c diff --git a/src/fsm/prefer.c b/src/fsm/preferences/manager.c similarity index 94% rename from src/fsm/prefer.c rename to src/fsm/preferences/manager.c index 3147730..8faea5d 100644 --- a/src/fsm/prefer.c +++ b/src/fsm/preferences/manager.c @@ -25,9 +25,9 @@ -#include "../../include/fsm.h" -#include "../../include/signal.h" -#include "../../include/widget.h" +#include "../../../include/fsm.h" +#include "../../../include/signal.h" +#include "../../../include/widget.h" // TODO Les noms d'icônes sont utilisés pour deux fonctions distinctes : @@ -130,11 +130,11 @@ void fsm_add_displayable (char *displayable_name) /******************************************************************************/ void fsm_preferences_list_init () { - fsm_journal_event (MESSAGE, PREFER, "fsm/prefer", "preferences list init()", ""); + fsm_journal_event (MESSAGE, PREFER, "fsm/preferences/manager", "preferences list < ready to use", ""); } void fsm_displayable_list_init () { - fsm_journal_event (MESSAGE, PREFER, "fsm/prefer", "displayables list init()", ""); + fsm_journal_event (MESSAGE, PREFER, "fsm/preferences/manager", "displayables list < ready to use", ""); } diff --git a/src/fsm/result.c b/src/fsm/results/manager.c similarity index 95% rename from src/fsm/result.c rename to src/fsm/results/manager.c index a817dcb..c306c1c 100644 --- a/src/fsm/result.c +++ b/src/fsm/results/manager.c @@ -25,8 +25,8 @@ #include -#include "../../include/fsm.h" -#include "../../include/widget.h" +#include "../../../include/fsm.h" +#include "../../../include/widget.h" /******************************************************************************/ @@ -72,8 +72,8 @@ void fsm_results_list_init () { fsm_journal_event (DEBUG, RESULTS, - "fsm/", - "fsm_results_list_init()", + "fsm/results/manager", + "fsm results list < ready to use", ""); } diff --git a/src/fsm/journal.c b/src/journal.c similarity index 99% rename from src/fsm/journal.c rename to src/journal.c index d9457a3..46a9687 100644 --- a/src/fsm/journal.c +++ b/src/journal.c @@ -29,7 +29,7 @@ #include #include #include -#include "../../include/fsm.h" +#include "../include/fsm.h" /******************************************************************************/ /* A journal stores chronologically the events */ diff --git a/src/parse.c b/src/util/parse.c similarity index 99% rename from src/parse.c rename to src/util/parse.c index 497ef1c..1d11f27 100644 --- a/src/parse.c +++ b/src/util/parse.c @@ -29,7 +29,7 @@ #include // http://xmlsoft.org/examples/#parse1.c // https://gnome.pages.gitlab.gnome.org/libxml2/devhelp/general.html -#include "../include/base.h" +#include "../../include/base.h" #define READ_SITE 1 << 0 #define READ_WEIGHT 1 << 1 diff --git a/src/widget/tree.c b/src/util/tree.c similarity index 100% rename from src/widget/tree.c rename to src/util/tree.c