diff --git a/arbre.c b/arbre.c index ac2440b..caae66c 100644 --- a/arbre.c +++ b/arbre.c @@ -59,7 +59,6 @@ void ajout_mot(struct arbre **arbrecourant,char *mot,int i){ monarbre->suite[j]=NULL; } *arbrecourant=monarbre; -// printf("%c\n",(*pt_arbre)->val); } i++; ajout_mot(&((*arbrecourant)->suite[calculcase(mot[i])]),mot,i); @@ -72,20 +71,7 @@ void charger_arbre(FILE *fp, struct dico **ppt_dico) ini_dico(*ppt_dico); while (fscanf(fp, "%s", mot)==1){ printf("mot:%s\n\n\n",mot); - printf("\nlettre:%c\n",mot[0]); - /* - if( (*ppt_dico)->alpha[calculcase(mot[0])]==NULL){ - printf("creation 1er niveau\n"); - Arbre *arbrecourant=malloc(sizeof(struct arbre)); - arbrecourant->val=mot[0]; - arbrecourant->finmot=false; - for(int j=0;j<26;j++){ - arbrecourant->suite[j]=NULL; - } - (*ppt_dico)->alpha[calculcase(mot[0])]=arbrecourant; - }*/ - //int index=1; ajout_mot(&((*ppt_dico)->alpha[calculcase(mot[0])]),mot,0); } return ; @@ -99,7 +85,6 @@ void free_arbre(struct arbre *pt_arbre){ for(int i=0;i<26;i++){ free_arbre((pt_arbre->suite[i])); } - printf("lettre:%c\n",pt_arbre->val); free(pt_arbre); } @@ -119,6 +104,7 @@ void affiche_arbre(struct arbre *arbre){ if(arbre==NULL){ return ; } + printf("%c:",arbre->val); for(int i=0;i<26;i++){ affiche_arbre(arbre->suite[i]); } -- libgit2 0.21.2