Blame view

arbre.h 706 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
22
23
  #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);
  
  bool est_vide(struct arbre *arbre);
  
506c3ab8   rsSimonin   creation .h
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
  
  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);
  
  void charger_arbre(FILE *fp, struct dico **ppt_dico);
  
  
  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);