From 4297242f16351fe0f7f5248e31cf2fab955da2b8 Mon Sep 17 00:00:00 2001 From: Jean Sirmai Date: Mon, 19 Aug 2024 16:46:25 +0200 Subject: [PATCH] WIP: cleaning (micro-commit) --- include/prefer.h | 2 ++ src/fsm/dispatch.c | 21 ++++++++++++++++++--- src/fsm/measure.c | 2 ++ 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/include/prefer.h b/include/prefer.h index c90f25e..6007459 100644 --- a/include/prefer.h +++ b/include/prefer.h @@ -38,3 +38,5 @@ const char get_button_icon_name (int n); void fsm_reset_all_situations_transparencies_at_value (int value); // provisoire... void *fsm_add_displayable (char *displayable_name); + +//void debug_printing (int choice, int value, int sub_automaton); diff --git a/src/fsm/dispatch.c b/src/fsm/dispatch.c index f693828..b4d7869 100644 --- a/src/fsm/dispatch.c +++ b/src/fsm/dispatch.c @@ -32,6 +32,21 @@ #include "../../include/fsm.h" #include "../../include/prefer.h" #include "../../include/widget.h" +#include "../../include/fsm.h" + + +/******************************************************************************/ +/* */ +/* FFFFFFFFFFFF SSSS MM MM */ +/* FF SS SS MMMM MMMM */ +/* FF SS MM MM MM MM */ +/* FFFFFFF SS MM MM MM MM */ +/* FF SS MM MM MM */ +/* FF SS MM MM */ +/* FF SS SS MM MM */ +/* FF SSSSS MM MM */ +/* */ +/******************************************************************************/ /******************************************************************************/ @@ -98,7 +113,7 @@ static char *tab_1 [] = { "SYNTH", "STATE", "RULES", "DATA" }; static void debug_printing (int choice, int value, int sub_automaton) { switch (sub_automaton) { // sub_automaton 0 is EXEC_EDIT and - // sub_automaton 1 is STATE_RULES_DATA + // sub_automaton 1 is STATE_RULES_DATA case (0) : printf("switch %5s x %5s > %5s x %5s\n", tab_0 [choice_EXEC_EDIT], tab_1 [choice_STATE_RULES_DATA], @@ -111,8 +126,8 @@ static void debug_printing (int choice, int value, int sub_automaton) tab_0 [choice_EXEC_EDIT], tab_1 [choice]); break; - case (2) : break; - case (3) : break; + case (2) : printf("FSM debug <> choice = %2d\n", choice); break; + case (3) : printf("FSM debug <> choice = %2d\n", choice); break; default : printf("default in automaton.debug_printing()\n"); } diff --git a/src/fsm/measure.c b/src/fsm/measure.c index f9e4420..817bcdc 100644 --- a/src/fsm/measure.c +++ b/src/fsm/measure.c @@ -32,6 +32,7 @@ #include "../../include/fsm.h" #include "../../include/prefer.h" #include "../../include/widget.h" +#include "../../include/fsm.h" /******************************************************************************/ @@ -88,6 +89,7 @@ static void *list_measures; void *fsm_add_measure (char *measure_name) { printf("fsm_add_measure %p <<< %s (see fsm.c)\n", list_measures, measure_name); +// debug_printing (2, 0, 0); return NULL; }