/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 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 //------------------------------------------------------------------------------ // 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 Push(pile **, int); /* Pop retire la dernière valeur empilée sur la pile. */ int Pop(pile **); /* Clear vide la pile. */ void Clear(pile **); /* Length retourne le nombre d'éléments de la pile. */ int Length(pile *p); /* Affiche la totalité de la pile en commençant par le sommet. */ void View(pile *); //------------------------------------------------------------------------------ void util_pile_test(); // def: scr/util/tests