diff options
author | Pixel <Pixel> | 2001-04-28 21:40:25 +0000 |
---|---|---|
committer | Pixel <Pixel> | 2001-04-28 21:40:25 +0000 |
commit | 3b37a00a4be251f87e543d269489cb7a989425d5 (patch) | |
tree | 51aedcb4d1627743d6e240266c58a67cf6ae0d67 /include/hash.h | |
parent | ab778d7f896b16f3e6f2b068c2b34d219723002b (diff) |
Hop, gros bordel, plein de fichiers ajoutes et supprimes :)
Diffstat (limited to 'include/hash.h')
-rw-r--r-- | include/hash.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/include/hash.h b/include/hash.h new file mode 100644 index 0000000..4f40659 --- /dev/null +++ b/include/hash.h @@ -0,0 +1,41 @@ +#ifndef __HASH_H__ +#define __HASH_H__ + +#define TAILLECHAINEHACHAGE (26*2+1) + +typedef void *_TypeVariable; + +typedef struct { + char *NomVar; + _TypeVariable Variable; +} _Element; + +typedef struct _LstChn { + _Element Elem; + struct _LstChn *Suivant; +} *_ListeChaine; + +typedef _ListeChaine *_TableauVariable; + +/* Initialise une table de hachage */ +int Initialise(_TableauVariable * t); + +/* Crée un élement à insérer dans la table de hachage */ +_Element CreerElement(char *Nom, _TypeVariable Var); + +/* Insert un element(Nom de la variable,variable) dans une table de hachage + la fonction renvoit 0 en cas d'erreur */ +char InsererVarDansTab(_TableauVariable * t, _Element e); + +/* Renvoie la variable de la table de hachage qui porte le nom Nom + si la variable n'existe pas trouve est égal à 0 */ +_TypeVariable NomVarToVar(char *Nom, _TableauVariable t, char *trouve); + +/* Supprime la variable de nom Nom + la fonction renvoit 0 en cas d'erreur */ +char SupprimerDansTab(_TableauVariable * t, char *Nom); + +/* Detruit le tableau */ +void DetruitTab(_TableauVariable * t); + +#endif |