/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Gem-graph client * * * * Finite State Machine (fsm) header * * * * Copyright © 2021 Libre en Communs * * Copyright © 2021 Adrien Bourmault * * Copyright © 2021 Jean Sirmai * * * * This file is part of Gem-graph. * * * * This program is free software: you can redistribute it and/or modify it * * under the terms of the GNU Affero General Public License * * as published by the Free Software Foundation, * * either version 3 of the License, * * or (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; * * without even the implied warranty of MERCHANTABILITY * * or FITNESS FOR A PARTICULAR PURPOSE. * * See the GNU Affero General Public License for more details. * * * * You should have received a copy of the GNU Affero General Public License * * along with this program. If not, see . * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #pragma once #include #include #include char *util_read_file(char *filename); //------------------------------------------------------------------------------ // https://chgi.developpez.com/liste/ < ^c^v /* Structure représentant un élément de la pile. */ typedef struct pile { int valeur; struct pile *prec; } pile ; /* Push empile une valeur sur la pile. */ void util_pile_push(pile **, int); /* Pop retire la dernière valeur empilée sur la pile. */ int util_pile_pop(pile **); /* Clear vide la pile. */ void util_pile_clear(pile **); /* Length retourne le nombre d'éléments de la pile. */ int util_pile_length(pile *p); /* Affiche la totalité de la pile en commençant par le sommet. */ void util_pile_view(pile *); //------------------------------------------------------------------------------ void util_pile_test(); // def: scr/util/tests