|
|
@ -853,6 +853,7 @@ void enregistrement(VilleIUT *tiut[],int tLog) /* Permet l'enregistrement du tab
|
|
|
|
// ###########################################################################################
|
|
|
|
// ###########################################################################################
|
|
|
|
// ###########################################################################################
|
|
|
|
// ###########################################################################################
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/************************************** Fonctions de Chargement ********************************************/
|
|
|
|
/************************************** Fonctions de Chargement ********************************************/
|
|
|
|
/****************************************** Et de sauvegarde*************************************************/
|
|
|
|
/****************************************** Et de sauvegarde*************************************************/
|
|
|
|
/************************************************************************************************************/
|
|
|
|
/************************************************************************************************************/
|
|
|
@ -1022,6 +1023,27 @@ void afficherCandDep(Candidat *tCand[], int tMax) /* Fonction permettant d'affic
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void afficherCandidatsParCatégorie(Candidat *tCand[], char ville[], char dep[], int tMax)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
int categ, i, pos, trouve;
|
|
|
|
|
|
|
|
printf("Quelle catégorie de candidats souhaitez-vous afficher ? (admis = 1 / attente = 2)\nSaisie : ");
|
|
|
|
|
|
|
|
saisie("%d%*c", &categ);
|
|
|
|
|
|
|
|
printf("\n");
|
|
|
|
|
|
|
|
for(i = 0; i < tMax; i++)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
pos = rechercherChoix(tCand[i]->tChoix, nombreChoix, ville, dep, &trouve);
|
|
|
|
|
|
|
|
if(trouve == 1)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if(tCand[i]->tChoix[pos]->decisionResp == categ)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
afficherCandidat(tCand[i]);
|
|
|
|
|
|
|
|
afficherChoix(tCand[i]->tChoix[pos]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/************************************ Fonctions de réallocation *********************************************/
|
|
|
|
/************************************ Fonctions de réallocation *********************************************/
|
|
|
|
/************************************************************************************************************/
|
|
|
|
/************************************************************************************************************/
|
|
|
|
/************************************************************************************************************/
|
|
|
|
/************************************************************************************************************/
|
|
|
@ -1070,6 +1092,13 @@ int plusGrandCand(Candidat *tCand[], int tMax) /* Fonction permettant de trouver
|
|
|
|
int maxi = 0, i;
|
|
|
|
int maxi = 0, i;
|
|
|
|
for(i = 1; i < tMax; i++)
|
|
|
|
for(i = 1; i < tMax; i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
if(strcmp(tCand[i]->nom, tCand[maxi]->nom) == 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if(strcmp(tCand[i]->prenom, tCand[maxi]->prenom) > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
maxi = i;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
if(strcmp(tCand[i]->nom, tCand[maxi]->nom) > 0)
|
|
|
|
if(strcmp(tCand[i]->nom, tCand[maxi]->nom) > 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
maxi = i;
|
|
|
|
maxi = i;
|
|
|
@ -1674,7 +1703,7 @@ ListeCand rechercherCandListe(ListeCand lCand, int numeroC, int *trouve) /* Per
|
|
|
|
/************************************************************************************************************/
|
|
|
|
/************************************************************************************************************/
|
|
|
|
/************************************************************************************************************/
|
|
|
|
/************************************************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
void globale(void) /* Permet de gérer l'exécution du programme */
|
|
|
|
void globale2(void) /* Permet de gérer l'exécution du programme */
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int tMax, pos, trouve, i = 0, j, mini = i;
|
|
|
|
int tMax, pos, trouve, i = 0, j, mini = i;
|
|
|
|
Candidat **tCand, c, **aux, *temp; /* Initialisation du tableau de candidats */
|
|
|
|
Candidat **tCand, c, **aux, *temp; /* Initialisation du tableau de candidats */
|
|
|
@ -1703,7 +1732,7 @@ void globale(void) /* Permet de gérer l'exécution du programme */
|
|
|
|
sauvegarder(tCand, tMax); /* Sauvegarde du tableau de candidats */
|
|
|
|
sauvegarder(tCand, tMax); /* Sauvegarde du tableau de candidats */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void menuCandidat(Candidat *tCand[], int tMax) /* Fonction affichant un menu adapté pour un candidat */
|
|
|
|
void menuCandidat2(Candidat *tCand[], int tMax) /* Fonction affichant un menu adapté pour un candidat */
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int pos,trouve, saisie, i, numeroC;
|
|
|
|
int pos,trouve, saisie, i, numeroC;
|
|
|
|
system("clear");
|
|
|
|
system("clear");
|
|
|
|