diff --git a/arbre.c b/arbre.c index 5b27704..7aac3ea 100644 --- a/arbre.c +++ b/arbre.c @@ -31,11 +31,6 @@ bool fin_de_mot(struct arbre *arbre) { return arbre->finmot; } -void initialise_dico(struct arbre * pt_arbre,char val){ - - - -} void cons_dico(struct dico **pt_dico,char val){ Dico *mondico=malloc(sizeof(struct dico)); @@ -69,13 +64,13 @@ void ini_dico(struct dico * pt_dico){ void ajout_mot(struct dico *pt_dico,char mot[]){ int i=0; while(mot[i]!='\0'){ - if (pt_dico->alpha[val[i]-'a']==NULL){ + if (pt_dico->alpha[mot[i]-'a']==NULL){ cons_arbre(&(pt_dico->alpha[mot[i]-'a']),mot[i]); } i++; } - pt_dico->alpha[fscval[i]-'a']->finmot=true; + pt_dico->alpha[mot[i]-'a']->finmot=true; } @@ -83,11 +78,8 @@ void charger_arbre(FILE *fp, struct dico **pt_dico) { char mot[20]; while (fscanf(fp, "%s", mot)!=EOF){ ajout_mot(*pt_dico,mot); - - // ------------------------------------------------------------- } return ; - //Tip: use while(fscanf(..) ...) } -- libgit2 0.21.2