Blame view

arbre.h 793 Bytes
506c3ab8   rsSimonin   creation .h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  #include <stdio.h>
  #include <stdlib.h>
  #include <stdbool.h>
  #include <string.h>
  #define TAILLE 27
  
  
  
  typedef struct arbre{
      char val;
      struct arbre *suite[TAILLE];
      bool finmot; //1 si fin de mot
  }Arbre;
  
  typedef struct dico {
      Arbre *alpha[TAILLE];
  }Dico;
  
  
  int calculcase(char c);
  
f1a909b7   rsimonin   afficahge
22
  bool mot_existe(struct arbre *monarbre,char *mot,int i);
506c3ab8   rsSimonin   creation .h
23
24
25
26
27
28
29
  
  void ini_dico(struct dico *pt_dico);
  
  void creation_arbre(Arbre **ppt_arbre,char c);
      
  void ajout_mot(struct arbre **arbrecourant,char *mot,int i);
  
f1a909b7   rsimonin   afficahge
30
  void charger_dico(FILE *fp, struct dico **ppt_dico);
506c3ab8   rsSimonin   creation .h
31
32
33
34
35
36
37
38
39
40
  
  
  void free_arbre(struct arbre *pt_arbre);
  
  void free_dico(struct dico *pt_dico);
  
  void affiche_arbre(struct arbre *arbre);
  
  void affiche_dico(struct dico *dico);
  
f1a909b7   rsimonin   afficahge
41
  void analyse_fichier(FILE *fp,Dico *pt_dico, int *nb_t, int *nb_f);
506c3ab8   rsSimonin   creation .h