Commit 34d66d1dd606e6283584ca3900d783269effa677

Authored by mertz
1 parent aeb78bdf

ajout du toLowerCase

Showing 3 changed files with 8 additions and 10 deletions   Show diff stats
dico_test
1   -a
  1 +A
2 2 ba
3   -aa
4   -ab
  3 +aa'
5 4 abc
6 5 c
7   -d
8 6 \ No newline at end of file
  7 +d'
9 8 \ No newline at end of file
... ...
... ... @@ -18,9 +18,8 @@ int main()
18 18  
19 19 printf("Loading done!\n");
20 20  
21   - char mot[50];// = "aardvark";
  21 + char mot[50];
22 22 int taille;
23   - //mot = "arabesque";
24 23 taille = 8;
25 24 scanf("%s",mot);
26 25 scanf("%d",&taille);
... ...
... ... @@ -76,10 +76,10 @@ void load_tree(FILE *fp, struct node **tab_ptr_tree)
76 76 while(fscanf(fp, "%s",val)==1)
77 77 {
78 78 int taille = size(val);
79   - //toLowerCase(val,taille);
80   - if(val[0]<97)val[0]+=32;
81   - val[0]-=97;
82   - add(tab_ptr_tree,val,taille,(int)val[0]);
  79 + toLowerCase(val,taille);
  80 + //if(val[0]<97)val[0]+=32;
  81 + //val[0]-=97;
  82 + add(tab_ptr_tree,val,taille,(int)val[0]-97);
83 83 }
84 84  
85 85 //On peut tester la bonne ou mauvaise terminaison de la lecture
... ...