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

#include MUT_H
#include PAT_H

/* ###--------------------------------------------------------------### */
/* function	: pat_addpaini						*/
/* description	: create a PAINI (register initialization) structure	*/
/*		  at the top of a list					*/
/* called func.	: namealloc, mbkalloc					*/
/* ###--------------------------------------------------------------### */

struct paini *pat_addpaini (lastpaini, name, value)

struct paini *lastpaini;	/* pointer on the last paini structure	*/
char         *name;		/* register's name			*/
char          value;		/* value to be forced into the register	*/

  {
  struct paini *ptini;

  name         = namealloc (name);

  ptini        = (struct paini *) mbkalloc (sizeof(struct paini));
  ptini->NAME  = name;
  ptini->VALUE = value;
  ptini->NEXT  = lastpaini;

  return (ptini);
  }
