From 34d66d1dd606e6283584ca3900d783269effa677 Mon Sep 17 00:00:00 2001 From: mertz Date: Tue, 23 Apr 2019 10:00:27 +0200 Subject: [PATCH] ajout du toLowerCase --- dico_test | 7 +++---- main.c | 3 +-- tree.c | 8 ++++---- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/dico_test b/dico_test index 8a43220..a25ef39 100644 --- a/dico_test +++ b/dico_test @@ -1,7 +1,6 @@ -a +A ba -aa -ab +aa' abc c -d \ No newline at end of file +d' \ No newline at end of file diff --git a/main.c b/main.c index aa5451d..34b5194 100644 --- a/main.c +++ b/main.c @@ -18,9 +18,8 @@ int main() printf("Loading done!\n"); - char mot[50];// = "aardvark"; + char mot[50]; int taille; - //mot = "arabesque"; taille = 8; scanf("%s",mot); scanf("%d",&taille); diff --git a/tree.c b/tree.c index 9eafce6..058934c 100644 --- a/tree.c +++ b/tree.c @@ -76,10 +76,10 @@ void load_tree(FILE *fp, struct node **tab_ptr_tree) while(fscanf(fp, "%s",val)==1) { int taille = size(val); - //toLowerCase(val,taille); - if(val[0]<97)val[0]+=32; - val[0]-=97; - add(tab_ptr_tree,val,taille,(int)val[0]); + toLowerCase(val,taille); + //if(val[0]<97)val[0]+=32; + //val[0]-=97; + add(tab_ptr_tree,val,taille,(int)val[0]-97); } //On peut tester la bonne ou mauvaise terminaison de la lecture -- libgit2 0.21.2