prefer.c devient un fichier de src/fsm/ et include/prefer.h disparait

This commit is contained in:
Jean Sirmai 2024-08-20 09:32:20 +02:00
parent 635ff8f076
commit 0d7f90cf18
Signed by: jean
GPG Key ID: FB3115C340E057E3
9 changed files with 33 additions and 13 deletions

View File

@ -31,7 +31,7 @@
#pragma once
#include <stdbool.h>
#include <stddef.h>
#include <gtk-4.0/gtk/gtk.h> // << ? 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 ();

View File

@ -30,9 +30,6 @@
#include <stdbool.h>
#include "../../include/fsm.h"
#include "../../include/prefer.h"
//#include "../../include/widget.h"
#include "../../include/fsm.h"
/******************************************************************************/

View File

@ -28,6 +28,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * */
#include <stdbool.h>
#include <stdlib.h>
#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

View File

@ -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");}

View File

@ -30,7 +30,6 @@
#include <stdbool.h>
#include "../../include/fsm.h"
#include "../../include/prefer.h"
#include "../../include/widget.h"

View File

@ -143,7 +143,6 @@
#include "../include/widget.h"
#include "../include/signal.h"
#include "../include/prefer.h"
#include "../include/fsm.h"

View File

@ -32,7 +32,6 @@
#include "../include/fsm.h"
#include "../include/signal.h"
#include "../include/widget.h"
#include "../include/prefer.h"
#include "../include/graphics.h"

View File

@ -31,7 +31,6 @@
#include "../../../include/base.h"
#include "../../../include/signal.h"
#include "../../../include/widget.h"
//#include "../../../include/prefer.h"
#include "../../../include/fsm.h"