static int AddFormData(struct FormData **formp,
                       const void *line,
                       long length)
{
  int bIsString;
  struct FormData *newform = (struct FormData *)
    malloc(sizeof(struct FormData));
  newform->next = NULL;

  /* we make it easier for plain strings: */
  if(!length)
  {
	bIsString = 1;
    length = strlen((char *)line) + 1;
  }
  else
  {
	bIsString = 0;
  }

  newform->line = (char *)malloc(length);
  memcpy(newform->line, line, length);
  newform->length = length;
  if( bIsString ) newform->line[length]  /* zero terminate for easier debugging */

  if(*formp) {
    (*formp)->next = newform;
    *formp = newform;
  }
  else
    *formp = newform;

  return length;
}
