From 5fd12f21bba4b940c5fbb7b0c2efb5d4cb10cad8 Mon Sep 17 00:00:00 2001 From: johnny Date: Thu, 5 Jan 2023 14:46:30 +0100 Subject: [PATCH] Maj des fichiers .h pour une meilleures ergonomie --- Commun.h | 80 +++++++++++++++++++++++++++++++++++++++++--------------- Jsae.h | 43 +++++++++++++++++++++++------- 2 files changed, 92 insertions(+), 31 deletions(-) diff --git a/Commun.h b/Commun.h index cefb6e4..f4f80d8 100644 --- a/Commun.h +++ b/Commun.h @@ -1,37 +1,75 @@ -#include -#include -#include -#include +#include +#include +#include +#include -//################ Types de structures ############### - -typedef struct{ +typedef struct +{ char dept[31]; int nbP; char respAd[31]; -}Departement; +} Departement; typedef struct maillonDept { Departement d; struct maillonDept *suiv; -}MaillonDept,*ListeDept; +} MaillonDept,*ListeDept; typedef struct { char nom[31]; ListeDept lDept; +} VilleIUT; + +/* Fonctions de Chargement */ + +int chargement(VilleIUT *tiut[],int tMax); +Departement lireDep(FILE *flot); + +/* Fonctions d'affichage */ + +void afficherPlace(Departement d); +void afficherDep(Departement d); +void afficherVille(VilleIUT v); +void afficherTIUT(VilleIUT *tiut[], int tLog); +void afficherVilleDep(VilleIUT v); + +/* Fonctions de Listes */ + +ListeDept listeDeptNouv(void); +ListeDept insererEntete(ListeDept lDept,Departement d); +ListeDept insererDept(ListeDept lDept, Departement d); +ListeDept supprimerEntete(ListeDept lDept); +ListeDept supprimerDept(ListeDept lDept, Departement d); +bool vide(ListeDept lDept); +int longueur(ListeDept lDept); + +/* Fonctions de département */ + +void creerDept(VilleIUT *tiut[],int tLog); +void retirerDept(VilleIUT *tiut[], int *tLog); + +/* Fonctions de gestion du tableau */ + +int insererVille(VilleIUT *tiut[], char nomV[], Departement d, int *tLog, int tMax, int pos); + +/* Fonctions de recherche */ + +ListeDept rechercherDept(ListeDept lDept, char dept[], int *trouve); +int rechercheIUT(VilleIUT *tiut[], int tLog, char ville[], int *trouve); + +/* Fonctions de mise à jour */ + +void miseAJourNomDept(VilleIUT *tiut[], int tLog); +void miseAJourResp(VilleIUT *tiut[], int tLog); +void miseAJourPlaces(VilleIUT *tiut[], int tLog); + +/* Fonctions de gestion d'affichage, menus et globale */ -}VilleIUT; - -ListeDept listenouv(void); -ListeDept InsérerEntete(ListeDept l,int nb); -ListeDept Insérer(Liste l, int x); -ListeDept supprimerEntete(ListeDept l); -ListeDept supprimer(ListeDept l, int x); -int longueur(ListeDept l); -bool vide(ListeDept l); -ListeDept ajouterEnqueue(ListeDept l, int x); -int tete(ListeDept l); -bool rechercher(ListeDept l, int x); +int login(void); +void menuAdmin(VilleIUT *tiut[], int *tLog, int tMax); +void menuCandidat(VilleIUT *tiut[], int *tLog, int tMax); +void clearpage(void); +void globale(void); \ No newline at end of file diff --git a/Jsae.h b/Jsae.h index 51b1e29..f4f80d8 100644 --- a/Jsae.h +++ b/Jsae.h @@ -23,30 +23,53 @@ typedef struct ListeDept lDept; } VilleIUT; +/* Fonctions de Chargement */ + int chargement(VilleIUT *tiut[],int tMax); Departement lireDep(FILE *flot); -int insererVille(VilleIUT *tiut[], char nomV[], Departement d, int *tLog, int tMax, int pos); + +/* Fonctions d'affichage */ + +void afficherPlace(Departement d); +void afficherDep(Departement d); +void afficherVille(VilleIUT v); +void afficherTIUT(VilleIUT *tiut[], int tLog); +void afficherVilleDep(VilleIUT v); + +/* Fonctions de Listes */ + ListeDept listeDeptNouv(void); ListeDept insererEntete(ListeDept lDept,Departement d); ListeDept insererDept(ListeDept lDept, Departement d); ListeDept supprimerEntete(ListeDept lDept); ListeDept supprimerDept(ListeDept lDept, Departement d); +bool vide(ListeDept lDept); +int longueur(ListeDept lDept); + +/* Fonctions de département */ + void creerDept(VilleIUT *tiut[],int tLog); void retirerDept(VilleIUT *tiut[], int *tLog); + +/* Fonctions de gestion du tableau */ + +int insererVille(VilleIUT *tiut[], char nomV[], Departement d, int *tLog, int tMax, int pos); + +/* Fonctions de recherche */ + +ListeDept rechercherDept(ListeDept lDept, char dept[], int *trouve); +int rechercheIUT(VilleIUT *tiut[], int tLog, char ville[], int *trouve); + +/* Fonctions de mise à jour */ + void miseAJourNomDept(VilleIUT *tiut[], int tLog); void miseAJourResp(VilleIUT *tiut[], int tLog); -int longueur(ListeDept lDept); -bool vide(ListeDept lDept); -ListeDept rechercherDept(ListeDept lDept, char dept[], int *trouve); void miseAJourPlaces(VilleIUT *tiut[], int tLog); + +/* Fonctions de gestion d'affichage, menus et globale */ + int login(void); void menuAdmin(VilleIUT *tiut[], int *tLog, int tMax); void menuCandidat(VilleIUT *tiut[], int *tLog, int tMax); void clearpage(void); -void afficherPlace(Departement d); -void afficherDep(Departement d); -void afficherVille(VilleIUT v); -void afficherTIUT(VilleIUT *tiut[], int tLog); -void afficherVilleDep(VilleIUT v); -int rechercheIUT(VilleIUT *tiut[], int tLog, char ville[], int *trouve); void globale(void); \ No newline at end of file