Blame view

tree.h 519 Bytes
f7d9ccda   mertz   ajout_libtree
1
2
  #include <stdio.h>
  #include <stdlib.h>
284154ca   Thorsieger   gestion des accents
3
4
  #include <wchar.h>
  #include <locale.h>
f7d9ccda   mertz   ajout_libtree
5
6
  
  typedef struct node {
284154ca   Thorsieger   gestion des accents
7
  	wchar_t val;
9cf06b18   mertz   debut_add_tree
8
9
10
          int fin;
          int nbr_fils;
  	struct node** fils;
f7d9ccda   mertz   ajout_libtree
11
12
  }Node, *PtNode, *Tree;
  
284154ca   Thorsieger   gestion des accents
13
  void cons_tree(struct node **, wchar_t);
f7d9ccda   mertz   ajout_libtree
14
15
16
17
18
  
  void mk_empty_tree(struct node **);
  
  int is_leaf(struct node *);
  
284154ca   Thorsieger   gestion des accents
19
  void add(struct node **, wchar_t* ,int ,int);
f7d9ccda   mertz   ajout_libtree
20
  
03168857   mertz   create tree op
21
  void load_tree(FILE *, struct node **);
f7d9ccda   mertz   ajout_libtree
22
  
7ab3be6b   Thorsieger   debut free
23
24
25
  void free_tree(struct node *);
  
  void free_dico(struct node **);
76053da1   Thorsieger   update des fichiers
26
27
28
29
  
  int find();
  
  int find_mot(struct node **,wchar_t*,int,int);