From 6ebc948a37801e414dc9ed634925e83b838430e5 Mon Sep 17 00:00:00 2001 From: "yann.champeau" Date: Tue, 20 Dec 2022 13:58:14 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20de=20fonctions=20de=20listes=20chain?= =?UTF-8?q?=C3=A9es=20et=20refonte=20de=20la=20s=C3=A9paration=20des=20fon?= =?UTF-8?q?ctions=20dans=20saeAnnexe.h?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/annexe/saeAnnexe.c | 9 ++++ src/annexe/saeAnnexe.h | 117 +++++++++++++++++++++++------------------ 2 files changed, 75 insertions(+), 51 deletions(-) diff --git a/src/annexe/saeAnnexe.c b/src/annexe/saeAnnexe.c index b99a4cd..9abc93b 100644 --- a/src/annexe/saeAnnexe.c +++ b/src/annexe/saeAnnexe.c @@ -16,6 +16,15 @@ void menu(void){ printf("Choisissez votre session : "); } +//Listes chainées +int existe(MaillonDep* liste, char* mot){ + break//A Faire ! +} + +int recherche(MaillonDep* liste, char* mot){ + break//A Faire ! +} + //Pile Pile creerpile(int tmax) { diff --git a/src/annexe/saeAnnexe.h b/src/annexe/saeAnnexe.h index f726fc7..51f59a9 100644 --- a/src/annexe/saeAnnexe.h +++ b/src/annexe/saeAnnexe.h @@ -1,54 +1,69 @@ -//Pile +//Définition des structures : --------------------------// + // +//Piles : ------------------// // +typedef struct pile // // +{ // // + int tlogi; // // + int tmax; // // + int* tab; // // +} pile; // // +typedef struct pile* Pile; // // +//--------------------------// // + // + // + // +//Files : ------------------// // +typedef struct file // // +{ // // + Pile pEntry; // // + Pile pExit; // // + int* tab; // // +} file; // // +typedef struct file* File; // // +//--------------------------// // +//------------------------------------------------------// -typedef struct pile -{ - int tlogi; - int tmax; - int* tab; -} pile; -typedef struct pile* Pile; -//File -typedef struct file -{ - Pile pEntry; - Pile pExit; - int* tab; -} file; -typedef struct file* File; - - - - -//Initialisation de fonctions : - -void menu(void); - -//Fonctions relatives aux listes chaînées : // -int existe(Listedep liste, char* mot); -//----------------------------------// - -//Fonctions relatives aux piles : // -Pile creerpile(int tmax); // - // -void empiler(Pile p, int x); // - // -void afficherPileEntier(Pile p); // - // -int depiler(Pile p); // -//----------------------------------// - -//Fonctions relatives aux files : // -File creerfile(int tmax); // - // -void enfiler(File f, int x); // - // -void afficherFileEntier(File f); // - // -int defiler(File f); // - // -void vider_file(File f); // -//----------------------------------// - -void reset(void); +//Initialisation de fonctions : ------------------------// + // +void menu(void); // + // + // + // +//Fonctions relatives aux listes chaînées : --// // +int existe(MaillonDep* liste, char* mot); // // + // // +int recherche(MaillonDep* liste, char* mot); // // +//--------------------------------------------// // + // + // + // +//Fonctions relatives aux piles : --// // +Pile creerpile(int tmax); // // + // // +void empiler(Pile p, int x); // // + // // +void afficherPileEntier(Pile p); // // + // // +int depiler(Pile p); // // +//----------------------------------// // + // + // + // +//Fonctions relatives aux files : --// // +File creerfile(int tmax); // // + // // +void enfiler(File f, int x); // // + // // +void afficherFileEntier(File f); // // + // // +int defiler(File f); // // + // // +void vider_file(File f); // // +//----------------------------------// // + // + // + // +void reset(void); // +//------------------------------------------------------// \ No newline at end of file