Réglage de problèmes divers.

master
Yann CHAMPEAU 3 years ago
parent 4a3855a624
commit ad3aaa3147

@ -0,0 +1 @@
src/DataBase/Etudiants.bin

@ -1,9 +1,13 @@
PHONY : clean doc all PHONY : clean doc all
all : prog all : prog EXE
prog : prog :
make -C src all make -C src all
EXE :
rm -f SAE
gcc -o SAE src/saeMain.o src/annexe/saeAnnexe.o src/partie1/saeP1.o src/partie2/saeP2.o src/partie3/saeP3.o src/partie4/saeP4.o
doc : doc :
make -C src doc make -C src doc

@ -1,4 +1,4 @@
all : SAE all : saeMain.o lib
.PHONY : all doc clean .PHONY : all doc clean
@ -9,9 +9,6 @@ lib : annexe/saeAnnexe.o partie1/saeP1.o partie2/saeP2.o partie3/saeP3.o partie4
make -C partie3 all make -C partie3 all
make -C partie4 all make -C partie4 all
SAE : saeMain.o lib
gcc -o ../SAE saeMain.o annexe/saeAnnexe.o partie1/saeP1.o partie2/saeP2.o partie3/saeP3.o partie4/saeP4.o
saeMain.o : saeMain.c saeMain.o : saeMain.c
gcc -Wall -c saeMain.c gcc -Wall -c saeMain.c

@ -13,7 +13,8 @@ void menu(void){
printf("#--------------------------------------------------------------------#\n\n"); printf("#--------------------------------------------------------------------#\n\n");
printf("Codes pour accéder aux différents profils :\n\n"); printf("Codes pour accéder aux différents profils :\n\n");
printf("C : Consultation.\n"); printf("C : Consultation.\n");
printf("A : Administrateur.\n\n"); printf("A : Administrateur.\n");
printf("Q : Quitter.\n\n");
printf("#--------------------------------------------------------------------#\n\n"); printf("#--------------------------------------------------------------------#\n\n");
printf("Choisissez votre session : "); printf("Choisissez votre session : ");
} }

@ -8,7 +8,7 @@
//Partie Consultant. //Partie Consultant.
void MenuUser(VilleIUT* lvIUT[],int tlogi) void menuUser(VilleIUT* lvIUT[],int tlogi)
{ {
int intUserEntry=0; int intUserEntry=0;
printf("#--------------------------------------------------------------------#\n"); printf("#--------------------------------------------------------------------#\n");
@ -167,7 +167,7 @@ void modifPlaces(VilleIUT* tiut[],int tlogi){
printf("\n\nEntrez le département à modifier:"); printf("\n\nEntrez le département à modifier:");
char dep[31]; char dep[31];
scanf("%*c%s",&dep); scanf("%*c%s",&dep);
if(!existeDep(tiut->ldept,dep)){ if(!existeDep(v->ldept,dep)){
fprintf(stderr,"\nDépartement non existant !\n"); fprintf(stderr,"\nDépartement non existant !\n");
return; return;
} }
@ -228,7 +228,7 @@ void supprimerDep(VilleIUT* tiut[],int tlogi){
printf("\n\nEntrez le département à supprimer:"); printf("\n\nEntrez le département à supprimer:");
char dep[31]; char dep[31];
scanf("%*c%s",&dep); scanf("%*c%s",&dep);
if(!existeDep(tiut->ldept,dep)){ if(!existeDep(v->ldept,dep)){
fprintf(stderr,"\nDépartement non existant !\n"); fprintf(stderr,"\nDépartement non existant !\n");
return; return;
} }
@ -268,7 +268,7 @@ void modifNomResponsable(VilleIUT* tiut[],int tlogi){
printf("\n\nEntrez le département à modifier:"); printf("\n\nEntrez le département à modifier:");
char dep[31]; char dep[31];
scanf("%*c%s",&dep); scanf("%*c%s",&dep);
if(!existeDep(tiut->ldept,dep)){ if(!existeDep(v->ldept,dep)){
fprintf(stderr,"\nDépartement non existant !\n"); fprintf(stderr,"\nDépartement non existant !\n");
return; return;
} }

@ -3,7 +3,7 @@
#include <errno.h> #include <errno.h>
#include "saeP2.h" #include "saeP2.h"
/*
candidat* LoadCandid(void) candidat* LoadCandid(void)
{ {
//J'ouvre le fichier //J'ouvre le fichier
@ -110,4 +110,4 @@ void RechercheCandidat(int ID, int nbcandidat, int tmax,candidat *tcand)
} }
//void gestionPhaseCandidatures(); A FAIRE. //void gestionPhaseCandidatures(); A FAIRE.*/

@ -1,3 +1,4 @@
/*
typedef struct typedef struct
{ {
char ville[31]; char ville[31];
@ -17,4 +18,4 @@ typedef struct
candidat* LoadCandid(void); candidat* LoadCandid(void);
//void gestionPhaseCandidatures(); A FAIRE. //void gestionPhaseCandidatures(); A FAIRE.*/

@ -9,10 +9,12 @@
int main(void) int main(void)
{ {
system("clear");
VilleIUT* tiut[36529]; VilleIUT* tiut[36529];
int tlogi=loadIUT(tiut); int tlogi=loadIUT(tiut), quit=0;
while(!quit){
menu(); menu();
char user; char user, confirmation;
scanf("%c",&user); scanf("%c",&user);
switch(user){ switch(user){
case 'C': case 'C':
@ -24,6 +26,13 @@ int main(void)
reset(); reset();
menuAdmin(tiut,tlogi); menuAdmin(tiut,tlogi);
reset(); reset();
break;
case 'Q':
printf("Êtes-vous sûr de vouloir quitter ? (Y pour continuer)\n\n");
scanf("%*c%c",&confirmation);
if(confirmation=='Y') quit=1;
system("clear");
}
} }
//save(); //save();
return 0; return 0;

Loading…
Cancel
Save