rem: return 1;
add: return true;
context: detect_loop (struct item *k){  if (k->count > 0)    {      /* K does not have to be part of a cycle.  It is however part of	 a graph that contains a cycle.  */      if (loop == NULL)	/* Start traversing the graph at K.  */	loop = k;      else	{	  struct successor **p = &k->top;	  while (*p)	    {	      if ((*p)->suc == loop)		{		  if (k->qlink)		    {		      /* We have found a loop.  Retrace our steps.  */		      while (loop)			{			  struct item *tmp = loop->qlink;			  fprintf (stderr, "%s: %s\n", program_name,				   loop->str);			  /* Until we encounter K again.  */			  if (loop == k)			    {			      /* Remove relation.  */			      (*p)->suc->count--;			      *p = (*p)->next;			      break;			    }			  /* Tidy things up since we might have to                             detect another loop.  */			  loop->qlink = NULL;			  loop = tmp;			}		      while (loop)			{			  struct item *tmp = loop->qlink;			  loop->qlink = NULL;			  loop = tmp;			}		      /* Since we have found the loop, stop walking                         the tree.  */		      return 1;		    }		  else		    {		      k->qlink = loop;		      loop = k;		      break;		    }		}	      p = &(*p)->next;	    }	}    }  return 0;}