if (parent != child) {  if (numarcs == maxarcs) {  if (maxarcs == 0) maxarcs = 1; maxarcs *= 2;   newarcs = (Arc **)xmalloc(sizeof (Arc *) * maxarcs);   memcpy (newarcs, arcs, numarcs * sizeof (Arc *));   free (arcs);   arcs = newarcs; }   arcs[numarcs++] = arc; }
DEFUN (arc_add, (parent, child, count),       Sym * parent AND Sym * child AND int count){  Arc *arc;  DBG (TALLYDEBUG, printf ("[arc_add] %d arcs from %s to %s\n",			   count, parent->name, child->name));  arc = arc_lookup (parent, child);  if (arc)    {      /*       * A hit: just increment the count.       */      DBG (TALLYDEBUG, printf ("[tally] hit %d += %d\n",			       arc->count, count));      arc->count += count;      return;    }  arc = (Arc *) xmalloc (sizeof (*arc));  arc->parent = parent;  arc->child = child;  arc->count = count;  /* prepend this child to the children of this parent: */  arc->next_child = parent->cg.children;  parent->cg.children = arc;  /* prepend this parent to the parents of this child: */  arc->next_parent = child->cg.parents;  child->cg.parents = arc;}