/***********************************************************************
*
* Projet   : DilibPro
* Module   : SgmlPath
* Fichier  : SgmlPathIterCopy.c
* Auteur   : Ducloy
* Date     : 2/94
* $Id: SgmlPathIterCopy.c,v 1.2 2005/06/22 14:22:35 parmentf Exp $
*
************************************************************************
*
* Copyright (c) 1994 CNRS/CRIN & INRIA Lorraine
* 
************************************************************************/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
 
#include "SgmlPath.h"

void SgmlPath__StepContextCopy(SgmlPath_StepContext *ct1,
			       SgmlPath_StepContext *ct2)
{
  ct1->currentNode  =ct2->currentNode;
  ct1->currentString=ct2->currentString;
}

void SgmlPathIteratorCopyContext(SgmlPathIterator *iter1,
				 SgmlPathIterator *iter2)
{
  int i;
  iter1->tree          =iter2->tree;
  iter1->currentStep   =iter2->currentStep;
  iter1->currentContext=iter2->currentContext;
  i=0;
  do
    {
      SgmlPath__StepContextCopy(&(iter1->context[i]),&(iter2->context[i]));
    }
  while (++i<iter2->prog->numberOfContext);
  
}



 
