1 /* 2 * This file is part of the Alliance CAD System 3 * Copyright (C) Laboratoire LIP6 - D�partement ASIM 4 * Universite Pierre et Marie Curie 5 * 6 * Home page : http://www-asim.lip6.fr/alliance/ 7 * E-mail : mailto:alliance-users@asim.lip6.fr 8 * 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. 13 * 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. 18 * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 22 */ 23 24 25 /******************************************************************************* 26 * * 27 * Tool : Spice parser / driver v 7.00 * 28 * Author(s) : Gregoire AVOT * 29 * Updates : March, 18th 1998 * 30 * * 31 *******************************************************************************/ 32 33 #ifndef spi_int 34 #define spi_int 35 36 typedef struct st_tableint 37 { 38 int index; 39 void *data; 40 struct st_tableint *down; 41 } tableint; 42 43 /* Lors qu'on ajoute quelque chose dans la liste, le pointeur DATA ne doit pas 44 etre NULL, cette valeur etant utilis�e en interne sur ce champs */ 45 46 #define SPI_TABLEINTMAX 256 47 #define SPI_TABLEINTMASK 0x000000FF 48 49 tableint* creattableint __P(()); 50 /* Cr�e une nouvelle table */ 51 52 int settableint __P(( tableint *table, int value, void *data )); 53 /* Ajoute un �l�ment dans la table. Renvoie 1 si l'�l�ment est nouveau, 54 0 sinon (l'�l�ment pr�c�dent est alors remplac�) */ 55 56 void* tsttableint __P(( tableint *table, int value )); 57 /* Renvoie l'�l�ment recherch� par la valeur */ 58 59 void freetableint __P(( tableint *table )); 60 /* Lib�re la table */ 61 62 int scanint __P(( tableint *table, int n )); 63 /* Parcour des �l�ments m�moris�s dans la table. On commence par mettre 64 l'entier d'entr�e � 0, puis pour les elements suivant on met la valeur 65 du noeud retourn� pr�c�dement. La fin est indiqu� par un retour 0 */ 66 67 68 #endif 69