-
Notifications
You must be signed in to change notification settings - Fork 0
/
dictionnaire.h
32 lines (29 loc) · 1.15 KB
/
dictionnaire.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef __DICTIONNAIRE_H_
#define __DICTIONNAIRE_H_
#define NB_BITS 10
#define MAX 1024
typedef struct noeud{
int code;
unsigned char lettre;
struct noeud* frere;
struct noeud* fils;
struct noeud* pere;
} t_noeud, *t_ptr_noeud;
t_ptr_noeud table[MAX];
int code_noeud(t_ptr_noeud noeud);
unsigned char lettre_noeud(t_ptr_noeud noeud);
t_ptr_noeud frere_noeud(t_ptr_noeud noeud);
t_ptr_noeud fils_noeud(t_ptr_noeud noeud);
t_ptr_noeud pere_noeud(t_ptr_noeud noeud);
void assigner_code(t_ptr_noeud noeud, int initialise);
void modifier_lettre(t_ptr_noeud noeud,unsigned char lettre);
t_ptr_noeud cree_noeud(unsigned char lettre, t_ptr_noeud frere, t_ptr_noeud fils, t_ptr_noeud pere, int initialise);
void ajouter_fils(t_ptr_noeud pere, t_ptr_noeud fils);
void ajouter_frere(t_ptr_noeud pere, t_ptr_noeud frere);
t_ptr_noeud initialiser_dictionnaire();
int rechercher_caractere(t_ptr_noeud dico,unsigned char* chaine);
unsigned char* rechercher_mot(t_ptr_noeud dico, int code);
void afficher_dictionnaire(t_ptr_noeud dico);
t_ptr_noeud ajout_plusieurs_fils(t_ptr_noeud pere,unsigned char* chaine);
t_ptr_noeud ajout_dico(t_ptr_noeud dico,unsigned char* chaine);
#endif