Fix segfault

master
Jade VAN BRABANDT 3 years ago
parent f015f76cb0
commit c17ca973e3

Binary file not shown.

@ -0,0 +1,5 @@
A
6
Yann

@ -7,7 +7,7 @@ prog :
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
gcc -g -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 :
make -C src doc

@ -1,7 +1,7 @@
all : saeP1.o
saeP1.o : saeP1.c saeP1.h
gcc -Wall -c saeP1.c
gcc -Wall -Werror -Wextra -g -c saeP1.c
doc : saeP1.h
doxygen

@ -23,6 +23,10 @@ void menuUser(VilleIUT* lvIUT[],int tlogi)
printf("2 : Afficher tout les départements de chaques IUT\n");
printf("3 : Afficher le nombre de place en première année d'un IUT précis avec un département précis\n");
printf("4 : Rechercher les IUTs possèdant un département précis.\n");
/*if(CandidOpen)
{
printf("5 : Candidater");
}*/
printf("9 : Revenir à l'écran de sélection du profil.\n\n");
printf("#--------------------------------------------------------------------#\n\n");
printf("Choisissez l'action que vous voulez exécuter : ");
@ -45,6 +49,10 @@ void menuUser(VilleIUT* lvIUT[],int tlogi)
SearchIUTFromDep(lvIUT,tlogi);
reset();
break;
case 5:
//candidater(......);
reset();
break;
case 9:
quit=1;
reset();
@ -79,18 +87,18 @@ void SearchPlaceFromDepInIUT(VilleIUT* lvIUT[],int tlogi)
int boolF=0, i;
printf("Entrez le nom de la ville contenant le département recherché :\n");
scanf("%s",sVille);
printf("%d",tlogi);
for (i=0;i<tlogi;++i)
{
if (!strcmp(lvIUT[i]->Ville,sVille))
{
printf("Département y étant disponible :\n");
MaillonDep* MaillonAct=lvIUT[i]->ldept;
printf("Test");
while (MaillonAct!=NULL) printf("%s",MaillonAct->departement);
printf("Test");
while (MaillonAct!=NULL)
{
printf("\t-%s\n",MaillonAct->departement);
MaillonAct=MaillonAct->suivant;
}
boolF=1;
MaillonAct=MaillonAct->suivant;
break;
}
}
@ -105,7 +113,7 @@ void SearchPlaceFromDepInIUT(VilleIUT* lvIUT[],int tlogi)
while (MaillonAct!=NULL)
{
if(strcmp(MaillonAct->departement,sDep))
if(!strcmp(MaillonAct->departement,sDep))
{
printf("Nombre de place : %d\n",MaillonAct->nbp);
return;
@ -120,6 +128,7 @@ void SearchIUTFromDep(VilleIUT* lvIUT[],int tlogi)
char sDep[31];
printf("Merci de renseignez le département dont vous cherchez les IUTs :\n");
scanf("%s",sDep);
printf("Tlogi : %d",tlogi);
for (int i=0;i<tlogi;++i)
{

@ -154,5 +154,10 @@ void ListeCandidat(int nbcandidat,candidat *tcandidat)
printf("Candidat non trouvé");
}
//void gestionPhaseCandidatures(); A FAIRE.
void Candidater()
{
}
//void gestionPhaseCandidatures(); A FAIRE.

@ -18,7 +18,7 @@ typedef struct
}candidat;
candidat* LoadCandid(void);
void SaveCandid(int nbcandidat,candidat *tcandidat)
void SaveCandid(int nbcandidat,candidat *tcandidat);
void RechercheCandidat(int ID, int nbcandidat,candidat* tcandidat);
void ListeCandidat(int nbcandidat,candidat *tcandidat);
//void gestionPhaseCandidatures(); A FAIRE.

Loading…
Cancel
Save