diff --git a/SAE2 b/SAE2 index 92ce268..41f09ef 100755 Binary files a/SAE2 and b/SAE2 differ diff --git a/obj/charge.o b/obj/charge.o index 482e0c5..c50048f 100644 Binary files a/obj/charge.o and b/obj/charge.o differ diff --git a/obj/sort.o b/obj/sort.o index dabb813..781855c 100644 Binary files a/obj/sort.o and b/obj/sort.o differ diff --git a/srcs/structures.c b/srcs/structures.c index 5153e2c..1657646 100644 --- a/srcs/structures.c +++ b/srcs/structures.c @@ -149,7 +149,7 @@ Tache* defiler(ListeAttente **file) *file = premierMaillon->nxt; free(premierMaillon); - return tache; + return (tache); } /*---------------calculs----------------*/ @@ -209,6 +209,17 @@ Liste lstSucc(char travaux[], Precedence prec[], int tlog) return succ; } +// Fonction pour trouver une tâche par son nom +Tache* trouverTache(Tache **tabTache, int nbTaches, char *nom) +{ + int i; + + for (int i = 0; i < nbTaches; i++) + if (strcmp(tabTache[i]->tache, nom) == 0) + return tabTache[i]; + return (NULL); +} + /*---------------affichages--------------*/ // Affiche les details d'un devis