2 * This file is part of the Alliance CAD System
3 * Copyright (C) Laboratoire LIP6 - Département ASIM
4 * Universite Pierre et Marie Curie
6 * Home page : http://www-asim.lip6.fr/alliance/
7 * E-mail support : mailto:alliance-support@asim.lip6.fr
9 * This library is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU Library General Public License as published
11 * by the Free Software Foundation; either version 2 of the License, or (at
12 * your option) any later version.
14 * Alliance VLSI CAD System is distributed in the hope that it will be
15 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
17 * Public License for more details.
19 * You should have received a copy of the GNU General Public License along
20 * with the GNU C Library; see the file COPYING. If not, write to the Free
21 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 /*******************************************************************************
27 * Tool : Spice parser / driver v 7.00 *
28 * Author(s) : Gregoire AVOT *
29 * Updates : March, 18th 1998 *
31 *******************************************************************************/
36 typedef struct shashelem
38 struct shashelem
*suivant
;
45 int entree
; /* Nombre d'entrées dans la table de hash 2^n */
46 int nbelem
; /* Nombre d'element dans les liste */
47 hashelem
**table
; /* informations dans la table */
48 hashelem
*tete
; /* Blocs libre pour allocation par tat */
49 chain_list
*libere
; /* Pointeurs pour les libérations */
52 thash
* creatthash
__P(( ));
54 Crée une nouvelle table de hash. Le parametre d'entrée est le nombre
55 d'entrees de la nouvelle table
58 void freethash
__P(( thash
*pt
));
60 Libère une table de hash précédement allouée
63 void addthashelem
__P(( char *nouveau
, void *ptr
, thash
*table
));
65 Ajoute un élément dans la table de hash. Le premier parametre est
66 la chaine identifiant l'élément, le second est l'élément que l'on place dans
67 la table et finalement le troisième est l'élément vers la table de hash
70 void* getthashelem
__P(( char *elem
, thash
*table
, int *status
));
72 Récupère un élément dans la table de hash à partir de son identificateur
73 passé en premier paramètre. Le second argument est la table de hash sur laquelle
74 la recherche est effectuée. Si le troisième élément est différent de NULL,
75 la valeur 1 est plcée à cette adresse si l'élément est trouvé, 0 sinon. La
76 valeur renvoyée est celle de l'élément recherché.
79 int thashsignature
__P(( char *c
, int l
));
84 void resizetable
__P(( thash
*, int ));
85 hashelem
* nouvhashelem
__P(( thash
* ));
86 void liberehashelem
__P(( thash
*, hashelem
* ));