diff --git a/.nfs00000000071517970000000f b/.nfs00000000071517970000000f new file mode 100755 index 0000000..9f84114 Binary files /dev/null and b/.nfs00000000071517970000000f differ diff --git a/Input b/Input new file mode 100644 index 0000000..524f7e6 --- /dev/null +++ b/Input @@ -0,0 +1,5 @@ +A + + +6 +Yann diff --git a/Makefile b/Makefile index 3b48226..1295db6 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/src/partie1/Makefile b/src/partie1/Makefile index 7b12495..b677515 100644 --- a/src/partie1/Makefile +++ b/src/partie1/Makefile @@ -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 diff --git a/src/partie1/saeP1.c b/src/partie1/saeP1.c index 8afffcb..dd962be 100644 --- a/src/partie1/saeP1.c +++ b/src/partie1/saeP1.c @@ -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;iVille,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