|
|
|
@ -195,14 +195,24 @@ int nombrePred(char travaux[], Precedence prec[], int tlog)
|
|
|
|
|
return nbPred;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int max(int a, int b)
|
|
|
|
|
{
|
|
|
|
|
if (a > b)
|
|
|
|
|
return (a);
|
|
|
|
|
else
|
|
|
|
|
return (b);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*--------------informations------------*/
|
|
|
|
|
|
|
|
|
|
// Retourne une liste des successeurs pour un travail donne
|
|
|
|
|
Liste lstSucc(char travaux[], Precedence prec[], int tlog)
|
|
|
|
|
{
|
|
|
|
|
trace("lstSucc");
|
|
|
|
|
Liste succ = newListe();
|
|
|
|
|
int i;
|
|
|
|
|
Liste succ;
|
|
|
|
|
|
|
|
|
|
succ = newListe();
|
|
|
|
|
for (i=0; i<tlog; i++)
|
|
|
|
|
if(strcmp(travaux, prec[i].travauxPrec)==0)
|
|
|
|
|
succ=insertSucc(succ, prec[i].travauxSucc);
|
|
|
|
@ -214,7 +224,7 @@ Tache* trouverTache(Tache **tabTache, int nbTaches, char *nom)
|
|
|
|
|
{
|
|
|
|
|
int i;
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < nbTaches; i++)
|
|
|
|
|
for (i = 0; i < nbTaches; i++)
|
|
|
|
|
if (strcmp(tabTache[i]->tache, nom) == 0)
|
|
|
|
|
return tabTache[i];
|
|
|
|
|
return (NULL);
|
|
|
|
|