build_state_zero (struct dfa *d)
{
  d->tralloc = 1;
  d->trcount = 0;
  CALLOC(d->realtrans, d->tralloc + 1);
  d->trans = d->realtrans + 1;
  CALLOC(d->fails, d->tralloc);
  MALLOC(d->success, d->tralloc);
  MALLOC(d->newlines, d->tralloc);
  build_state(0, d);
}
build_state_zero (struct dfa *d)
{
  d->tralloc = 1;
  d->trcount = 0;
  CALLOC(d->realtrans, d->tralloc + 1);
  d->trans = d->realtrans + 1;
  CALLOC(d->fails, d->tralloc);
  MALLOC(d->success, d->tralloc);
  MALLOC(d->newlines, d->tralloc);
  build_state(0, d);
}