/*
# proc: allocfet - allocates and initialized an empty fet structure.
# proc:
*/

#include <stdio.h>
#include <fet.h>

FET *allocfet(numfeatures)
int numfeatures;
{
   FET *fet;

   if ((fet = (FET *)malloc(sizeof(FET))) == NULL)
      syserr("allocfet","malloc","fet");
   if ((fet->names = (char **)calloc(numfeatures, sizeof(char *))) == NULL)
      syserr("allocfet","calloc","fet->names");
   if ((fet->values = (char **)calloc(numfeatures, sizeof(char *))) == NULL)
      syserr("allocfet","calloc","fet->values");
   fet->alloc = numfeatures;
   fet->num = 0;
   return(fet);
}
