Maël DAIM 2 years ago
commit d338d99c18

@ -1,37 +1,75 @@
#include<stdio.h> #include <stdio.h>
#include<stdlib.h> #include <stdlib.h>
#include<string.h> #include <string.h>
#include<stdbool.h> #include <stdbool.h>
//################ Types de structures ############### typedef struct
{
typedef struct{
char dept[31]; char dept[31];
int nbP; int nbP;
char respAd[31]; char respAd[31];
}Departement; } Departement;
typedef struct maillonDept typedef struct maillonDept
{ {
Departement d; Departement d;
struct maillonDept *suiv; struct maillonDept *suiv;
}MaillonDept,*ListeDept; } MaillonDept,*ListeDept;
typedef struct typedef struct
{ {
char nom[31]; char nom[31];
ListeDept lDept; 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; int login(void);
void menuAdmin(VilleIUT *tiut[], int *tLog, int tMax);
ListeDept listenouv(void); void menuCandidat(VilleIUT *tiut[], int *tLog, int tMax);
ListeDept InsérerEntete(ListeDept l,int nb); void clearpage(void);
ListeDept Insérer(Liste l, int x); void globale(void);
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);

@ -23,30 +23,53 @@ typedef struct
ListeDept lDept; ListeDept lDept;
} VilleIUT; } VilleIUT;
/* Fonctions de Chargement */
int chargement(VilleIUT *tiut[],int tMax); int chargement(VilleIUT *tiut[],int tMax);
Departement lireDep(FILE *flot); 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 listeDeptNouv(void);
ListeDept insererEntete(ListeDept lDept,Departement d); ListeDept insererEntete(ListeDept lDept,Departement d);
ListeDept insererDept(ListeDept lDept, Departement d); ListeDept insererDept(ListeDept lDept, Departement d);
ListeDept supprimerEntete(ListeDept lDept); ListeDept supprimerEntete(ListeDept lDept);
ListeDept supprimerDept(ListeDept lDept, Departement d); 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 creerDept(VilleIUT *tiut[],int tLog);
void retirerDept(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 miseAJourNomDept(VilleIUT *tiut[], int tLog);
void miseAJourResp(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); void miseAJourPlaces(VilleIUT *tiut[], int tLog);
/* Fonctions de gestion d'affichage, menus et globale */
int login(void); int login(void);
void menuAdmin(VilleIUT *tiut[], int *tLog, int tMax); void menuAdmin(VilleIUT *tiut[], int *tLog, int tMax);
void menuCandidat(VilleIUT *tiut[], int *tLog, int tMax); void menuCandidat(VilleIUT *tiut[], int *tLog, int tMax);
void clearpage(void); 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); void globale(void);
Loading…
Cancel
Save