
/* ###--------------------------------------------------------------### */
/* 									*/
/* file		: beh_addbeout.c					*/
/* date		: Sep  3 1993						*/
/* version	: v106							*/
/* authors	: Pirouz BAZARGAN SABET					*/
/* content	: low-level function					*/
/*									*/
/* ###--------------------------------------------------------------### */

#include <stdio.h>
#include MUT_H
#include LOG_H
#include BEH_H

/* ###--------------------------------------------------------------### */
/* function	: beh_addbeout						*/
/* description	: create a BEOUT structure at the top the list		*/
/* called func.	: namealloc, mbkalloc					*/
/* ###--------------------------------------------------------------### */

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 node  *bdd_expr;		/* port's expression (BDD)		*/

  {
  struct beout *ptout;

  name         = namealloc (name);

  ptout        = (struct beout *) mbkalloc (sizeof(struct beout));
  ptout->NAME  = name;
  ptout->ABL   = abl_expr;
  ptout->NODE  = bdd_expr;
  ptout->NEXT  = lastbeout;

  return (ptout);
  }
