diff --git a/include/fsm.h b/include/fsm.h index 019cb5e..d8b78e1 100644 --- a/include/fsm.h +++ b/include/fsm.h @@ -31,7 +31,7 @@ #pragma once #include #include - +#include // << ? TODO > Check /******************************************************************************/ /* S T A T E M A C H I N E */ @@ -70,3 +70,13 @@ void *fsm_add_measure (char *measure_name); void *fsm_add_result (char *result_name); void fsm_debug (int choice, int value, char *string, int sub_automaton); + +void pref_set_store_restore_reset (int choice, int value); +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 prefer_init (); + diff --git a/include/prefer.h b/include/prefer.h.forget similarity index 100% rename from include/prefer.h rename to include/prefer.h.forget diff --git a/src/fsm/dispatch.c b/src/fsm/dispatch.c index 8d181eb..4e75176 100644 --- a/src/fsm/dispatch.c +++ b/src/fsm/dispatch.c @@ -30,9 +30,6 @@ #include #include "../../include/fsm.h" -#include "../../include/prefer.h" -//#include "../../include/widget.h" -#include "../../include/fsm.h" /******************************************************************************/ diff --git a/src/fsm/measure.c b/src/fsm/measure.c index f18a5fb..82f6dee 100644 --- a/src/fsm/measure.c +++ b/src/fsm/measure.c @@ -28,6 +28,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include +#include #include "../../include/fsm.h" /******************************************************************************/ @@ -101,9 +102,24 @@ typedef struct s_List List; struct s_List { List *next; /* pointeur sur le reste de la liste */ - void *data; /* pointeur sur une donnée générique */ +// void *data; /* pointeur sur une donnée générique */ }; +List *list = NULL; + +List *list_create (void *data) +{ + List *list = malloc(sizeof(list)); /* allocation (en vert sur le diagramme) + * et affectation à la variable list (en bleu) */ + if (list) /* si l'allocation a réussi */ + { +// list->data = data; /* affectation du champ data (en rouge) */ + list->next = NULL; /* affectation du champ next à la liste vide */ + } + return list; /* retour de la liste + * (correctement allouée et affectée ou NULL) */ +} + void fsm_measures_list_init () { fsm_debug (0,0, "fsm_measures_list_init()", 2); // sub_automaton 2 diff --git a/src/prefer.c b/src/fsm/prefer.c similarity index 96% rename from src/prefer.c rename to src/fsm/prefer.c index 506a926..1e446b3 100644 --- a/src/prefer.c +++ b/src/fsm/prefer.c @@ -29,9 +29,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 : @@ -127,4 +127,5 @@ void *fsm_add_displayable (char *displayable_name) void prefer_init () {prefer_displayable_list_init ();} -void prefer_displayable_list_init () { printf("prefer <> prefer_displayable_list_init()\n");} +void prefer_displayable_list_init () +{ printf("prefer <> prefer_displayable_list_init() < in the fsm ? < TODO\n");} diff --git a/src/fsm/result.c b/src/fsm/result.c index b9dbda4..8f30961 100644 --- a/src/fsm/result.c +++ b/src/fsm/result.c @@ -30,7 +30,6 @@ #include #include "../../include/fsm.h" -#include "../../include/prefer.h" #include "../../include/widget.h" diff --git a/src/main.c b/src/main.c index 01f87a8..6928d4a 100644 --- a/src/main.c +++ b/src/main.c @@ -143,7 +143,6 @@ #include "../include/widget.h" #include "../include/signal.h" -#include "../include/prefer.h" #include "../include/fsm.h" diff --git a/src/signal.c b/src/signal.c index 9462a52..895a157 100644 --- a/src/signal.c +++ b/src/signal.c @@ -32,7 +32,6 @@ #include "../include/fsm.h" #include "../include/signal.h" #include "../include/widget.h" -#include "../include/prefer.h" #include "../include/graphics.h" diff --git a/src/widget/measure/dispatch.c b/src/widget/measure/dispatch.c index 5087259..bf90a86 100644 --- a/src/widget/measure/dispatch.c +++ b/src/widget/measure/dispatch.c @@ -31,7 +31,6 @@ #include "../../../include/base.h" #include "../../../include/signal.h" #include "../../../include/widget.h" -//#include "../../../include/prefer.h" #include "../../../include/fsm.h"