Abe Oddworld
This commit is contained in:
parent
76a141c999
commit
30490e9d35
|
@ -0,0 +1 @@
|
|||
SUBDIRS = src
|
|
@ -0,0 +1,45 @@
|
|||
dnl
|
||||
/*
|
||||
dnl This file is part of the Alliance CAD System
|
||||
dnl Copyright (C) Laboratoire LIP6 - Département ASIM
|
||||
dnl Universite Pierre et Marie Curie
|
||||
dnl
|
||||
dnl Home page : http://www-asim.lip6.fr/alliance/
|
||||
dnl E-mail support : mailto:alliance-support@asim.lip6.fr
|
||||
dnl
|
||||
dnl This library is free software; you can redistribute it and/or modify it
|
||||
dnl under the terms of the GNU Library General Public License as published
|
||||
dnl by the Free Software Foundation; either version 2 of the License, or (at
|
||||
dnl your option) any later version.
|
||||
dnl
|
||||
dnl Alliance VLSI CAD System is distributed in the hope that it will be
|
||||
dnl useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
dnl Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License along
|
||||
dnl with the GNU C Library; see the file COPYING. If not, write to the Free
|
||||
dnl Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
dnl
|
||||
dnl Purpose : Auto stuffing Alliance
|
||||
dnl Almost ten years since I wrote this stuff, I just can't
|
||||
dnl believe it
|
||||
dnl Date : 01/02/2002
|
||||
dnl Author : Frederic Petrot <Frederic.Petrot@lip6.fr>
|
||||
dnl $Id: configure.in,v 1.1 2002/03/20 13:18:21 ludo Exp $
|
||||
dnl
|
||||
dnl
|
||||
AC_INIT(src/abe.h)
|
||||
AM_INIT_AUTOMAKE(abe, 2.1)
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_CC
|
||||
AC_HEADER_STDC
|
||||
AC_C_CONST
|
||||
AC_PROG_RANLIB
|
||||
|
||||
AM_ALLIANCE
|
||||
|
||||
AC_OUTPUT([
|
||||
Makefile
|
||||
src/Makefile
|
||||
])
|
|
@ -0,0 +1,7 @@
|
|||
CFLAGS = @CFLAGS@ \
|
||||
-DALLIANCE_TOP=\"${ALLIANCE_TOP}\"
|
||||
lib_LIBRARIES = libAbe.a
|
||||
include_HEADERS = abe.h
|
||||
libAbe_a_SOURCES = \
|
||||
abe.h beh_del.c beh_error.c beh_getgenva.c beh_rmv.c beh_view.c \
|
||||
beh_add.c beh_dict.c beh_fre.c beh_message.c beh_toolbug.c
|
|
@ -0,0 +1,321 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : abe201.h */
|
||||
/* date : Feb 15 1995 */
|
||||
/* version : v201 */
|
||||
/* contents : defines and structure definitions used in BEH library */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
#ifndef ABE_BEHDEF
|
||||
#define ABE_BEHDEF
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* defines */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
#define BEH_GENERIC 203698 /* generic ptype code */
|
||||
#define BEH_STABLE 0x01 /* description used STABLE attribute */
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* structure definitions */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
struct beden /* dictionary entry point */
|
||||
{
|
||||
struct beden *NEXT; /* next entry */
|
||||
struct bedrd *DATA; /* data */
|
||||
char *KEY; /* key */
|
||||
};
|
||||
|
||||
struct bedrd /* dictionary record */
|
||||
{
|
||||
struct bedrd *NEXT; /* next record */
|
||||
char *KEY; /* context key */
|
||||
short FD0_VAL; /* data field */
|
||||
short FD1_VAL; /* data field */
|
||||
short FD2_VAL; /* data field */
|
||||
short FD3_VAL; /* data field */
|
||||
short FD4_VAL; /* data field */
|
||||
short FD5_VAL; /* data field */
|
||||
short FD6_VAL; /* data field */
|
||||
long PNT_VAL; /* data field */
|
||||
};
|
||||
|
||||
typedef struct befig /* behaviour figure */
|
||||
{
|
||||
struct befig *NEXT; /* next figure */
|
||||
char *NAME; /* figure's name */
|
||||
struct bereg *BEREG; /* list of internal signals (REGISTER) */
|
||||
struct bemsg *BEMSG; /* list of assert instructions */
|
||||
struct berin *BERIN; /* list of inputs (registers and ports) */
|
||||
struct beout *BEOUT; /* list of output ports */
|
||||
struct bebus *BEBUS; /* list of output ports (BUS) */
|
||||
struct beaux *BEAUX; /* list of internal signals */
|
||||
struct beaux *BEDLY; /* internal signals used for 'DELAYED */
|
||||
struct bebux *BEBUX; /* list of internal signals (BUS) */
|
||||
struct bepor *BEPOR; /* list of figure's port built in the */
|
||||
/* reverse order of the port clause */
|
||||
struct begen *BEGEN; /* list of generic data */
|
||||
struct bepgm *BEPGM; /* list of pragmas (new field !!) */
|
||||
|
||||
struct bddcircuit *CIRCUI; /* Circuit pointer used during ABL to */
|
||||
/* BDD transformation */
|
||||
void *USER; /* reserved for user's applications */
|
||||
long FLAGS;
|
||||
char ERRFLG; /* error flag */
|
||||
char TYPE; /* description type (not used) */
|
||||
}
|
||||
befig_list;
|
||||
|
||||
typedef struct bereg /* register */
|
||||
{
|
||||
struct bereg *NEXT; /* next register */
|
||||
char *NAME; /* register's name */
|
||||
struct biabl *BIABL; /* list of drivers (ABL) */
|
||||
struct binode *BINODE; /* list of drivers (BDD) */
|
||||
void *USER;
|
||||
long FLAGS;
|
||||
}
|
||||
bereg_list;
|
||||
|
||||
typedef struct bemsg /* assert instruction */
|
||||
{
|
||||
struct bemsg *NEXT; /* next assertion */
|
||||
char LEVEL; /* severity level of the assertion */
|
||||
char *LABEL; /* instruction's label */
|
||||
char *MESSAGE; /* assertion's message */
|
||||
ablexpr *ABL; /* assertion's condition (ABL) */
|
||||
struct bddnode *NODE; /* assertion's condition (BDD) */
|
||||
void *USER;
|
||||
long FLAGS;
|
||||
}
|
||||
bemsg_list;
|
||||
|
||||
typedef struct beout /* output port */
|
||||
{
|
||||
struct beout *NEXT; /* next output */
|
||||
char *NAME; /* port's name */
|
||||
ablexpr *ABL; /* port's equation (ABL) */
|
||||
struct bddnode *NODE; /* port's equation (BDD) */
|
||||
void *USER;
|
||||
long FLAGS;
|
||||
}
|
||||
beout_list;
|
||||
|
||||
typedef struct bebus /* output port (BUS) */
|
||||
{
|
||||
struct bebus *NEXT; /* next bus port */
|
||||
char *NAME; /* port's name */
|
||||
struct biabl *BIABL; /* list of drivers (ABL) */
|
||||
struct binode *BINODE; /* list of drivers (BDD) */
|
||||
char TYPE; /* port's type : W or M */
|
||||
void *USER;
|
||||
long FLAGS;
|
||||
}
|
||||
bebus_list;
|
||||
|
||||
typedef struct beaux /* auxiliary signal */
|
||||
{
|
||||
struct beaux *NEXT; /* next signal */
|
||||
char *NAME; /* signal's name */
|
||||
ablexpr *ABL; /* signal's equation (ABL) */
|
||||
struct bddnode *NODE; /* signal's equation (BDD) */
|
||||
void *USER;
|
||||
long FLAGS;
|
||||
}
|
||||
beaux_list;
|
||||
|
||||
typedef struct bebux /* internal signal (BUS) */
|
||||
{
|
||||
struct bebux *NEXT; /* next signal */
|
||||
char *NAME; /* signal's name */
|
||||
struct biabl *BIABL; /* list of drivers (ABL) */
|
||||
struct binode *BINODE; /* list of drivers (BDD) */
|
||||
char TYPE; /* signal's type : W or M */
|
||||
void *USER;
|
||||
long FLAGS;
|
||||
}
|
||||
bebux_list;
|
||||
|
||||
typedef struct bepor /* port */
|
||||
{
|
||||
struct bepor *NEXT; /* next port */
|
||||
char *NAME; /* port's name */
|
||||
char DIRECTION; /* port's mode (same as LOCON) */
|
||||
char TYPE; /* port's type (B, M or W) */
|
||||
void *USER;
|
||||
long FLAGS;
|
||||
}
|
||||
bepor_list;
|
||||
|
||||
typedef struct biabl /* couple of ABL */
|
||||
{
|
||||
struct biabl *NEXT; /* next couple */
|
||||
char *LABEL; /* driver's label */
|
||||
ablexpr *CNDABL; /* driver's connection condition (ABL) */
|
||||
ablexpr *VALABL; /* equation of driven value (ABL) */
|
||||
void *USER; /* user field */
|
||||
long FLAGS;
|
||||
}
|
||||
biabl_list;
|
||||
|
||||
typedef struct binode /* couple of BDD */
|
||||
{
|
||||
struct binode *NEXT; /* next figure */
|
||||
struct bddnode *CNDNODE; /* driver's connection condition (BDD) */
|
||||
struct bddnode *VALNODE; /* equation of driven value (BDD) */
|
||||
void *USER;
|
||||
long FLAGS;
|
||||
}
|
||||
binode_list;
|
||||
|
||||
typedef struct berin /* primary inputs */
|
||||
{
|
||||
struct berin *NEXT; /* next input */
|
||||
char *NAME; /* input's name */
|
||||
struct chain *OUT_REF; /* outputs which depends on this input */
|
||||
struct chain *BUS_REF; /* busses which depends on this input */
|
||||
struct chain *AUX_REF; /* aux sig. which depends on this input */
|
||||
struct chain *REG_REF; /* registers which depends on this input*/
|
||||
struct chain *BUX_REF; /* busses which depends on this input */
|
||||
struct chain *MSG_REF; /* messages which depends on this input */
|
||||
struct chain *DLY_REF; /* delayed internal signals depending ..*/
|
||||
void *USER;
|
||||
long FLAGS;
|
||||
}
|
||||
berin_list;
|
||||
|
||||
typedef struct begen /* generic */
|
||||
{
|
||||
struct begen *NEXT; /* next generic */
|
||||
char *NAME; /* generic`s name */
|
||||
char *TYPE; /* generic type`s name */
|
||||
void *VALUE; /* generic`s value */
|
||||
void *USER;
|
||||
long FLAGS;
|
||||
}
|
||||
begen_list;
|
||||
|
||||
typedef struct begex
|
||||
{
|
||||
struct chain *OPERAND; /* list of operands or NULL for term */
|
||||
unsigned int TERM ; /* operator or terminal's index */
|
||||
unsigned short TYPE ; /* expression's type index */
|
||||
}
|
||||
begex_list;
|
||||
|
||||
typedef struct bepgm /* pragma */
|
||||
{
|
||||
struct bepgm *NEXT; /* next pragma */
|
||||
char *TYPE; /* prgma's type */
|
||||
char *NAME; /* object's name */
|
||||
void *VALUE; /* prgma's content */
|
||||
void *USER;
|
||||
}
|
||||
bepgm_list;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* functions */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
extern struct beaux *beh_addbeaux ();
|
||||
extern struct bebux *beh_addbebux ();
|
||||
extern struct bebus *beh_addbebus ();
|
||||
extern struct befig *beh_addbefig ();
|
||||
extern struct begen *beh_addbegen ();
|
||||
extern struct bemsg *beh_addbemsg ();
|
||||
extern struct beout *beh_addbeout ();
|
||||
extern struct bepor *beh_addbepor ();
|
||||
extern struct bereg *beh_addbereg ();
|
||||
extern struct berin *beh_addberin ();
|
||||
extern struct bepgm *beh_addbepgm ();
|
||||
extern struct biabl *beh_addbiabl ();
|
||||
extern struct binode *beh_addbinode ();
|
||||
|
||||
extern struct beaux *beh_delbeaux ();
|
||||
extern struct bebux *beh_delbebux ();
|
||||
extern struct bebus *beh_delbebus ();
|
||||
extern struct befig *beh_delbefig ();
|
||||
extern struct begen *beh_delbegen ();
|
||||
extern struct bemsg *beh_delbemsg ();
|
||||
extern struct beout *beh_delbeout ();
|
||||
extern struct bepor *beh_delbepor ();
|
||||
extern struct bereg *beh_delbereg ();
|
||||
extern struct berin *beh_delberin ();
|
||||
extern struct bepgm *beh_delbepgm ();
|
||||
extern struct biabl *beh_delbiabl ();
|
||||
extern struct binode *beh_delbinode ();
|
||||
|
||||
extern void beh_frebeaux ();
|
||||
extern void beh_frebebux ();
|
||||
extern void beh_frebebus ();
|
||||
extern void beh_frebefig ();
|
||||
extern void beh_frebegen ();
|
||||
extern void beh_frebemsg ();
|
||||
extern void beh_frebeout ();
|
||||
extern void beh_frebepor ();
|
||||
extern void beh_frebereg ();
|
||||
extern void beh_freberin ();
|
||||
extern void beh_frebepgm ();
|
||||
extern void beh_frebiabl ();
|
||||
extern void beh_frebinode ();
|
||||
|
||||
extern void beh_viewbefig();
|
||||
extern void beh_viewbiabl();
|
||||
extern void beh_viewbereg();
|
||||
extern void beh_viewbebux();
|
||||
extern void beh_viewbebus();
|
||||
extern void beh_viewbeout();
|
||||
extern void beh_viewbeaux();
|
||||
extern void beh_viewbepor();
|
||||
|
||||
extern struct beaux *beh_rmvbeaux ();
|
||||
extern struct bebux *beh_rmvbebux ();
|
||||
extern struct bebus *beh_rmvbebus ();
|
||||
extern struct befig *beh_rmvbefig ();
|
||||
extern struct begen *beh_rmvbegen ();
|
||||
extern struct bemsg *beh_rmvbemsg ();
|
||||
extern struct beout *beh_rmvbeout ();
|
||||
extern struct bepor *beh_rmvbepor ();
|
||||
extern struct bereg *beh_rmvbereg ();
|
||||
extern struct berin *beh_rmvberin ();
|
||||
extern struct bepgm *beh_rmvbepgm ();
|
||||
|
||||
extern struct beden **beh_initab ();
|
||||
extern void beh_addtab ();
|
||||
extern long beh_chktab ();
|
||||
extern void beh_fretab ();
|
||||
|
||||
extern int beh_error ();
|
||||
extern void beh_message ();
|
||||
extern void beh_toolbug ();
|
||||
|
||||
#endif
|
|
@ -0,0 +1,540 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_addbeaux.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
#include <stdio.h>
|
||||
#include MUT_H
|
||||
#include AUT_H
|
||||
#include ABL_H
|
||||
#include ABE_H
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_addbeaux */
|
||||
/* description : create a BEAUX structure at the top the list */
|
||||
/* called func. : namealloc, autallocblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct beaux *beh_addbeaux (lastbeaux, name, abl_expr, bdd_expr)
|
||||
|
||||
struct beaux *lastbeaux; /* pointer on the last beaux structure */
|
||||
char *name; /* signal's name */
|
||||
struct chain *abl_expr; /* signal's expression (ABL) */
|
||||
struct bddnode *bdd_expr; /* signal's expression (BDD) */
|
||||
|
||||
{
|
||||
struct beaux *ptaux;
|
||||
|
||||
name = namealloc (name);
|
||||
|
||||
ptaux = (struct beaux *) autallocblock (sizeof(struct beaux));
|
||||
ptaux->NAME = name;
|
||||
ptaux->ABL = abl_expr;
|
||||
ptaux->NODE = bdd_expr;
|
||||
ptaux->NEXT = lastbeaux;
|
||||
|
||||
return (ptaux);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_addbebus.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_addbebus */
|
||||
/* description : create a BEBUS structure at the top the list */
|
||||
/* called func. : namealloc, autallocblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct bebus *beh_addbebus (lastbebus, name, biabl, binode, type)
|
||||
|
||||
struct bebus *lastbebus; /* pointer on the last bebus structure */
|
||||
char *name; /* port's name */
|
||||
struct biabl *biabl; /* port's drivers (ABL) */
|
||||
struct binode *binode; /* port's drivers (BDD) */
|
||||
char type; /* port type mark (M or W) */
|
||||
|
||||
{
|
||||
struct bebus *ptbus;
|
||||
|
||||
name = namealloc (name);
|
||||
|
||||
ptbus = (struct bebus *) autallocblock (sizeof(struct bebus));
|
||||
ptbus->NAME = name;
|
||||
ptbus->BIABL = biabl;
|
||||
ptbus->BINODE = binode;
|
||||
ptbus->TYPE = type;
|
||||
ptbus->NEXT = lastbebus;
|
||||
|
||||
return (ptbus);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_addbebux.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_addbebux */
|
||||
/* description : create a BEBUX structure at the top the list */
|
||||
/* called func. : namealloc, autallocblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct bebux *beh_addbebux (lastbebux, name, biabl, binode, type)
|
||||
|
||||
struct bebux *lastbebux; /* pointer on the last bebux structure */
|
||||
char *name; /* signal's name */
|
||||
struct biabl *biabl; /* signal's expression (ABL) */
|
||||
struct binode *binode; /* signal's expression (BDD) */
|
||||
char type; /* signal's type mark (M or W) */
|
||||
|
||||
{
|
||||
struct bebux *ptbux;
|
||||
|
||||
name = namealloc (name);
|
||||
|
||||
ptbux = (struct bebux *) autallocblock (sizeof(struct bebux));
|
||||
ptbux->NAME = name;
|
||||
ptbux->BIABL = biabl;
|
||||
ptbux->BINODE = binode;
|
||||
ptbux->TYPE = type;
|
||||
ptbux->NEXT = lastbebux;
|
||||
|
||||
return (ptbux);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_addbefig.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_addbefig */
|
||||
/* description : create an empty BEFIG structure at the top of the list*/
|
||||
/* The ABE_HEDFIG list is not modified. */
|
||||
/* called func. : namealloc, autallocblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct befig *beh_addbefig (lastbefig, name)
|
||||
|
||||
struct befig *lastbefig; /* pointer on the last befig structure */
|
||||
char *name; /* figure's name */
|
||||
|
||||
{
|
||||
struct befig *ptfig;
|
||||
|
||||
name = namealloc (name);
|
||||
|
||||
ptfig = (struct befig *) autallocblock (sizeof(struct befig));
|
||||
ptfig->NAME = name;
|
||||
ptfig->BEREG = NULL;
|
||||
ptfig->BEMSG = NULL;
|
||||
ptfig->BERIN = NULL;
|
||||
ptfig->BEOUT = NULL;
|
||||
ptfig->BEBUS = NULL;
|
||||
ptfig->BEAUX = NULL;
|
||||
ptfig->BEDLY = NULL;
|
||||
ptfig->BEBUX = NULL;
|
||||
ptfig->BEPOR = NULL;
|
||||
ptfig->CIRCUI = NULL;
|
||||
ptfig->USER = NULL;
|
||||
ptfig->BEGEN = NULL;
|
||||
ptfig->BEPGM = NULL;
|
||||
ptfig->ERRFLG = 0;
|
||||
ptfig->TYPE = 0;
|
||||
ptfig->NEXT = lastbefig;
|
||||
|
||||
return (ptfig);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_addbegen.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_addbegen */
|
||||
/* description : create a BEGEN structure at the top the list */
|
||||
/* called func. : namealloc, autallocblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct begen *beh_addbegen (lastbegen, name, type, value)
|
||||
|
||||
struct begen *lastbegen; /* pointer on the last begen structure */
|
||||
char *name; /* generic's name */
|
||||
char *type; /* generic's type mark */
|
||||
void *value; /* generic's value */
|
||||
|
||||
{
|
||||
|
||||
struct begen *ptgen;
|
||||
|
||||
name = namealloc (name);
|
||||
type = namealloc (type);
|
||||
|
||||
ptgen = (struct begen *) autallocblock (sizeof(struct begen));
|
||||
ptgen->NAME = name;
|
||||
ptgen->TYPE = type;
|
||||
ptgen->VALUE = value;
|
||||
ptgen->NEXT = lastbegen;
|
||||
|
||||
return (ptgen);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_addbemsg.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_addbemsg */
|
||||
/* description : create BEMSG structure at the top the list */
|
||||
/* called func. : autallocblock, namealloc */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct bemsg *beh_addbemsg (lastbemsg,label,level,message,abl_expr,bdd_expr)
|
||||
|
||||
struct bemsg *lastbemsg; /* pointer on the last bemsg structure */
|
||||
char *label; /* assert's label */
|
||||
char level; /* severity level (E or W) */
|
||||
char *message; /* reported message */
|
||||
struct chain *abl_expr; /* assert's condition (ABL) */
|
||||
struct bddnode *bdd_expr; /* assert's condition (BDD) */
|
||||
|
||||
{
|
||||
|
||||
struct bemsg *ptmsg;
|
||||
|
||||
label = namealloc (label);
|
||||
|
||||
ptmsg = (struct bemsg *) autallocblock (sizeof(struct bemsg));
|
||||
ptmsg->LABEL = label;
|
||||
ptmsg->LEVEL = level;
|
||||
ptmsg->MESSAGE = message;
|
||||
ptmsg->ABL = abl_expr;
|
||||
ptmsg->NODE = bdd_expr;
|
||||
ptmsg->NEXT = lastbemsg;
|
||||
|
||||
return (ptmsg);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_addbeout.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_addbeout */
|
||||
/* description : create a BEOUT structure at the top the list */
|
||||
/* called func. : namealloc, autallocblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct beout *beh_addbeout (lastbeout, name, abl_expr, bdd_expr)
|
||||
|
||||
struct beout *lastbeout; /* pointer on the last beout structure */
|
||||
char *name; /* port's name */
|
||||
struct chain *abl_expr; /* port's expression (ABL) */
|
||||
struct bddnode *bdd_expr; /* port's expression (BDD) */
|
||||
|
||||
{
|
||||
struct beout *ptout;
|
||||
|
||||
name = namealloc (name);
|
||||
|
||||
ptout = (struct beout *) autallocblock (sizeof(struct beout));
|
||||
ptout->NAME = name;
|
||||
ptout->ABL = abl_expr;
|
||||
ptout->NODE = bdd_expr;
|
||||
ptout->NEXT = lastbeout;
|
||||
|
||||
return (ptout);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_addbepgm.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_addbepgm */
|
||||
/* description : add an BEPGM structure at the top of a list */
|
||||
/* called func. : namealloc, autallocblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct bepgm *beh_addbepgm (lastbepgm, type , name , value)
|
||||
struct bepgm *lastbepgm; /* pointer on the last bepgm */
|
||||
char *type; /* pragma's type */
|
||||
char *name; /* pragma's name */
|
||||
void *value; /* pragma's content */
|
||||
{
|
||||
struct bepgm *ptbepgm;
|
||||
|
||||
if(type)
|
||||
type = namealloc (type);
|
||||
if(name)
|
||||
name = namealloc (name);
|
||||
|
||||
ptbepgm = (struct bepgm *) autallocblock (sizeof(struct bepgm));
|
||||
|
||||
ptbepgm->TYPE = type;
|
||||
ptbepgm->NAME = name;
|
||||
ptbepgm->VALUE = value;
|
||||
|
||||
ptbepgm->NEXT = lastbepgm;
|
||||
|
||||
return (ptbepgm);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_addbepor.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_addbepor */
|
||||
/* description : create a BEPOR structure at the top the list */
|
||||
/* called func. : namealloc, autallocblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct bepor *beh_addbepor (lastbepor, name, dir, type)
|
||||
|
||||
struct bepor *lastbepor; /* pointer on the last bepor structure */
|
||||
char *name; /* signal's name */
|
||||
char dir; /* signal's mode (I, O, B, Z, or T) */
|
||||
char type; /* signal'type mark (M or W) */
|
||||
|
||||
{
|
||||
struct bepor *ptbepor;
|
||||
|
||||
name = namealloc (name);
|
||||
|
||||
ptbepor = (struct bepor *) autallocblock (sizeof(struct bepor));
|
||||
ptbepor->NAME = name;
|
||||
ptbepor->DIRECTION = dir;
|
||||
ptbepor->TYPE = type;
|
||||
ptbepor->NEXT = lastbepor;
|
||||
|
||||
return (ptbepor);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_addbereg.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_addbereg */
|
||||
/* description : create a BEREG structure at the top the list */
|
||||
/* called func. : namealloc, autallocblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct bereg *beh_addbereg (lastbereg, name, biabl, binode)
|
||||
|
||||
struct bereg *lastbereg; /* pointer on the last bereg structure */
|
||||
char *name; /* register's name */
|
||||
struct biabl *biabl; /* register's drivers (ABL) */
|
||||
struct binode *binode; /* register's drivers (BDD) */
|
||||
|
||||
{
|
||||
struct bereg *ptreg;
|
||||
|
||||
name = namealloc (name);
|
||||
|
||||
ptreg = (struct bereg *) autallocblock (sizeof(struct bereg));
|
||||
ptreg->NAME = name;
|
||||
ptreg->BIABL = biabl;
|
||||
ptreg->BINODE = binode;
|
||||
ptreg->NEXT = lastbereg;
|
||||
|
||||
return (ptreg);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_addberin.c */
|
||||
/* date : Sep 20 1994 */
|
||||
/* version : v107 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_addberin */
|
||||
/* description : create a BERIN structure at the top the list */
|
||||
/* called func. : namealloc, autallocblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct berin *beh_addberin (lastberin, name)
|
||||
|
||||
struct berin *lastberin; /* pointer on the last berin structure */
|
||||
char *name; /* signal's name */
|
||||
|
||||
{
|
||||
struct berin *ptrin;
|
||||
|
||||
name = namealloc (name);
|
||||
|
||||
ptrin = (struct berin *) autallocblock (sizeof(struct berin));
|
||||
ptrin->NAME = name;
|
||||
ptrin->NEXT = lastberin;
|
||||
|
||||
ptrin->REG_REF = NULL;
|
||||
ptrin->MSG_REF = NULL;
|
||||
ptrin->AUX_REF = NULL;
|
||||
ptrin->BUX_REF = NULL;
|
||||
ptrin->BUS_REF = NULL;
|
||||
ptrin->OUT_REF = NULL;
|
||||
ptrin->DLY_REF = NULL;
|
||||
|
||||
return (ptrin);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_addbiabl.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_addbiabl */
|
||||
/* description : create a BIABL structure at the top the list */
|
||||
/* called func. : namealloc, autallocblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct biabl *beh_addbiabl (lastbiabl, label, condition, value)
|
||||
|
||||
char *label; /* block's label */
|
||||
struct biabl *lastbiabl; /* pointer on the last biabl structure */
|
||||
struct chain *condition; /* guard expression (ABL) */
|
||||
struct chain *value; /* value expression (ABL) */
|
||||
|
||||
{
|
||||
struct biabl *ptbiabl;
|
||||
|
||||
ptbiabl = (struct biabl *) autallocblock (sizeof(struct biabl));
|
||||
label = namealloc (label);
|
||||
|
||||
ptbiabl->LABEL = label;
|
||||
ptbiabl->CNDABL = condition;
|
||||
ptbiabl->VALABL = value;
|
||||
ptbiabl->USER = NULL;
|
||||
ptbiabl->NEXT = lastbiabl;
|
||||
|
||||
return (ptbiabl);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_addbinod.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_addbinode */
|
||||
/* description : create a BINODE structure at the top the list */
|
||||
/* called func. : autallocblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct binode *beh_addbinode (lastbinode, condition, value)
|
||||
|
||||
struct binode *lastbinode; /* pointer on the last binode structure */
|
||||
struct bddnode *condition; /* guard expression (BDD) */
|
||||
struct bddnode *value; /* value expression (BDD) */
|
||||
|
||||
{
|
||||
struct binode *ptbinode;
|
||||
|
||||
ptbinode = (struct binode *) autallocblock (sizeof(struct binode));
|
||||
ptbinode->CNDNODE = condition;
|
||||
ptbinode->VALNODE = value;
|
||||
ptbinode->NEXT = lastbinode;
|
||||
|
||||
return (ptbinode);
|
||||
}
|
|
@ -0,0 +1,866 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_delbeaux.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
#include <stdio.h>
|
||||
#include MUT_H
|
||||
#include AUT_H
|
||||
#include ABL_H
|
||||
#include ABE_H
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_delbeaux */
|
||||
/* description : delete a BEAUX structure and return the pointer of */
|
||||
/* the next object. A warning is printed out if the */
|
||||
/* object to be deleted is not empty when the mode is N */
|
||||
/* called func. : autfreeblock, freeablexpr */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct beaux *beh_delbeaux (listbeaux, ptbeaux, mode)
|
||||
|
||||
struct beaux *listbeaux; /* list of beaux containing the object */
|
||||
struct beaux *ptbeaux; /* pointer of the BEAUX to be deleted */
|
||||
char mode; /* recursive delete or not (Y or N) */
|
||||
|
||||
{
|
||||
struct beaux headaux;
|
||||
struct beaux *ptlastaux;
|
||||
|
||||
if ((listbeaux != NULL) && (ptbeaux != NULL))
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* Search the object to be deleted */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
headaux.NEXT = listbeaux;
|
||||
ptlastaux = &headaux;
|
||||
while ((ptlastaux != NULL) && (ptlastaux->NEXT != ptbeaux))
|
||||
ptlastaux = ptlastaux->NEXT;
|
||||
|
||||
if (ptlastaux != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* If the object doesn't exist return the list without */
|
||||
/* modification. */
|
||||
/* If the object has been found check the mode and, if asked */
|
||||
/* delete pointed objects recursively. */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
if (mode == 'N')
|
||||
{
|
||||
if (ptbeaux->ABL != NULL)
|
||||
(void) fprintf (stderr,"BEH_warning : beaux `%s` not empty\n",
|
||||
ptbeaux->NAME);
|
||||
}
|
||||
else
|
||||
freeablexpr (ptbeaux->ABL);
|
||||
|
||||
ptlastaux->NEXT = ptbeaux->NEXT;
|
||||
autfreeblock (ptbeaux);
|
||||
}
|
||||
|
||||
listbeaux = headaux.NEXT;
|
||||
}
|
||||
|
||||
return(listbeaux);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_delbebus.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_delbebus */
|
||||
/* description : delete a BEBUS structure and return the pointer of */
|
||||
/* the next object. A warning is printed out if the */
|
||||
/* object to be deleted is not empty when the mode is N */
|
||||
/* called func. : autfreeblock, beh_frebiabl, beh_frebinode */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct bebus *beh_delbebus (listbebus, ptbebus, mode)
|
||||
|
||||
struct bebus *listbebus; /* list of bebus containing the object */
|
||||
struct bebus *ptbebus; /* pointer of the BEBUS to be deleted */
|
||||
char mode; /* recursive delete or not (Y or N) */
|
||||
|
||||
{
|
||||
struct bebus headbus;
|
||||
struct bebus *ptlastbus;
|
||||
|
||||
if ((listbebus != NULL) && (ptbebus != NULL))
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* Search the object to be deleted */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
headbus.NEXT = listbebus;
|
||||
ptlastbus = &headbus;
|
||||
while ((ptlastbus != NULL) && (ptlastbus->NEXT != ptbebus))
|
||||
ptlastbus = ptlastbus->NEXT;
|
||||
|
||||
if (ptlastbus != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* If the object doesn't exist return the list without */
|
||||
/* modification. */
|
||||
/* If the object has been found check the mode and, if asked */
|
||||
/* delete pointed objects recursively. */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
if (mode == 'N')
|
||||
{
|
||||
if ((ptbebus->BIABL != NULL) || (ptbebus->BINODE != NULL))
|
||||
(void) fprintf (stderr,"BEH_warning : bebus `%s` not empty\n",
|
||||
ptbebus->NAME);
|
||||
}
|
||||
else
|
||||
{
|
||||
beh_frebiabl (ptbebus->BIABL);
|
||||
beh_frebinode (ptbebus->BINODE);
|
||||
}
|
||||
|
||||
ptlastbus->NEXT = ptbebus->NEXT;
|
||||
autfreeblock (ptbebus);
|
||||
}
|
||||
|
||||
listbebus = headbus.NEXT;
|
||||
}
|
||||
|
||||
return(listbebus);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_delbebux.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_delbebux */
|
||||
/* description : delete a BEBUX structure and return the pointer of */
|
||||
/* the next object. A warning is printed out if the */
|
||||
/* object to be deleted is not empty when the mode is N */
|
||||
/* called func. : autfreeblock, beh_frebiabl, beh_frebinode */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct bebux *beh_delbebux (listbebux, ptbebux, mode)
|
||||
|
||||
struct bebux *listbebux; /* list of bebux containing the object */
|
||||
struct bebux *ptbebux; /* pointer of the BEBUX to be deleted */
|
||||
char mode; /* recursive delete or not (Y or N) */
|
||||
|
||||
{
|
||||
struct bebux headbux;
|
||||
struct bebux *ptlastbux;
|
||||
|
||||
if ((listbebux != NULL) && (ptbebux != NULL))
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* Search the object to be deleted */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
headbux.NEXT = listbebux;
|
||||
ptlastbux = &headbux;
|
||||
while ((ptlastbux != NULL) && (ptlastbux->NEXT != ptbebux))
|
||||
ptlastbux = ptlastbux->NEXT;
|
||||
|
||||
if (ptlastbux != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* If the object doesn't exist return the list without */
|
||||
/* modification. */
|
||||
/* If the object has been found check the mode and, if asked */
|
||||
/* delete pointed objects recursively. */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
if (mode == 'N')
|
||||
{
|
||||
if ((ptbebux->BIABL != NULL) || (ptbebux->BINODE != NULL))
|
||||
(void) fprintf (stderr,"BEH_warning : bebux `%s` not empty\n",
|
||||
ptbebux->NAME);
|
||||
}
|
||||
else
|
||||
{
|
||||
beh_frebiabl (ptbebux->BIABL);
|
||||
beh_frebinode (ptbebux->BINODE);
|
||||
}
|
||||
|
||||
ptlastbux->NEXT = ptbebux->NEXT;
|
||||
autfreeblock (ptbebux);
|
||||
}
|
||||
|
||||
listbebux = headbux.NEXT;
|
||||
}
|
||||
|
||||
return(listbebux);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_delbefig.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_delbefig */
|
||||
/* description : delete a BEFIG structure and return the pointer of */
|
||||
/* the next object. A warning is printed out if the */
|
||||
/* object to be deleted is not empty when the mode is N. */
|
||||
/* called func. : autfreeblock , beh_frebereg, beh_frebemsg, */
|
||||
/* beh_freberin, beh_frebeout, beh_frebebus, */
|
||||
/* beh_frebeaux, beh_frebebux, beh_frebepor, */
|
||||
/* beh_frebegen, getptype */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct befig *beh_delbefig (listbefig, ptbefig, mode)
|
||||
|
||||
struct befig *listbefig; /* list of befig containing the object */
|
||||
struct befig *ptbefig; /* pointer of the BEFIG to be deleted */
|
||||
char mode; /* recursive delete or not (Y or N) */
|
||||
|
||||
{
|
||||
struct befig headfig;
|
||||
struct befig *ptlastfig;
|
||||
struct ptype *ptptype;
|
||||
|
||||
if ((listbefig != NULL) && (ptbefig != NULL))
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* Search the object to be deleted */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
headfig.NEXT = listbefig;
|
||||
ptlastfig = &headfig;
|
||||
while ((ptlastfig != NULL) && (ptlastfig->NEXT != ptbefig))
|
||||
ptlastfig = ptlastfig->NEXT;
|
||||
|
||||
if (ptlastfig != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* If the object doesn't exist return the list without */
|
||||
/* modification. */
|
||||
/* If the object has been found check the mode and, if asked */
|
||||
/* delete pointed objects recursively. */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
if (mode == 'N')
|
||||
{
|
||||
if ((ptbefig->BEREG != NULL) || (ptbefig->BEMSG != NULL) ||
|
||||
(ptbefig->BERIN != NULL) || (ptbefig->BEOUT != NULL) ||
|
||||
(ptbefig->BEBUS != NULL) || (ptbefig->BEAUX != NULL) ||
|
||||
(ptbefig->BEBUX != NULL) || (ptbefig->BEDLY != NULL) ||
|
||||
(ptbefig->BEPOR != NULL) || (ptbefig->USER != NULL) ||
|
||||
(ptbefig->BEPGM != NULL))
|
||||
|
||||
(void) fprintf (stderr,"BEH_warning : befig `%s` not empty\n",
|
||||
ptbefig->NAME);
|
||||
}
|
||||
else
|
||||
{
|
||||
beh_frebereg (ptbefig->BEREG);
|
||||
beh_frebemsg (ptbefig->BEMSG);
|
||||
beh_freberin (ptbefig->BERIN);
|
||||
beh_frebeout (ptbefig->BEOUT);
|
||||
beh_frebebus (ptbefig->BEBUS);
|
||||
beh_frebeaux (ptbefig->BEAUX);
|
||||
beh_frebeaux (ptbefig->BEDLY);
|
||||
beh_frebebux (ptbefig->BEBUX);
|
||||
beh_frebepor (ptbefig->BEPOR);
|
||||
beh_frebepgm (ptbefig->BEPGM);
|
||||
if ((ptptype = getptype (ptbefig->USER,BEH_GENERIC)) != NULL)
|
||||
beh_frebegen (ptptype->DATA);
|
||||
}
|
||||
|
||||
ptlastfig->NEXT = ptbefig->NEXT;
|
||||
autfreeblock (ptbefig);
|
||||
}
|
||||
|
||||
listbefig = headfig.NEXT;
|
||||
}
|
||||
|
||||
return(listbefig);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_delbegen.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_delbegen */
|
||||
/* description : delete a BEGEN structure and return the pointer of */
|
||||
/* the next object. A warning is printed out if the */
|
||||
/* object to be deleted is not empty when the mode is N */
|
||||
/* called func. : autfreeblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct begen *beh_delbegen (listbegen, ptbegen, mode)
|
||||
|
||||
struct begen *listbegen; /* list of begen containing the object */
|
||||
struct begen *ptbegen; /* pointer of the BEGEN to be deleted */
|
||||
char mode; /* recursive delete or not (Y or N) */
|
||||
|
||||
{
|
||||
struct begen headgen;
|
||||
struct begen *ptlastgen;
|
||||
|
||||
if ((listbegen != NULL) && (ptbegen != NULL))
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* Search the object to be deleted */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
headgen.NEXT = listbegen;
|
||||
ptlastgen = &headgen;
|
||||
while ((ptlastgen != NULL) && (ptlastgen->NEXT != ptbegen))
|
||||
ptlastgen = ptlastgen->NEXT;
|
||||
|
||||
if (ptlastgen != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* If the object doesn't exist return the list without */
|
||||
/* modification. */
|
||||
/* If the object has been found check the mode and, if asked */
|
||||
/* delete pointed objects recursively. */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
if (mode == 'N')
|
||||
{
|
||||
if (ptbegen->VALUE != NULL)
|
||||
(void) fprintf (stderr,"BEH_warning : begen `%s` not empty\n",
|
||||
ptbegen->NAME);
|
||||
}
|
||||
else
|
||||
autfreeblock (ptbegen->VALUE);
|
||||
|
||||
ptlastgen->NEXT = ptbegen->NEXT;
|
||||
autfreeblock (ptbegen);
|
||||
}
|
||||
|
||||
listbegen = headgen.NEXT;
|
||||
}
|
||||
|
||||
return(listbegen);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_delbemsg.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_delbemsg */
|
||||
/* description : delete a BEMSG structure and return the pointer of */
|
||||
/* the next object. A warning is printed out if the */
|
||||
/* object to be deleted is not empty when the mode is N */
|
||||
/* called func. : autfreeblock, freeablexpr */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct bemsg *beh_delbemsg (listbemsg, ptbemsg, mode)
|
||||
|
||||
struct bemsg *listbemsg; /* list of bemsg containing the object */
|
||||
struct bemsg *ptbemsg; /* pointer of the BEMSG to be deleted */
|
||||
char mode; /* recursive delete or not (Y or N) */
|
||||
|
||||
{
|
||||
struct bemsg headmsg;
|
||||
struct bemsg *ptlastmsg;
|
||||
|
||||
if ((listbemsg != NULL) && (ptbemsg != NULL))
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* Search the object to be deleted */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
headmsg.NEXT = listbemsg;
|
||||
ptlastmsg = &headmsg;
|
||||
while ((ptlastmsg != NULL) && (ptlastmsg->NEXT != ptbemsg))
|
||||
ptlastmsg = ptlastmsg->NEXT;
|
||||
|
||||
if (ptlastmsg != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* If the object doesn't exist return the list without */
|
||||
/* modification. */
|
||||
/* If the object has been found check the mode and, if asked */
|
||||
/* delete pointed objects recursively. */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
if (mode == 'N')
|
||||
{
|
||||
if (ptbemsg->ABL != NULL)
|
||||
(void) fprintf (stderr,"BEH_warning : bemsg `%s` not empty\n",
|
||||
ptbemsg->LABEL);
|
||||
}
|
||||
else
|
||||
freeablexpr (ptbemsg->ABL);
|
||||
|
||||
ptlastmsg->NEXT = ptbemsg->NEXT;
|
||||
autfreeblock (ptbemsg);
|
||||
}
|
||||
|
||||
listbemsg = headmsg.NEXT;
|
||||
}
|
||||
|
||||
return(listbemsg);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_delbeout.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_delbeout */
|
||||
/* description : delete a BEOUT structure and return the pointer of */
|
||||
/* the next object. A warning is printed out if the */
|
||||
/* object to be deleted is not empty when the mode is N */
|
||||
/* called func. : autfreeblock, freeablexpr */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct beout *beh_delbeout (listbeout, ptbeout, mode)
|
||||
|
||||
struct beout *listbeout; /* list of beout containing the object */
|
||||
struct beout *ptbeout; /* pointer of the BEOUT to be deleted */
|
||||
char mode; /* recursive delete or not (Y or N) */
|
||||
|
||||
{
|
||||
struct beout headout;
|
||||
struct beout *ptlastout;
|
||||
|
||||
if ((listbeout != NULL) && (ptbeout != NULL))
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* Search the object to be deleted */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
headout.NEXT = listbeout;
|
||||
ptlastout = &headout;
|
||||
while ((ptlastout != NULL) && (ptlastout->NEXT != ptbeout))
|
||||
ptlastout = ptlastout->NEXT;
|
||||
|
||||
if (ptlastout != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* If the object doesn't exist return the list without */
|
||||
/* modification. */
|
||||
/* If the object has been found check the mode and, if asked */
|
||||
/* delete pointed objects recursively. */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
if (mode == 'N')
|
||||
{
|
||||
if (ptbeout->ABL != NULL)
|
||||
(void) fprintf (stderr,"BEH_warning : beout `%s` not empty\n",
|
||||
ptbeout->NAME);
|
||||
}
|
||||
else
|
||||
freeablexpr (ptbeout->ABL);
|
||||
|
||||
ptlastout->NEXT = ptbeout->NEXT;
|
||||
autfreeblock (ptbeout);
|
||||
}
|
||||
|
||||
listbeout = headout.NEXT;
|
||||
}
|
||||
|
||||
return(listbeout);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_delbepor.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_delbepor */
|
||||
/* description : delete a BEPOR structure and return the pointer of */
|
||||
/* the next object. */
|
||||
/* called func. : autfreeblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct bepor *beh_delbepor (listbepor, ptbepor)
|
||||
|
||||
struct bepor *listbepor; /* list of bepor containing the object */
|
||||
struct bepor *ptbepor; /* pointer of the BEPOR to be deleted */
|
||||
|
||||
{
|
||||
struct bepor headpor;
|
||||
struct bepor *ptlastpor;
|
||||
|
||||
if ((listbepor != NULL) && (ptbepor != NULL))
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* Search the object to be deleted */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
headpor.NEXT = listbepor;
|
||||
ptlastpor = &headpor;
|
||||
while ((ptlastpor != NULL) && (ptlastpor->NEXT != ptbepor))
|
||||
ptlastpor = ptlastpor->NEXT;
|
||||
|
||||
if (ptlastpor != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* If the object doesn't exist return the list without */
|
||||
/* modification. */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
ptlastpor->NEXT = ptbepor->NEXT;
|
||||
autfreeblock (ptbepor);
|
||||
}
|
||||
|
||||
listbepor = headpor.NEXT;
|
||||
}
|
||||
|
||||
return(listbepor);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_delbereg.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_delbereg */
|
||||
/* description : delete a BEREG structure and return the pointer of */
|
||||
/* the next object. A warning is printed out if the */
|
||||
/* object to be deleted is not empty when the mode is N */
|
||||
/* called func. : autfreeblock, beh_frebiabl, beh_frebinode */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct bereg *beh_delbereg (listbereg, ptbereg, mode)
|
||||
|
||||
struct bereg *listbereg; /* list of bereg containing the object */
|
||||
struct bereg *ptbereg; /* pointer of the BEREG to be deleted */
|
||||
char mode; /* recursive delete or not (Y or N) */
|
||||
|
||||
{
|
||||
struct bereg headreg;
|
||||
struct bereg *ptlastreg;
|
||||
|
||||
if ((listbereg != NULL) && (ptbereg != NULL))
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* Search the object to be deleted */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
headreg.NEXT = listbereg;
|
||||
ptlastreg = &headreg;
|
||||
while ((ptlastreg != NULL) && (ptlastreg->NEXT != ptbereg))
|
||||
ptlastreg = ptlastreg->NEXT;
|
||||
|
||||
if (ptlastreg != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* If the object doesn't exist return the list without */
|
||||
/* modification. */
|
||||
/* If the object has been found check the mode and, if asked */
|
||||
/* delete pointed objects recursively. */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
if (mode == 'N')
|
||||
{
|
||||
if ((ptbereg->BIABL != NULL) || (ptbereg->BINODE != NULL))
|
||||
(void) fprintf (stderr,"BEH_warning : bereg `%s` not empty\n",
|
||||
ptbereg->NAME);
|
||||
}
|
||||
else
|
||||
{
|
||||
beh_frebiabl (ptbereg->BIABL);
|
||||
beh_frebinode (ptbereg->BINODE);
|
||||
}
|
||||
|
||||
ptlastreg->NEXT = ptbereg->NEXT;
|
||||
autfreeblock (ptbereg);
|
||||
}
|
||||
|
||||
listbereg = headreg.NEXT;
|
||||
}
|
||||
|
||||
return(listbereg);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_delberin.c */
|
||||
/* date : Sep 20 1994 */
|
||||
/* version : v107 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_delberin */
|
||||
/* description : delete a BERIN structure and return the pointer of */
|
||||
/* the next object. */
|
||||
/* called func. : autfreeblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct berin *beh_delberin (listberin, ptberin)
|
||||
|
||||
struct berin *listberin; /* list of berin containing the object */
|
||||
struct berin *ptberin; /* pointer of the BERIN to be deleted */
|
||||
|
||||
{
|
||||
struct berin headrin;
|
||||
struct berin *ptlastrin;
|
||||
|
||||
if ((listberin != NULL) && (ptberin != NULL))
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* Search the object to be deleted */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
headrin.NEXT = listberin;
|
||||
ptlastrin = &headrin;
|
||||
while ((ptlastrin != NULL) && (ptlastrin->NEXT != ptberin))
|
||||
ptlastrin = ptlastrin->NEXT;
|
||||
|
||||
if (ptlastrin != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* If the object doesn't exist return the list without */
|
||||
/* modification. */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
ptlastrin->NEXT = ptberin->NEXT;
|
||||
autfreeblock (ptberin);
|
||||
}
|
||||
|
||||
listberin = headrin.NEXT;
|
||||
}
|
||||
|
||||
return(listberin);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_delbiabl.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_delbiabl */
|
||||
/* description : delete a BIABL structure and return the pointer of */
|
||||
/* the next object. A warning is printed out if the */
|
||||
/* object to be deleted is not empty when the mode is N */
|
||||
/* called func. : autfreeblock, freeablexpr */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct biabl *beh_delbiabl (listbiabl, ptbiabl, mode)
|
||||
|
||||
struct biabl *listbiabl; /* list of biabl containing the object */
|
||||
struct biabl *ptbiabl; /* pointer of the BIABL to be deleted */
|
||||
char mode; /* recursive delete or not (Y or N) */
|
||||
|
||||
{
|
||||
struct biabl headabl;
|
||||
struct biabl *ptlastabl;
|
||||
|
||||
if ((listbiabl != NULL) && (ptbiabl != NULL))
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* Search the object to be deleted */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
headabl.NEXT = listbiabl;
|
||||
ptlastabl = &headabl;
|
||||
while ((ptlastabl != NULL) && (ptlastabl->NEXT != ptbiabl))
|
||||
ptlastabl = ptlastabl->NEXT;
|
||||
|
||||
if (ptlastabl != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* If the object doesn't exist return the list without */
|
||||
/* modification. */
|
||||
/* If the object has been found check the mode and, if asked */
|
||||
/* delete pointed objects recursively. */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
if (mode == 'N')
|
||||
{
|
||||
if ((ptbiabl->VALABL != NULL) || (ptbiabl->CNDABL != NULL))
|
||||
(void) fprintf (stderr,"BEH_warning : biabl not empty\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
freeablexpr (ptbiabl->VALABL);
|
||||
freeablexpr (ptbiabl->CNDABL);
|
||||
freeptype(ptbiabl->USER);
|
||||
}
|
||||
|
||||
ptlastabl->NEXT = ptbiabl->NEXT;
|
||||
autfreeblock (ptbiabl);
|
||||
}
|
||||
|
||||
listbiabl = headabl.NEXT;
|
||||
}
|
||||
|
||||
return(listbiabl);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_delbinod.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_delbinode */
|
||||
/* description : delete a BINODE structure and return the pointer of */
|
||||
/* the next object. A warning is printed out if the */
|
||||
/* object to be deleted is not empty when the mode is N */
|
||||
/* called func. : autfreeblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct binode *beh_delbinode (listbinode, ptbinode, mode)
|
||||
|
||||
struct binode *listbinode; /* list of binode containing the object */
|
||||
struct binode *ptbinode; /* pointer of the BINODE to be deleted */
|
||||
char mode; /* recursive delete or not (Y or N) */
|
||||
|
||||
{
|
||||
struct binode headnode;
|
||||
struct binode *ptlastnode;
|
||||
|
||||
if ((listbinode != NULL) && (ptbinode != NULL))
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* Search the object to be deleted */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
headnode.NEXT = listbinode;
|
||||
ptlastnode = &headnode;
|
||||
while ((ptlastnode != NULL) && (ptlastnode->NEXT != ptbinode))
|
||||
ptlastnode = ptlastnode->NEXT;
|
||||
|
||||
if (ptlastnode != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* If the object doesn't exist return the list without */
|
||||
/* modification. */
|
||||
/* If the object has been found check the mode and, if asked */
|
||||
/* delete pointed objects recursively. */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
if (mode == 'N')
|
||||
{
|
||||
if ((ptbinode->VALNODE != NULL) || (ptbinode->CNDNODE != NULL))
|
||||
(void) fprintf (stderr,"BEH_warning : binode not empty\n");
|
||||
}
|
||||
|
||||
ptlastnode->NEXT = ptbinode->NEXT;
|
||||
autfreeblock (ptbinode);
|
||||
}
|
||||
|
||||
listbinode = headnode.NEXT;
|
||||
}
|
||||
|
||||
return(listbinode);
|
||||
}
|
|
@ -0,0 +1,347 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_dict.c */
|
||||
/* date : Jun 15 1994 */
|
||||
/* version : v107 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
#include <stdio.h>
|
||||
#include MUT_H
|
||||
#include AUT_H
|
||||
#include ABL_H
|
||||
#include ABE_H
|
||||
|
||||
#define BEH_ALODFN 64
|
||||
#define ABE_HSZDFN 97
|
||||
|
||||
static struct beden *BEH_DCEHED = NULL; /* free entries list */
|
||||
static struct bedrd *BEH_DCRHED = NULL; /* free records list */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_addent */
|
||||
/* description : add a new entry point to the dictionary */
|
||||
/* called func. : mbkalloc */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
static struct beden *beh_addent (head, key)
|
||||
|
||||
struct beden *head;
|
||||
char *key;
|
||||
|
||||
{
|
||||
struct beden *entry;
|
||||
int i ;
|
||||
|
||||
if (BEH_DCEHED == NULL)
|
||||
{
|
||||
BEH_DCEHED = (struct beden *)
|
||||
mbkalloc (sizeof (struct beden) * BEH_ALODFN);
|
||||
|
||||
entry = BEH_DCEHED;
|
||||
for (i=1 ; i<BEH_ALODFN ; i++)
|
||||
{
|
||||
entry->NEXT = entry + 1;
|
||||
entry++;
|
||||
}
|
||||
entry->NEXT = NULL;
|
||||
}
|
||||
|
||||
entry = BEH_DCEHED;
|
||||
BEH_DCEHED = BEH_DCEHED->NEXT;
|
||||
|
||||
entry->NEXT = head;
|
||||
entry->DATA = NULL;
|
||||
entry->KEY = key;
|
||||
|
||||
return (entry);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_addrcd */
|
||||
/* description : add a new record to the dictionary */
|
||||
/* called func. : mbkalloc */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
static struct bedrd *beh_addrcd (head, key)
|
||||
|
||||
struct bedrd *head;
|
||||
char *key;
|
||||
|
||||
{
|
||||
struct bedrd *recrd;
|
||||
int i ;
|
||||
|
||||
if (BEH_DCRHED == NULL)
|
||||
{
|
||||
BEH_DCRHED = (struct bedrd *)
|
||||
mbkalloc (sizeof (struct bedrd) * BEH_ALODFN);
|
||||
|
||||
recrd = BEH_DCRHED;
|
||||
for (i=1 ; i<BEH_ALODFN ; i++)
|
||||
{
|
||||
recrd->NEXT = recrd + 1;
|
||||
recrd++;
|
||||
}
|
||||
recrd->NEXT = NULL;
|
||||
}
|
||||
|
||||
recrd = BEH_DCRHED;
|
||||
BEH_DCRHED = BEH_DCRHED->NEXT;
|
||||
|
||||
recrd->NEXT = head;
|
||||
recrd->FD0_VAL = 0;
|
||||
recrd->FD1_VAL = 0;
|
||||
recrd->FD2_VAL = 0;
|
||||
recrd->FD3_VAL = 0;
|
||||
recrd->FD4_VAL = 0;
|
||||
recrd->FD5_VAL = 0;
|
||||
recrd->FD6_VAL = 0;
|
||||
recrd->PNT_VAL = 0;
|
||||
recrd->KEY = key;
|
||||
|
||||
return (recrd);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_initab */
|
||||
/* description : create a new dictionary */
|
||||
/* called func. : mbkalloc */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct beden **beh_initab ()
|
||||
|
||||
{
|
||||
struct beden **head;
|
||||
int i;
|
||||
|
||||
head = (struct beden **)
|
||||
mbkalloc (sizeof(struct beden *) * ABE_HSZDFN);
|
||||
|
||||
for (i=0 ; i<ABE_HSZDFN ; i++)
|
||||
head[i] = NULL;
|
||||
|
||||
return (head);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_addtab */
|
||||
/* description : save a data in a dictionary */
|
||||
/* called func. : beh_addent, beh_addrcd */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void beh_addtab (head, key_str, ctx_str, field, valu)
|
||||
|
||||
struct beden **head;
|
||||
char *key_str;
|
||||
char *ctx_str;
|
||||
int field;
|
||||
int valu;
|
||||
|
||||
{
|
||||
int found = 0;
|
||||
int index;
|
||||
struct beden *entry_pnt;
|
||||
struct bedrd *recrd_pnt;
|
||||
|
||||
index = ((unsigned long) key_str) % ABE_HSZDFN;
|
||||
entry_pnt = head[index];
|
||||
|
||||
while (entry_pnt != NULL)
|
||||
{
|
||||
if (entry_pnt->KEY == key_str)
|
||||
{
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
entry_pnt = entry_pnt->NEXT;
|
||||
}
|
||||
|
||||
if (found == 0)
|
||||
{
|
||||
head[index] = beh_addent (head[index],key_str);
|
||||
entry_pnt = head[index];
|
||||
}
|
||||
|
||||
found = 0;
|
||||
recrd_pnt = entry_pnt->DATA;
|
||||
while (recrd_pnt != NULL)
|
||||
{
|
||||
if (recrd_pnt->KEY == ctx_str)
|
||||
{
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
recrd_pnt = recrd_pnt->NEXT;
|
||||
}
|
||||
|
||||
if (found == 0)
|
||||
{
|
||||
entry_pnt->DATA = beh_addrcd (entry_pnt->DATA,ctx_str);
|
||||
recrd_pnt = entry_pnt->DATA ;
|
||||
}
|
||||
|
||||
switch (field)
|
||||
{
|
||||
case 0 :
|
||||
recrd_pnt->FD0_VAL = valu; break;
|
||||
case 1 :
|
||||
recrd_pnt->FD1_VAL = valu; break;
|
||||
case 2 :
|
||||
recrd_pnt->FD2_VAL = valu; break;
|
||||
case 3 :
|
||||
recrd_pnt->FD3_VAL = valu; break;
|
||||
case 4 :
|
||||
recrd_pnt->FD4_VAL = valu; break;
|
||||
case 5 :
|
||||
recrd_pnt->FD5_VAL = valu; break;
|
||||
case 6 :
|
||||
recrd_pnt->FD6_VAL = valu; break;
|
||||
case 7 :
|
||||
recrd_pnt->PNT_VAL = valu; break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_chktab */
|
||||
/* description : extract a data from a dictionary */
|
||||
/* called func. : none */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
long beh_chktab (head, key_str, ctx_str, field)
|
||||
|
||||
struct beden **head;
|
||||
char *key_str;
|
||||
char *ctx_str;
|
||||
int field;
|
||||
|
||||
{
|
||||
int found = 0;
|
||||
long valu = 0;
|
||||
struct beden *entry_pnt;
|
||||
struct bedrd *recrd_pnt;
|
||||
|
||||
entry_pnt = head [((unsigned long)key_str) % ABE_HSZDFN];
|
||||
|
||||
while (entry_pnt != NULL)
|
||||
{
|
||||
if (entry_pnt->KEY == key_str)
|
||||
{
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
entry_pnt = entry_pnt->NEXT;
|
||||
}
|
||||
|
||||
if (found == 1)
|
||||
{
|
||||
found = 0;
|
||||
recrd_pnt = entry_pnt->DATA;
|
||||
while (recrd_pnt != NULL)
|
||||
{
|
||||
if (recrd_pnt->KEY == ctx_str)
|
||||
{
|
||||
found = 1;
|
||||
break;
|
||||
}
|
||||
recrd_pnt = recrd_pnt->NEXT;
|
||||
}
|
||||
if (found == 1)
|
||||
{
|
||||
switch (field)
|
||||
{
|
||||
case 0 :
|
||||
valu = recrd_pnt->FD0_VAL; break;
|
||||
case 1 :
|
||||
valu = recrd_pnt->FD1_VAL; break;
|
||||
case 2 :
|
||||
valu = recrd_pnt->FD2_VAL; break;
|
||||
case 3 :
|
||||
valu = recrd_pnt->FD3_VAL; break;
|
||||
case 4 :
|
||||
valu = recrd_pnt->FD4_VAL; break;
|
||||
case 5 :
|
||||
valu = recrd_pnt->FD5_VAL; break;
|
||||
case 6 :
|
||||
valu = recrd_pnt->FD6_VAL; break;
|
||||
case 7 :
|
||||
valu = recrd_pnt->PNT_VAL; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (valu);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_fretab */
|
||||
/* description : release a dictionary */
|
||||
/* called func. : autfreeblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void beh_fretab (pt_hash)
|
||||
|
||||
struct beden **pt_hash;
|
||||
|
||||
{
|
||||
struct beden *pt_entry;
|
||||
struct beden *pt_nxtentry;
|
||||
struct bedrd *pt_record;
|
||||
int i;
|
||||
|
||||
if (pt_hash != NULL)
|
||||
{
|
||||
for (i=0 ; i<ABE_HSZDFN ; i++)
|
||||
{
|
||||
if ((pt_entry = pt_hash[i]) != NULL)
|
||||
{
|
||||
while (pt_entry != NULL)
|
||||
{
|
||||
pt_record = pt_entry->DATA;
|
||||
|
||||
while (pt_record->NEXT != NULL)
|
||||
pt_record = pt_record->NEXT;
|
||||
|
||||
pt_record->NEXT = BEH_DCRHED;
|
||||
BEH_DCRHED = pt_entry->DATA;
|
||||
|
||||
pt_nxtentry = pt_entry->NEXT;
|
||||
pt_entry->NEXT = BEH_DCEHED;
|
||||
BEH_DCEHED = pt_entry;
|
||||
pt_entry = pt_nxtentry;
|
||||
}
|
||||
}
|
||||
}
|
||||
autfreeblock (pt_hash);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,95 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_error.c */
|
||||
/* date : Jun 13 1994 */
|
||||
/* version : v107 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_error */
|
||||
/* description : print an errorr message */
|
||||
/* called func. : none */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
int beh_error (code, str1)
|
||||
|
||||
int code;
|
||||
char *str1;
|
||||
|
||||
{
|
||||
(void) fprintf (stderr, "BEH : Error %d :", code);
|
||||
|
||||
switch (code)
|
||||
{
|
||||
case 1:
|
||||
(void) fprintf (stderr, "combinatory loop: `%s`\n", str1);
|
||||
break;
|
||||
case 2:
|
||||
(void) fprintf (stderr, "cannot make bdd of empty expression\n");
|
||||
break;
|
||||
case 3:
|
||||
(void) fprintf (stderr, "cannot find terminal `%s`\n", str1);
|
||||
break;
|
||||
case 4:
|
||||
(void) fprintf (stderr, "illegal use of STABLE attribute\n");
|
||||
break;
|
||||
case 5:
|
||||
(void) fprintf (stderr, "cannot simplify internal signals\n");
|
||||
break;
|
||||
|
||||
case 40:
|
||||
(void) fprintf (stderr,"signal `%s` never assigned\n",str1);
|
||||
break;
|
||||
case 68:
|
||||
(void) fprintf (stderr,"port `%s` has unknwon type\n", str1);
|
||||
break;
|
||||
case 69:
|
||||
(void) fprintf (stderr,"port `%s` has unknwon mode\n", str1);
|
||||
break;
|
||||
|
||||
case 100:
|
||||
(void) fprintf (stderr,"cannot find `%s`\n",str1);
|
||||
break;
|
||||
case 107:
|
||||
(void) fprintf (stderr,"cannot open result file\n");
|
||||
break;
|
||||
|
||||
default:
|
||||
(void) fprintf (stderr, "syntax error\n");
|
||||
break;
|
||||
}
|
||||
|
||||
return (1);
|
||||
}
|
|
@ -0,0 +1,559 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_frebeaux.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
#include <stdio.h>
|
||||
#include MUT_H
|
||||
#include AUT_H
|
||||
#include ABL_H
|
||||
#include ABE_H
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_frebeaux */
|
||||
/* description : delete a list of BEAUX structures and all objects */
|
||||
/* pointed by any os BEAUXs in the list */
|
||||
/* called func. : autfreeblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void beh_frebeaux (listbeaux)
|
||||
|
||||
struct beaux *listbeaux; /* list of beaux to be deleted */
|
||||
|
||||
{
|
||||
struct beaux *ptbeaux;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* for each object of the list, first delete pointed objects */
|
||||
/* then, delete the object itself */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
while (listbeaux != NULL)
|
||||
{
|
||||
freeablexpr (listbeaux->ABL);
|
||||
|
||||
ptbeaux = listbeaux;
|
||||
listbeaux = listbeaux->NEXT;
|
||||
autfreeblock (ptbeaux);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_frebebus.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_frebebus */
|
||||
/* description : delete a list of BEBUS structures and all objects */
|
||||
/* pointed by any os BEBUSs in the list */
|
||||
/* called func. : autfreeblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void beh_frebebus (listbebus)
|
||||
|
||||
struct bebus *listbebus; /* list of bebus to be deleted */
|
||||
|
||||
{
|
||||
struct bebus *ptbebus;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* for each object of the list, first delete pointed objects */
|
||||
/* then, delete the object itself */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
while (listbebus != NULL)
|
||||
{
|
||||
beh_frebiabl (listbebus->BIABL);
|
||||
beh_frebinode (listbebus->BINODE);
|
||||
|
||||
ptbebus = listbebus;
|
||||
listbebus = listbebus->NEXT;
|
||||
autfreeblock (ptbebus);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_frebebux.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_frebebux */
|
||||
/* description : delete a list of BEBUX structures and all objects */
|
||||
/* pointed by any os BEBUXs in the list */
|
||||
/* called func. : autfreeblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void beh_frebebux (listbebux)
|
||||
|
||||
struct bebux *listbebux; /* list of bebux to be deleted */
|
||||
|
||||
{
|
||||
struct bebux *ptbebux;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* for each object of the list, first delete pointed objects */
|
||||
/* then, delete the object itself */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
while (listbebux != NULL)
|
||||
{
|
||||
beh_frebiabl (listbebux->BIABL);
|
||||
beh_frebinode (listbebux->BINODE);
|
||||
|
||||
ptbebux = listbebux;
|
||||
listbebux = listbebux->NEXT;
|
||||
autfreeblock (ptbebux);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_frebefig.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_frebefig */
|
||||
/* description : delete a list of BEFIG structures and all objects */
|
||||
/* pointed by any os BEFIGs in the list */
|
||||
/* called func. : autfreeblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void beh_frebefig (listbefig)
|
||||
|
||||
struct befig *listbefig; /* list of befig to be deleted */
|
||||
|
||||
{
|
||||
struct befig *ptbefig;
|
||||
struct ptype *ptptype;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* for each object of the list, first delete pointed objects */
|
||||
/* then, delete the object itself */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
while (listbefig != NULL)
|
||||
{
|
||||
beh_frebereg (listbefig->BEREG);
|
||||
beh_frebemsg (listbefig->BEMSG);
|
||||
beh_freberin (listbefig->BERIN);
|
||||
beh_frebeout (listbefig->BEOUT);
|
||||
beh_frebebus (listbefig->BEBUS);
|
||||
beh_frebeaux (listbefig->BEAUX);
|
||||
beh_frebeaux (listbefig->BEDLY);
|
||||
beh_frebebux (listbefig->BEBUX);
|
||||
beh_frebepor (listbefig->BEPOR);
|
||||
beh_frebepgm (listbefig->BEPGM);
|
||||
if ((ptptype = getptype (listbefig->USER,BEH_GENERIC)) != NULL)
|
||||
beh_frebegen (ptptype->DATA);
|
||||
|
||||
ptbefig = listbefig;
|
||||
listbefig = listbefig->NEXT;
|
||||
autfreeblock (ptbefig);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_frebegen.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_frebegen */
|
||||
/* description : delete a list of BEGEN structures and all objects */
|
||||
/* pointed by any os BEGENs in the list */
|
||||
/* called func. : autfreeblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void beh_frebegen (listbegen)
|
||||
|
||||
struct begen *listbegen; /* list of begen to be deleted */
|
||||
|
||||
{
|
||||
struct begen *ptbegen;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* for each object of the list, first delete pointed objects */
|
||||
/* then, delete the object itself */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
while (listbegen != NULL)
|
||||
{
|
||||
autfreeblock (listbegen->VALUE);
|
||||
|
||||
ptbegen = listbegen;
|
||||
listbegen = listbegen->NEXT;
|
||||
autfreeblock (ptbegen);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_frebemsg.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_frebemsg */
|
||||
/* description : delete a list of BEMSG structures and all objects */
|
||||
/* pointed by any os BEMSGs in the list */
|
||||
/* called func. : autfreeblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void beh_frebemsg (listbemsg)
|
||||
|
||||
struct bemsg *listbemsg; /* list of bemsg to be deleted */
|
||||
|
||||
{
|
||||
struct bemsg *ptbemsg;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* for each object of the list, first delete pointed objects */
|
||||
/* then, delete the object itself */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
while (listbemsg != NULL)
|
||||
{
|
||||
freeablexpr (listbemsg->ABL);
|
||||
|
||||
ptbemsg = listbemsg;
|
||||
listbemsg = listbemsg->NEXT;
|
||||
autfreeblock (ptbemsg);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_frebeout.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_frebeout */
|
||||
/* description : delete a list of BEOUT structures and all objects */
|
||||
/* pointed by any os BEOUTs in the list */
|
||||
/* called func. : autfreeblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void beh_frebeout (listbeout)
|
||||
|
||||
struct beout *listbeout; /* list of beout to be deleted */
|
||||
|
||||
{
|
||||
struct beout *ptbeout;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* for each object of the list, first delete pointed objects */
|
||||
/* then, delete the object itself */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
while (listbeout != NULL)
|
||||
{
|
||||
freeablexpr (listbeout->ABL);
|
||||
|
||||
ptbeout = listbeout;
|
||||
listbeout = listbeout->NEXT;
|
||||
autfreeblock (ptbeout);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_frebepgm.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_frebepgm */
|
||||
/* description : delete a list of BEMSG structures and all objects */
|
||||
/* pointed by any os BEMSGs in the list */
|
||||
/* called func. : autfreeblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void beh_frebepgm (listbepgm)
|
||||
|
||||
struct bepgm *listbepgm; /* list of bepgm to be deleted */
|
||||
|
||||
{
|
||||
struct bepgm *ptbepgm;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* for each object of the list, first delete pointed objects */
|
||||
/* then, delete the object itself */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
while (listbepgm != NULL)
|
||||
{
|
||||
ptbepgm = listbepgm;
|
||||
listbepgm = listbepgm->NEXT;
|
||||
autfreeblock (ptbepgm);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_frebepor.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_frebepor */
|
||||
/* description : delete a list of BEAUX structures and all objects */
|
||||
/* pointed by any os BEAUXs in the list */
|
||||
/* called func. : autfreeblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void beh_frebepor (listbepor)
|
||||
|
||||
struct bepor *listbepor; /* list of bepor to be deleted */
|
||||
|
||||
{
|
||||
struct bepor *ptbepor;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* for each object of the list, delete the object itself */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
while (listbepor != NULL)
|
||||
{
|
||||
ptbepor = listbepor;
|
||||
listbepor = listbepor->NEXT;
|
||||
autfreeblock (ptbepor);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_frebereg.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_frebereg */
|
||||
/* description : delete a list of BEAUX structures and all objects */
|
||||
/* pointed by any os BEAUXs in the list */
|
||||
/* called func. : autfreeblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void beh_frebereg (listbereg)
|
||||
|
||||
struct bereg *listbereg; /* list of bereg to be deleted */
|
||||
|
||||
{
|
||||
struct bereg *ptbereg;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* for each object of the list, first delete pointed objects */
|
||||
/* then, delete the object itself */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
while (listbereg != NULL)
|
||||
{
|
||||
beh_frebiabl (listbereg->BIABL);
|
||||
beh_frebinode (listbereg->BINODE);
|
||||
|
||||
ptbereg = listbereg;
|
||||
listbereg = listbereg->NEXT;
|
||||
autfreeblock (ptbereg);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_freberin.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_freberin */
|
||||
/* description : delete a list of BEAUX structures and all objects */
|
||||
/* pointed by any os BEAUXs in the list */
|
||||
/* called func. : autfreeblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void beh_freberin (listberin)
|
||||
|
||||
struct berin *listberin; /* list of berin to be deleted */
|
||||
|
||||
{
|
||||
struct berin *ptberin;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* for each object of the list delete the object itself */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
while (listberin != NULL)
|
||||
{
|
||||
ptberin = listberin;
|
||||
listberin = listberin->NEXT;
|
||||
autfreeblock (ptberin);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_frebiabl.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_frebiabl */
|
||||
/* description : delete a list of BIABL structures and all objects */
|
||||
/* pointed by any os BIABLs in the list */
|
||||
/* called func. : autfreeblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void beh_frebiabl (listbiabl)
|
||||
|
||||
struct biabl *listbiabl; /* list of biabl to be deleted */
|
||||
|
||||
{
|
||||
struct biabl *ptbiabl;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* for each object of the list, first delete pointed objects */
|
||||
/* then, delete the object itself */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
while (listbiabl != NULL)
|
||||
{
|
||||
freeablexpr (listbiabl->VALABL);
|
||||
freeablexpr (listbiabl->CNDABL);
|
||||
freeptype(listbiabl->USER);
|
||||
|
||||
ptbiabl = listbiabl;
|
||||
listbiabl = listbiabl->NEXT;
|
||||
autfreeblock (ptbiabl);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_frebinod.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_frebinode */
|
||||
/* description : delete a list of BINODE structures and all objects */
|
||||
/* pointed by any os BINODEs in the list */
|
||||
/* called func. : autfreeblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void beh_frebinode (listbinode)
|
||||
|
||||
struct binode *listbinode; /* list of binode to be deleted */
|
||||
|
||||
{
|
||||
struct binode *ptbinode;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* for each object of the list, first delete pointed objects */
|
||||
/* then, delete the object itself */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
while (listbinode != NULL)
|
||||
{
|
||||
ptbinode = listbinode;
|
||||
listbinode = listbinode->NEXT;
|
||||
autfreeblock (ptbinode);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_getgenva.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
#include <stdio.h>
|
||||
#include MUT_H
|
||||
#include AUT_H
|
||||
#include ABL_H
|
||||
#include ABE_H
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_getgenval */
|
||||
/* description : Search an find a BEGEN structure (known from its name)*/
|
||||
/* then return its value field. If the BEGEN is not found*/
|
||||
/* a NULL pointer is returned */
|
||||
/* called func. : */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void *beh_getgenval (listbegen, begenname)
|
||||
|
||||
struct begen *listbegen; /* head of BEGEN list */
|
||||
char *begenname; /* name of the structure */
|
||||
|
||||
{
|
||||
struct begen *ptbegen;
|
||||
void *value = NULL;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* searching the object */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
ptbegen = listbegen;
|
||||
while ((ptbegen != NULL) && (ptbegen->NAME != begenname))
|
||||
ptbegen = ptbegen->NEXT;
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* if found return its value field */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
if (ptbegen != NULL)
|
||||
value = ptbegen->VALUE;
|
||||
|
||||
return (value);
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_message.c */
|
||||
/* date : Jun 15 1994 */
|
||||
/* version : v107 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : bvl_message */
|
||||
/* description : print a message on the standard output */
|
||||
/* called func. : none */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void beh_message (code, str1)
|
||||
|
||||
int code;
|
||||
char *str1;
|
||||
|
||||
{
|
||||
(void) fprintf (stdout, "BEH : ");
|
||||
|
||||
switch (code)
|
||||
{
|
||||
case 3:
|
||||
(void) fprintf (stdout, "Compiling `%s` (Behaviour) ...\n", str1);
|
||||
break;
|
||||
case 13:
|
||||
(void) fprintf (stdout, "Saving '%s' in a vhdl file (vbe)\n", str1);
|
||||
break;
|
||||
default:
|
||||
(void) fprintf (stdout, "%s\n", str1);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,811 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_rmvbeaux.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
#include <stdio.h>
|
||||
#include MUT_H
|
||||
#include AUT_H
|
||||
#include ABL_H
|
||||
#include ABE_H
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_rmvbeaux */
|
||||
/* description : delete a BEAUX structure and return the pointer of */
|
||||
/* the next object. A warning is printed out if the */
|
||||
/* object to be deleted is not empty when the mode is N */
|
||||
/* called func. : autfreeblock, freeablexpr */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct beaux *beh_rmvbeaux (listbeaux, beauxname, mode)
|
||||
|
||||
struct beaux *listbeaux; /* list of beaux containing the object */
|
||||
char *beauxname; /* name of the BEAUX to be deleted */
|
||||
char mode; /* recursive delete or not (Y or N) */
|
||||
|
||||
{
|
||||
struct beaux headaux;
|
||||
struct beaux *ptlastaux;
|
||||
struct beaux *ptbeaux;
|
||||
|
||||
if (listbeaux != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* Search the object to be deleted */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
headaux.NEXT = listbeaux;
|
||||
headaux.NAME = NULL ;
|
||||
headaux.ABL = NULL ;
|
||||
ptbeaux = &headaux;
|
||||
while ((ptbeaux != NULL) && (ptbeaux->NAME != beauxname))
|
||||
{
|
||||
ptlastaux = ptbeaux;
|
||||
ptbeaux = ptbeaux->NEXT;
|
||||
}
|
||||
|
||||
if (ptbeaux != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* If the object doesn't exist return the list without */
|
||||
/* modification. */
|
||||
/* If the object has been found check the mode and, if asked */
|
||||
/* delete pointed objects recursively. */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
if (mode == 'N')
|
||||
{
|
||||
if (ptbeaux->ABL != NULL)
|
||||
(void) fprintf (stderr,"BEH_warning : beaux `%s` not empty\n",
|
||||
beauxname);
|
||||
}
|
||||
else
|
||||
freeablexpr (ptbeaux->ABL);
|
||||
|
||||
ptlastaux->NEXT = ptbeaux->NEXT;
|
||||
autfreeblock (ptbeaux);
|
||||
}
|
||||
|
||||
listbeaux = headaux.NEXT;
|
||||
}
|
||||
|
||||
return(listbeaux);
|
||||
}
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_rmvbebus.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_rmvbebus */
|
||||
/* description : delete a BEBUS structure and return the pointer of */
|
||||
/* the next object. A warning is printed out if the */
|
||||
/* object to be deleted is not empty when the mode is N */
|
||||
/* called func. : autfreeblock, beh_frebiabl, beh_frebinode */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct bebus *beh_rmvbebus (listbebus, bebusname, mode)
|
||||
|
||||
struct bebus *listbebus; /* list of bebus containing the object */
|
||||
char *bebusname; /* name of the BEBUS to be deleted */
|
||||
char mode; /* recursive delete or not (Y or N) */
|
||||
|
||||
{
|
||||
struct bebus headbus;
|
||||
struct bebus *ptlastbus;
|
||||
struct bebus *ptbebus;
|
||||
|
||||
if (listbebus != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* Search the object to be deleted */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
headbus.NEXT = listbebus;
|
||||
headbus.NAME = NULL ;
|
||||
headbus.BIABL = NULL ;
|
||||
headbus.BINODE = NULL ;
|
||||
ptbebus = &headbus;
|
||||
while ((ptbebus != NULL) && (ptbebus->NAME != bebusname))
|
||||
{
|
||||
ptlastbus = ptbebus;
|
||||
ptbebus = ptbebus->NEXT;
|
||||
}
|
||||
|
||||
if (ptbebus != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* If the object doesn't exist return the list without */
|
||||
/* modification. */
|
||||
/* If the object has been found check the mode and, if asked */
|
||||
/* delete pointed objects recursively. */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
if (mode == 'N')
|
||||
{
|
||||
if ((ptbebus->BIABL != NULL) || (ptbebus->BINODE != NULL))
|
||||
(void) fprintf (stderr,"BEH_warning : bebus `%s` not empty\n",
|
||||
bebusname);
|
||||
}
|
||||
else
|
||||
{
|
||||
beh_frebiabl (ptbebus->BIABL);
|
||||
beh_frebinode (ptbebus->BINODE);
|
||||
}
|
||||
|
||||
ptlastbus->NEXT = ptbebus->NEXT;
|
||||
autfreeblock (ptbebus);
|
||||
}
|
||||
|
||||
listbebus = headbus.NEXT;
|
||||
}
|
||||
|
||||
return(listbebus);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_rmvbebux.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_rmvbebux */
|
||||
/* description : delete a BEBUX structure and return the pointer of */
|
||||
/* the next object. A warning is printed out if the */
|
||||
/* object to be deleted is not empty when the mode is N */
|
||||
/* called func. : autfreeblock, beh_frebiabl, beh_frebinode */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct bebux *beh_rmvbebux (listbebux, bebuxname, mode)
|
||||
|
||||
struct bebux *listbebux; /* list of bebux containing the object */
|
||||
char *bebuxname; /* name of the BEBUX to be deleted */
|
||||
char mode; /* recursive delete or not (Y or N) */
|
||||
|
||||
{
|
||||
struct bebux headbux;
|
||||
struct bebux *ptlastbux;
|
||||
struct bebux *ptbebux;
|
||||
|
||||
if (listbebux != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* Search the object to be deleted */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
headbux.NEXT = listbebux;
|
||||
headbux.NAME = NULL ;
|
||||
headbux.BIABL = NULL ;
|
||||
headbux.BINODE = NULL ;
|
||||
ptbebux = &headbux;
|
||||
while ((ptbebux != NULL) && (ptbebux->NAME != bebuxname))
|
||||
{
|
||||
ptlastbux = ptbebux;
|
||||
ptbebux = ptbebux->NEXT;
|
||||
}
|
||||
|
||||
if (ptbebux != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* If the object doesn't exist return the list without */
|
||||
/* modification. */
|
||||
/* If the object has been found check the mode and, if asked */
|
||||
/* delete pointed objects recursively. */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
if (mode == 'N')
|
||||
{
|
||||
if ((ptbebux->BIABL != NULL) || (ptbebux->BINODE != NULL))
|
||||
(void) fprintf (stderr,"BEH_warning : bebux `%s` not empty\n",
|
||||
bebuxname);
|
||||
}
|
||||
else
|
||||
{
|
||||
beh_frebiabl (ptbebux->BIABL);
|
||||
beh_frebinode (ptbebux->BINODE);
|
||||
}
|
||||
|
||||
ptlastbux->NEXT = ptbebux->NEXT;
|
||||
autfreeblock (ptbebux);
|
||||
}
|
||||
|
||||
listbebux = headbux.NEXT;
|
||||
}
|
||||
|
||||
return(listbebux);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_rmvbefig.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_rmvbefig */
|
||||
/* description : delete a BEFIG structure and return the pointer of */
|
||||
/* the next object. A warning is printed out if the */
|
||||
/* object to be deleted is not empty when the mode is N. */
|
||||
/* called func. : autfreeblock , beh_frebereg, beh_frebemsg, */
|
||||
/* beh_freberin, beh_frebeout, beh_frebebus, */
|
||||
/* beh_frebeaux, beh_frebebux, beh_frebepor, */
|
||||
/* beh_frebegen, getptype */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct befig *beh_rmvbefig (listbefig, befigname, mode)
|
||||
|
||||
struct befig *listbefig; /* list of befig containing the object */
|
||||
char *befigname; /* name of the BEFIG to be deleted */
|
||||
char mode; /* recursive delete or not (Y or N) */
|
||||
|
||||
{
|
||||
struct befig headfig;
|
||||
struct befig *ptlastfig;
|
||||
struct befig *ptbefig;
|
||||
struct ptype *ptptype;
|
||||
|
||||
if (listbefig != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* Search the object to be deleted */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
headfig.NEXT = listbefig;
|
||||
headfig.NAME = NULL ;
|
||||
headfig.BEREG = NULL ;
|
||||
headfig.BEMSG = NULL ;
|
||||
headfig.BERIN = NULL ;
|
||||
headfig.BEAUX = NULL ;
|
||||
headfig.BEBUX = NULL ;
|
||||
headfig.BEDLY = NULL ;
|
||||
headfig.BEPOR = NULL ;
|
||||
headfig.BEPGM = NULL ;
|
||||
headfig.USER = NULL ;
|
||||
ptbefig = &headfig;
|
||||
while ((ptbefig != NULL) && (ptbefig->NAME != befigname))
|
||||
{
|
||||
ptlastfig = ptbefig;
|
||||
ptbefig = ptbefig->NEXT;
|
||||
}
|
||||
|
||||
if (ptbefig != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* If the object doesn't exist return the list without */
|
||||
/* modification. */
|
||||
/* If the object has been found check the mode and, if asked */
|
||||
/* delete pointed objects recursively. */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
if (mode == 'N')
|
||||
{
|
||||
if ((ptbefig->BEREG != NULL) || (ptbefig->BEMSG != NULL) ||
|
||||
(ptbefig->BERIN != NULL) || (ptbefig->BEOUT != NULL) ||
|
||||
(ptbefig->BEBUS != NULL) || (ptbefig->BEAUX != NULL) ||
|
||||
(ptbefig->BEBUX != NULL) || (ptbefig->BEDLY != NULL) ||
|
||||
(ptbefig->BEPOR != NULL) || (ptbefig->USER != NULL) ||
|
||||
(ptbefig->BEPGM != NULL))
|
||||
|
||||
(void) fprintf (stderr,"BEH_warning : befig `%s` not empty\n",
|
||||
befigname);
|
||||
}
|
||||
else
|
||||
{
|
||||
beh_frebereg (ptbefig->BEREG);
|
||||
beh_frebemsg (ptbefig->BEMSG);
|
||||
beh_freberin (ptbefig->BERIN);
|
||||
beh_frebeout (ptbefig->BEOUT);
|
||||
beh_frebebus (ptbefig->BEBUS);
|
||||
beh_frebeaux (ptbefig->BEAUX);
|
||||
beh_frebeaux (ptbefig->BEDLY);
|
||||
beh_frebebux (ptbefig->BEBUX);
|
||||
beh_frebepor (ptbefig->BEPOR);
|
||||
beh_frebepgm (ptbefig->BEPGM);
|
||||
if ((ptptype = getptype (ptbefig->USER,BEH_GENERIC)) != NULL)
|
||||
beh_frebegen (ptptype->DATA);
|
||||
}
|
||||
|
||||
ptlastfig->NEXT = ptbefig->NEXT;
|
||||
autfreeblock (ptbefig);
|
||||
}
|
||||
|
||||
listbefig = headfig.NEXT;
|
||||
}
|
||||
|
||||
return(listbefig);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_rmvbegen.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_rmvbegen */
|
||||
/* description : delete a BEGEN structure and return the pointer of */
|
||||
/* the next object. A warning is printed out if the */
|
||||
/* object to be deleted is not empty when the mode is N */
|
||||
/* called func. : autfreeblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct begen *beh_rmvbegen (listbegen, begenname, mode)
|
||||
|
||||
struct begen *listbegen; /* list of begen containing the object */
|
||||
char *begenname; /* name of the BEGEN to be deleted */
|
||||
char mode; /* recursive delete or not (Y or N) */
|
||||
|
||||
{
|
||||
struct begen headgen;
|
||||
struct begen *ptlastgen;
|
||||
struct begen *ptbegen;
|
||||
|
||||
if (listbegen != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* Search the object to be deleted */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
headgen.NEXT = listbegen;
|
||||
headgen.NAME = NULL ;
|
||||
headgen.VALUE = NULL ;
|
||||
ptbegen = &headgen;
|
||||
while ((ptbegen != NULL) && (ptbegen->NAME != begenname))
|
||||
{
|
||||
ptlastgen = ptbegen;
|
||||
ptbegen = ptbegen->NEXT;
|
||||
}
|
||||
|
||||
if (ptbegen != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* If the object doesn't exist return the list without */
|
||||
/* modification. */
|
||||
/* If the object has been found check the mode and, if asked */
|
||||
/* delete pointed objects recursively. */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
if (mode == 'N')
|
||||
{
|
||||
if (ptbegen->VALUE != NULL)
|
||||
(void) fprintf (stderr,"BEH_warning : begen `%s` not empty\n",
|
||||
begenname);
|
||||
}
|
||||
else
|
||||
autfreeblock (ptbegen->VALUE);
|
||||
|
||||
ptlastgen->NEXT = ptbegen->NEXT;
|
||||
autfreeblock (ptbegen);
|
||||
}
|
||||
|
||||
listbegen = headgen.NEXT;
|
||||
}
|
||||
|
||||
return(listbegen);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_rmvbemsg.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_rmvbemsg */
|
||||
/* description : delete a BEMSG structure and return the pointer of */
|
||||
/* the next object. A warning is printed out if the */
|
||||
/* object to be deleted is not empty when the mode is N */
|
||||
/* called func. : autfreeblock, freeablexpr */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct bemsg *beh_rmvbemsg (listbemsg, bemsglabl, mode)
|
||||
|
||||
struct bemsg *listbemsg; /* list of bemsg containing the object */
|
||||
char *bemsglabl; /* label of the BEMSG to be deleted */
|
||||
char mode; /* recursive delete or not (Y or N) */
|
||||
|
||||
{
|
||||
struct bemsg headmsg;
|
||||
struct bemsg *ptlastmsg;
|
||||
struct bemsg *ptbemsg;
|
||||
|
||||
if (listbemsg != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* Search the object to be deleted */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
headmsg.NEXT = listbemsg;
|
||||
headmsg.LABEL = NULL ;
|
||||
headmsg.ABL = NULL ;
|
||||
ptbemsg = &headmsg;
|
||||
while ((ptbemsg != NULL) && (ptbemsg->LABEL != bemsglabl))
|
||||
{
|
||||
ptlastmsg = ptbemsg;
|
||||
ptbemsg = ptbemsg->NEXT;
|
||||
}
|
||||
|
||||
if (ptbemsg != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* If the object doesn't exist return the list without */
|
||||
/* modification. */
|
||||
/* If the object has been found check the mode and, if asked */
|
||||
/* delete pointed objects recursively. */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
if (mode == 'N')
|
||||
{
|
||||
if (ptbemsg->ABL != NULL)
|
||||
(void) fprintf (stderr,"BEH_warning : bemsg `%s` not empty\n",
|
||||
bemsglabl);
|
||||
}
|
||||
else
|
||||
freeablexpr (ptbemsg->ABL);
|
||||
|
||||
ptlastmsg->NEXT = ptbemsg->NEXT;
|
||||
autfreeblock (ptbemsg);
|
||||
}
|
||||
|
||||
listbemsg = headmsg.NEXT;
|
||||
}
|
||||
|
||||
return(listbemsg);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_rmvbeout.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_rmvbeout */
|
||||
/* description : delete a BEOUT structure and return the pointer of */
|
||||
/* the next object. A warning is printed out if the */
|
||||
/* object to be deleted is not empty when the mode is N */
|
||||
/* called func. : autfreeblock, freeablexpr */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct beout *beh_rmvbeout (listbeout, beoutname, mode)
|
||||
|
||||
struct beout *listbeout; /* list of beout containing the object */
|
||||
char *beoutname; /* name of the BEOUT to be deleted */
|
||||
char mode; /* recursive delete or not (Y or N) */
|
||||
|
||||
{
|
||||
struct beout headout;
|
||||
struct beout *ptlastout;
|
||||
struct beout *ptbeout;
|
||||
|
||||
if (listbeout != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* Search the object to be deleted */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
headout.NEXT = listbeout;
|
||||
headout.NAME = NULL ;
|
||||
headout.ABL = NULL ;
|
||||
ptbeout = &headout;
|
||||
while ((ptbeout != NULL) && (ptbeout->NAME != beoutname))
|
||||
{
|
||||
ptlastout = ptbeout;
|
||||
ptbeout = ptbeout->NEXT;
|
||||
}
|
||||
|
||||
if (ptbeout != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* If the object doesn't exist return the list without */
|
||||
/* modification. */
|
||||
/* If the object has been found check the mode and, if asked */
|
||||
/* delete pointed objects recursively. */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
if (mode == 'N')
|
||||
{
|
||||
if (ptbeout->ABL != NULL)
|
||||
(void) fprintf (stderr,"BEH_warning : beout `%s` not empty\n",
|
||||
beoutname);
|
||||
}
|
||||
else
|
||||
freeablexpr (ptbeout->ABL);
|
||||
|
||||
ptlastout->NEXT = ptbeout->NEXT;
|
||||
autfreeblock (ptbeout);
|
||||
}
|
||||
|
||||
listbeout = headout.NEXT;
|
||||
}
|
||||
|
||||
return(listbeout);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_rmvbepor.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_rmvbepor */
|
||||
/* description : delete a BEPOR structure and return the pointer of */
|
||||
/* the next object. */
|
||||
/* called func. : autfreeblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct bepor *beh_rmvbepor (listbepor, beporname)
|
||||
|
||||
struct bepor *listbepor; /* list of bepor containing the object */
|
||||
char *beporname; /* name of the BEPOR to be deleted */
|
||||
|
||||
{
|
||||
struct bepor headpor;
|
||||
struct bepor *ptlastpor;
|
||||
struct bepor *ptbepor;
|
||||
|
||||
if (listbepor != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* Search the object to be deleted */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
headpor.NEXT = listbepor;
|
||||
headpor.NAME = NULL ;
|
||||
ptbepor = &headpor;
|
||||
while ((ptbepor != NULL) && (ptbepor->NAME != beporname))
|
||||
{
|
||||
ptlastpor = ptbepor;
|
||||
ptbepor = ptbepor->NEXT;
|
||||
}
|
||||
|
||||
if (ptbepor != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* If the object doesn't exist return the list without */
|
||||
/* modification. */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
ptlastpor->NEXT = ptbepor->NEXT;
|
||||
autfreeblock (ptbepor);
|
||||
}
|
||||
|
||||
listbepor = headpor.NEXT;
|
||||
}
|
||||
|
||||
return(listbepor);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_rmvbereg.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_rmvbereg */
|
||||
/* description : delete a BEREG structure and return the pointer of */
|
||||
/* the next object. A warning is printed out if the */
|
||||
/* object to be deleted is not empty when the mode is N */
|
||||
/* called func. : autfreeblock, beh_frebiabl, beh_frebinode */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct bereg *beh_rmvbereg (listbereg, beregname, mode)
|
||||
|
||||
struct bereg *listbereg; /* list of bereg containing the object */
|
||||
char *beregname; /* name of the BEREG to be deleted */
|
||||
char mode; /* recursive delete or not (Y or N) */
|
||||
|
||||
{
|
||||
struct bereg headreg;
|
||||
struct bereg *ptlastreg;
|
||||
struct bereg *ptbereg;
|
||||
|
||||
if (listbereg != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* Search the object to be deleted */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
headreg.NEXT = listbereg;
|
||||
headreg.NAME = NULL ;
|
||||
headreg.BIABL = NULL ;
|
||||
headreg.BINODE = NULL ;
|
||||
ptbereg = &headreg;
|
||||
while ((ptbereg != NULL) && (ptbereg->NAME != beregname))
|
||||
{
|
||||
ptlastreg = ptbereg;
|
||||
ptbereg = ptbereg->NEXT;
|
||||
}
|
||||
|
||||
if (ptbereg != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* If the object doesn't exist return the list without */
|
||||
/* modification. */
|
||||
/* If the object has been found check the mode and, if asked */
|
||||
/* delete pointed objects recursively. */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
if (mode == 'N')
|
||||
{
|
||||
if ((ptbereg->BIABL != NULL) || (ptbereg->BINODE != NULL))
|
||||
(void) fprintf (stderr,"BEH_warning : bereg `%s` not empty\n",
|
||||
beregname);
|
||||
}
|
||||
else
|
||||
{
|
||||
beh_frebiabl (ptbereg->BIABL);
|
||||
beh_frebinode (ptbereg->BINODE);
|
||||
}
|
||||
|
||||
ptlastreg->NEXT = ptbereg->NEXT;
|
||||
autfreeblock (ptbereg);
|
||||
}
|
||||
|
||||
listbereg = headreg.NEXT;
|
||||
}
|
||||
|
||||
return(listbereg);
|
||||
}
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_rmvberin.c */
|
||||
/* date : Sep 20 1994 */
|
||||
/* version : v107 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_rmvberin */
|
||||
/* description : delete a BERIN structure and return the pointer of */
|
||||
/* the next object. */
|
||||
/* called func. : autfreeblock */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
struct berin *beh_rmvberin (listberin, berinname)
|
||||
|
||||
struct berin *listberin; /* list of berin containing the object */
|
||||
char *berinname; /* name of the BERIN to be deleted */
|
||||
|
||||
{
|
||||
struct berin headrin;
|
||||
struct berin *ptlastrin;
|
||||
struct berin *ptberin;
|
||||
|
||||
if (listberin != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* Search the object to be deleted */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
headrin.NEXT = listberin;
|
||||
headrin.NAME = NULL;
|
||||
headrin.OUT_REF = NULL;
|
||||
headrin.MSG_REF = NULL;
|
||||
headrin.AUX_REF = NULL;
|
||||
headrin.BUX_REF = NULL;
|
||||
headrin.BUS_REF = NULL;
|
||||
headrin.REG_REF = NULL;
|
||||
headrin.DLY_REF = NULL;
|
||||
ptberin = &headrin;
|
||||
while ((ptberin != NULL) && (ptberin->NAME != berinname))
|
||||
{
|
||||
ptlastrin = ptberin;
|
||||
ptberin = ptberin->NEXT;
|
||||
}
|
||||
|
||||
if (ptberin != NULL)
|
||||
{
|
||||
|
||||
/* ###------------------------------------------------------### */
|
||||
/* If the object doesn't exist return the list without */
|
||||
/* modification. */
|
||||
/* ###------------------------------------------------------### */
|
||||
|
||||
freechain (ptberin->OUT_REF);
|
||||
freechain (ptberin->MSG_REF);
|
||||
freechain (ptberin->AUX_REF);
|
||||
freechain (ptberin->BUX_REF);
|
||||
freechain (ptberin->BUS_REF);
|
||||
freechain (ptberin->REG_REF);
|
||||
freechain (ptberin->DLY_REF);
|
||||
|
||||
ptlastrin->NEXT = ptberin->NEXT;
|
||||
autfreeblock (ptberin);
|
||||
}
|
||||
|
||||
listberin = headrin.NEXT;
|
||||
}
|
||||
|
||||
return(listberin);
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* */
|
||||
/* file : beh_toolbug.c */
|
||||
/* date : Sep 3 1993 */
|
||||
/* version : v106 */
|
||||
/* authors : Pirouz BAZARGAN SABET */
|
||||
/* content : low-level function */
|
||||
/* */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
#include <stdio.h>
|
||||
#include MUT_H
|
||||
#include AUT_H
|
||||
|
||||
/* ###--------------------------------------------------------------### */
|
||||
/* function : beh_toolbug */
|
||||
/* description : print an error message on the standard error output */
|
||||
/* called func. : none */
|
||||
/* ###--------------------------------------------------------------### */
|
||||
|
||||
void beh_toolbug (code, str1, str2, nbr1)
|
||||
|
||||
int code;
|
||||
char *str1;
|
||||
char *str2;
|
||||
int nbr1;
|
||||
|
||||
{
|
||||
fprintf (stderr,"Fatal error %d executing `%s`: ", code, str1);
|
||||
switch (code)
|
||||
{
|
||||
case 1:
|
||||
fprintf (stderr,"unknown operator\n");
|
||||
break;
|
||||
case 2:
|
||||
fprintf (stderr,"cannot create empty atom\n");
|
||||
break;
|
||||
case 3:
|
||||
fprintf (stderr,"cannot build NOT of empty expression\n");
|
||||
break;
|
||||
case 4:
|
||||
fprintf (stderr,"cannot combine empty expressions\n");
|
||||
break;
|
||||
case 5:
|
||||
fprintf (stderr,"cannot find terminal\n");
|
||||
break;
|
||||
case 10:
|
||||
fprintf (stderr,"decompiler called on empty figure\n");
|
||||
break;
|
||||
case 15 :
|
||||
fprintf (stderr,"illegal bit string value : `%c`\n",nbr1);
|
||||
break;
|
||||
case 16 :
|
||||
fprintf (stderr,"the same expression cannot be used twice\n");
|
||||
break;
|
||||
case 19:
|
||||
fprintf (stderr,"empty guard expression: `%s`\n",str2);
|
||||
break;
|
||||
case 20:
|
||||
fprintf (stderr,"empty waveform expression: `%s`\n",str2);
|
||||
break;
|
||||
case 100 :
|
||||
fprintf (stderr, "illegal use of attribute STABLE\n");
|
||||
break;
|
||||
case 101 :
|
||||
fprintf (stderr, "unknown terminal operand `%s`\n", str2);
|
||||
break;
|
||||
case 102 :
|
||||
fprintf (stderr, "unknown operator `%d`\n", nbr1);
|
||||
break;
|
||||
case 103 :
|
||||
fprintf (stderr, "empty expression\n");
|
||||
break;
|
||||
default:
|
||||
fprintf (stderr, "BUG\n");
|
||||
}
|
||||
autexit(1);
|
||||
}
|
|
@ -0,0 +1,263 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : FBH |
|
||||
| |
|
||||
| File : beh_view.c |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
| Date : 09.11.99 |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
#include MUT_H
|
||||
#include AUT_H
|
||||
#include ABL_H
|
||||
#include ABE_H
|
||||
|
||||
static void loc_beh_viewablexprln( Expr )
|
||||
|
||||
ablexpr *Expr;
|
||||
{
|
||||
if ( Expr == (ablexpr *)0 )
|
||||
{
|
||||
fprintf( stdout, "NULL\n" );
|
||||
}
|
||||
else
|
||||
{
|
||||
viewablexprln( Expr, ABL_VIEW_VHDL );
|
||||
}
|
||||
}
|
||||
|
||||
void beh_viewbiabl( BiAbl )
|
||||
|
||||
biabl_list *BiAbl;
|
||||
{
|
||||
if ( BiAbl == (biabl_list *)0 )
|
||||
{
|
||||
fprintf( stdout, "NULL\n" );
|
||||
}
|
||||
else
|
||||
{
|
||||
while ( BiAbl != (biabl_list *)0 )
|
||||
{
|
||||
fprintf( stdout, "--> biabl_list\n" );
|
||||
fprintf( stdout, " LABEL : %s\n", BiAbl->LABEL );
|
||||
fprintf( stdout, " CNDABL : " );
|
||||
loc_beh_viewablexprln( BiAbl->CNDABL );
|
||||
fprintf( stdout, " VALABL : " );
|
||||
loc_beh_viewablexprln( BiAbl->VALABL );
|
||||
fprintf( stdout, "<-- biabl_list\n" );
|
||||
|
||||
BiAbl = BiAbl->NEXT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void beh_viewberin( ScanRin )
|
||||
|
||||
berin_list *ScanRin;
|
||||
{
|
||||
if ( ScanRin != (berin_list *)0 )
|
||||
{
|
||||
fprintf( stdout, "--> berin_list\n" );
|
||||
fprintf( stdout, " NAME : %s\n", ScanRin->NAME );
|
||||
fprintf( stdout, "<-- berin_list\n" );
|
||||
}
|
||||
}
|
||||
|
||||
void beh_viewbereg( ScanReg )
|
||||
|
||||
bereg_list *ScanReg;
|
||||
{
|
||||
if ( ScanReg != (bereg_list *)0 )
|
||||
{
|
||||
fprintf( stdout, "--> bereg_list\n" );
|
||||
fprintf( stdout, " NAME : %s\n", ScanReg->NAME );
|
||||
fprintf( stdout, " BIABL :\n" );
|
||||
beh_viewbiabl( ScanReg->BIABL );
|
||||
fprintf( stdout, "<-- bereg_list\n" );
|
||||
}
|
||||
}
|
||||
|
||||
void beh_viewbebux( ScanBux )
|
||||
|
||||
bebux_list *ScanBux;
|
||||
{
|
||||
if ( ScanBux != (bebux_list *)0 )
|
||||
{
|
||||
fprintf( stdout, "--> bebux_list\n" );
|
||||
fprintf( stdout, " NAME : %s\n", ScanBux->NAME );
|
||||
fprintf( stdout, " TYPE : %c\n", (int)ScanBux->TYPE );
|
||||
fprintf( stdout, " BIABL :\n" );
|
||||
beh_viewbiabl( ScanBux->BIABL );
|
||||
fprintf( stdout, "<-- bebux_list\n" );
|
||||
}
|
||||
}
|
||||
|
||||
void beh_viewbebus( ScanBus )
|
||||
|
||||
bebus_list *ScanBus;
|
||||
{
|
||||
if ( ScanBus != (bebus_list *)0 )
|
||||
{
|
||||
fprintf( stdout, "--> bebus_list\n" );
|
||||
fprintf( stdout, " NAME : %s\n", ScanBus->NAME );
|
||||
fprintf( stdout, " TYPE : %c\n", (int)ScanBus->TYPE );
|
||||
fprintf( stdout, " BIABL :\n" );
|
||||
beh_viewbiabl( ScanBus->BIABL );
|
||||
fprintf( stdout, "<-- bebus_list\n" );
|
||||
}
|
||||
}
|
||||
|
||||
void beh_viewbeaux( ScanAux )
|
||||
|
||||
beaux_list *ScanAux;
|
||||
{
|
||||
if ( ScanAux != (beaux_list *)0 )
|
||||
{
|
||||
fprintf( stdout, "--> beaux_list\n" );
|
||||
fprintf( stdout, " NAME : %s\n", ScanAux->NAME );
|
||||
fprintf( stdout, " ABL :" );
|
||||
loc_beh_viewablexprln( ScanAux->ABL, ABL_VIEW_VHDL );
|
||||
fprintf( stdout, "<-- beaux_list\n" );
|
||||
}
|
||||
}
|
||||
|
||||
void beh_viewbeout( ScanOut )
|
||||
|
||||
beout_list *ScanOut;
|
||||
{
|
||||
if ( ScanOut != (beout_list *)0 )
|
||||
{
|
||||
fprintf( stdout, "--> beout_list\n" );
|
||||
fprintf( stdout, " NAME : %s\n", ScanOut->NAME );
|
||||
fprintf( stdout, " ABL :" );
|
||||
loc_beh_viewablexprln( ScanOut->ABL );
|
||||
fprintf( stdout, "<-- beout_list\n" );
|
||||
}
|
||||
}
|
||||
|
||||
void beh_viewbepor( ScanPort )
|
||||
|
||||
bepor_list *ScanPort;
|
||||
{
|
||||
if ( ScanPort != (bepor_list *)0 )
|
||||
{
|
||||
fprintf( stdout, "--> bepor_list\n" );
|
||||
fprintf( stdout, " NAME : %s\n", ScanPort->NAME );
|
||||
fprintf( stdout, " DIR : %c\n", ScanPort->DIRECTION );
|
||||
fprintf( stdout, " TYPE : %c\n", (int)ScanPort->TYPE );
|
||||
fprintf( stdout, "<-- bepor_list\n" );
|
||||
}
|
||||
}
|
||||
|
||||
void beh_viewbefig( ScanFigure )
|
||||
|
||||
befig_list *ScanFigure;
|
||||
{
|
||||
bepor_list *ScanPort;
|
||||
beaux_list *ScanAux;
|
||||
bebus_list *ScanBus;
|
||||
bebux_list *ScanBux;
|
||||
bereg_list *ScanReg;
|
||||
beout_list *ScanOut;
|
||||
berin_list *ScanRin;
|
||||
|
||||
if ( ScanFigure != (befig_list *)0 )
|
||||
{
|
||||
fprintf( stdout, "--> befig_list\n" );
|
||||
fprintf( stdout, " NAME : %s\n", ScanFigure->NAME );
|
||||
|
||||
fprintf( stdout, " BEPOR:\n" );
|
||||
|
||||
for ( ScanPort = ScanFigure->BEPOR;
|
||||
ScanPort != (bepor_list *)0;
|
||||
ScanPort = ScanPort->NEXT )
|
||||
{
|
||||
beh_viewbepor( ScanPort );
|
||||
}
|
||||
|
||||
fprintf( stdout, " BERIN:\n" );
|
||||
|
||||
for ( ScanRin = ScanFigure->BERIN;
|
||||
ScanRin != (berin_list *)0;
|
||||
ScanRin = ScanRin->NEXT )
|
||||
{
|
||||
beh_viewberin( ScanRin );
|
||||
}
|
||||
|
||||
fprintf( stdout, " BEAUX:\n" );
|
||||
|
||||
for ( ScanAux = ScanFigure->BEAUX;
|
||||
ScanAux != (beaux_list *)0;
|
||||
ScanAux = ScanAux->NEXT )
|
||||
{
|
||||
beh_viewbeaux( ScanAux );
|
||||
}
|
||||
|
||||
fprintf( stdout, " BEBUS:\n" );
|
||||
|
||||
for ( ScanBus = ScanFigure->BEBUS;
|
||||
ScanBus != (bebus_list *)0;
|
||||
ScanBus = ScanBus->NEXT )
|
||||
{
|
||||
beh_viewbebus( ScanBus );
|
||||
}
|
||||
|
||||
fprintf( stdout, " BEBUX:\n" );
|
||||
|
||||
for ( ScanBux = ScanFigure->BEBUX;
|
||||
ScanBux != (bebux_list *)0;
|
||||
ScanBux = ScanBux->NEXT )
|
||||
{
|
||||
beh_viewbebux( ScanBux );
|
||||
}
|
||||
|
||||
fprintf( stdout, " BEREG:\n" );
|
||||
|
||||
for ( ScanReg = ScanFigure->BEREG;
|
||||
ScanReg != (bereg_list *)0;
|
||||
ScanReg = ScanReg->NEXT )
|
||||
{
|
||||
beh_viewbereg( ScanReg );
|
||||
}
|
||||
|
||||
fprintf( stdout, " BEOUT:\n" );
|
||||
|
||||
for ( ScanOut = ScanFigure->BEOUT;
|
||||
ScanOut != (beout_list *)0;
|
||||
ScanOut = ScanOut->NEXT )
|
||||
{
|
||||
beh_viewbeout( ScanOut );
|
||||
}
|
||||
|
||||
fprintf( stdout, "<-- befig_list\n" );
|
||||
}
|
||||
}
|
|
@ -0,0 +1,230 @@
|
|||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| This file is part of the Alliance CAD System Copyright |
|
||||
| (C) Laboratoire LIP6 - Département ASIM Universite P&M Curie|
|
||||
| |
|
||||
| Home page : http://www-asim.lip6.fr/alliance/ |
|
||||
| E-mail support : mailto:alliance-support@asim.lip6.fr |
|
||||
| |
|
||||
| This progam is free software; you can redistribute it |
|
||||
| and/or modify it under the terms of the GNU Library General|
|
||||
| Public License as published by the Free Software Foundation |
|
||||
| either version 2 of the License, or (at your option) any |
|
||||
| later version. |
|
||||
| |
|
||||
| Alliance VLSI CAD System is distributed in the hope that |
|
||||
| it will be useful, but WITHOUT ANY WARRANTY; |
|
||||
| without even the implied warranty of MERCHANTABILITY or |
|
||||
| FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
|
||||
| Public License for more details. |
|
||||
| |
|
||||
| You should have received a copy of the GNU General Public |
|
||||
| License along with the GNU C Library; see the file COPYING. |
|
||||
| If not, write to the Free Software Foundation, Inc., |
|
||||
| 675 Mass Ave, Cambridge, MA 02139, USA. |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Tool : Beh |
|
||||
| |
|
||||
| File : main.c |
|
||||
| |
|
||||
| Date : 08.02.95 |
|
||||
| |
|
||||
| Author : Jacomme Ludovic |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Include Files |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
# include <stdio.h>
|
||||
# include <string.h>
|
||||
|
||||
# include MUT_H
|
||||
# include AUT_H
|
||||
# include ABL_H
|
||||
# include BDD_H
|
||||
# include ABE_H
|
||||
# include ABV_H
|
||||
# include ABT_H
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Constants |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Types |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Variables |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Usage |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
void BehUsage()
|
||||
{
|
||||
fprintf( stderr, "\t\tabetest [Options] Input_name [Output_name]\n\n" );
|
||||
fprintf( stdout, "\t\tOptions : -V Sets Verbose mode on\n" );
|
||||
fprintf( stdout, "\t\tOptions : -E Erases auxialiry signals\n" );
|
||||
fprintf( stdout, "\t\tOptions : -D Displays beh figure\n" );
|
||||
fprintf( stdout, "\t\tOptions : -B Makes BDD nodes\n" );
|
||||
fprintf( stdout, "\t\tOptions : -S Saves beh figure \n" );
|
||||
fprintf( stdout, "\n" );
|
||||
|
||||
exit( 1 );
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| Functions |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
/*------------------------------------------------------------\
|
||||
| |
|
||||
| main |
|
||||
| |
|
||||
\------------------------------------------------------------*/
|
||||
|
||||
int main( argc, argv )
|
||||
|
||||
int argc;
|
||||
char *argv[];
|
||||
{
|
||||
befig_list *BehFigure;
|
||||
char *InputFileName;
|
||||
char *OutputFileName;
|
||||
int Number;
|
||||
int Index;
|
||||
char Option;
|
||||
|
||||
int FlagVerbose = 0;
|
||||
int FlagSave = 0;
|
||||
int FlagDisplay = 0;
|
||||
int FlagErase = 0;
|
||||
int FlagBdd = 0;
|
||||
|
||||
mbkenv();
|
||||
autenv();
|
||||
ablenv();
|
||||
bddenv();
|
||||
|
||||
InputFileName = (char *)0;
|
||||
OutputFileName = (char *)0;
|
||||
|
||||
if ( argc < 2 ) BehUsage();
|
||||
|
||||
for ( Number = 1; Number < argc; Number++ )
|
||||
{
|
||||
if ( argv[ Number ][ 0 ] == '-' )
|
||||
{
|
||||
for ( Index = 1; argv[ Number ][ Index ] != '\0'; Index++ )
|
||||
{
|
||||
Option = argv[ Number ][ Index ];
|
||||
|
||||
switch ( Option )
|
||||
{
|
||||
case 'E' : FlagErase = 1;
|
||||
break;
|
||||
case 'B' : FlagBdd = 1;
|
||||
break;
|
||||
case 'D' : FlagDisplay = 1;
|
||||
break;
|
||||
case 'V' : FlagVerbose = 1;
|
||||
break;
|
||||
case 'S' : FlagSave = 1;
|
||||
break;
|
||||
default : BehUsage();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
if ( InputFileName == (char *)0 ) InputFileName = argv[ Number ];
|
||||
else
|
||||
if ( OutputFileName == (char *)0 ) OutputFileName = argv[ Number ];
|
||||
else
|
||||
BehUsage();
|
||||
}
|
||||
|
||||
if ( InputFileName == (char *)0 ) BehUsage();
|
||||
if ( OutputFileName == (char *)0 ) OutputFileName = InputFileName;
|
||||
|
||||
if ( FlagVerbose )
|
||||
{
|
||||
fprintf( stdout, "vhdlloadbefig %s\n", InputFileName );
|
||||
}
|
||||
|
||||
BehFigure = vhdlloadbefig( (befig_list *)0, InputFileName, 3 );
|
||||
|
||||
if ( FlagVerbose )
|
||||
{
|
||||
fprintf( stdout, "Figure %s loaded\n", BehFigure->NAME );
|
||||
}
|
||||
|
||||
/*\
|
||||
if ( FlagBdd )
|
||||
{
|
||||
BddSystem = createbddsystem( 100, 1000, 100, 5000000 );
|
||||
reorderbddsystemdynamic( BddSystem, reorderbddsystemsimple, 100000, 100 );
|
||||
|
||||
if ( FlagVerbose )
|
||||
{
|
||||
fprintf( stdout, "Makes BDD for %s\n", BehFigure->NAME );
|
||||
}
|
||||
|
||||
BehFigure->BEDLY = (beaux_list *)0;
|
||||
beh_makbdd( BehFigure, ! FlagErase, 0 );
|
||||
|
||||
testbddcircuit( (bddcircuit *)0 );
|
||||
|
||||
destroybddcircuit( BehFigure->CIRCUI );
|
||||
destroybddsystem( BddSystem );
|
||||
}
|
||||
else
|
||||
if ( FlagErase )
|
||||
{
|
||||
if ( FlagVerbose )
|
||||
{
|
||||
fprintf( stdout, "Erases auxialiary signals in %s\n", BehFigure->NAME );
|
||||
}
|
||||
|
||||
beh_delauxabl( BehFigure );
|
||||
}
|
||||
\*/
|
||||
|
||||
if ( FlagSave )
|
||||
{
|
||||
BehFigure->NAME = namealloc( OutputFileName );
|
||||
|
||||
if ( FlagVerbose )
|
||||
{
|
||||
fprintf( stdout, "vhdlsavebefig %s\n", BehFigure->NAME );
|
||||
}
|
||||
vhdlsavebefig ( BehFigure, 0 );
|
||||
|
||||
if ( FlagVerbose )
|
||||
{
|
||||
fprintf( stdout, "Figure %s saved\n", BehFigure->NAME );
|
||||
}
|
||||
}
|
||||
|
||||
if ( FlagDisplay )
|
||||
{
|
||||
beh_viewbefig( BehFigure );
|
||||
}
|
||||
|
||||
beh_frebefig( BehFigure );
|
||||
|
||||
return( 0 );
|
||||
}
|
Loading…
Reference in New Issue