
/* ###--------------------------------------------------------------### */
/* 									*/
/* file		: pat_addpaevt.c					*/
/* date		: Jul 23 1993						*/
/* version	: v104							*/
/* authors	: Pirouz BAZARGAN SABET					*/
/* content	: low-level pat function				*/
/*									*/
/* ###--------------------------------------------------------------### */

#include MUT_H
#include PAT_H

/* ###--------------------------------------------------------------### */
/* function	: pat_addpaevt						*/
/* description	: create a PAEVT (input-output event) structure at the	*/
/*		  top of a list						*/
/* called func.	: mbkalloc						*/
/* ###--------------------------------------------------------------### */

struct paevt *pat_addpaevt (lastpaevt, index, usrval)

struct paevt   *lastpaevt;	/* pointer on the last paevt structure	*/
unsigned short  index;		/* index of the input-output		*/
char            usrval;		/* user predicted value			*/

  {
  struct paevt *ptevt;

  ptevt         = (struct paevt *) mbkalloc (sizeof(struct paevt));
  ptevt->INDEX  = index;
  ptevt->USRVAL = usrval;
  ptevt->SIMVAL = usrval;
  ptevt->NEXT   = lastpaevt;

  return (ptevt);
  }
