xp_comm_proj/rd_dicom/Papyrus3/PapyList3.c
/********************************************************************************/
/*										*/
/*	DeleteList : Deletes the list as well as its elements. Begins by the 	*/
/*	first element and loop to the end of the list.				*/
/*	return : papNoError if OK, listError in case of an error.		*/
/*										*/
/********************************************************************************/
DeleteList : Deletes the list as well as its elements. Begins by the
first element and loop to the end of the list.
return : papNoError if OK, listError in case of an error.
DeleteList : Deletes the list as well as its elements . Begins by the first element and loop to the end of the list . return : papNoError if OK listError in case of an error .
PapyShort
DeleteList (PapyShort inFileNb, Papy_List **ioListP, int inDelAll, int inDelGroup, int inDelSeq)
{
  Papy_List	*toFree, *theWrkP;
  PapyShort	theErr = 0;
  if (*ioListP == NULL) return theErr;
  toFree = *ioListP;
  while (toFree != NULL)
  {
    theWrkP = toFree->next;
    if ((theErr = FreeCell (inFileNb, &toFree, inDelAll, inDelGroup, inDelSeq)) < 0) RETURN (theErr);
    toFree = theWrkP;
  } 
  *ioListP = NULL;
  RETURN (theErr);
}
PapyShort DeleteList ( PapyShort inFileNb , Papy_List * * ioListP , int inDelAll , int inDelGroup , int inDelSeq ) { Papy_List * toFree , * theWrkP ; PapyShort theErr = 0 ; if ( * ioListP == NULL ) return theErr ; toFree = * ioListP ; while ( toFree != NULL ) { theWrkP = toFree -> next ; if ( ( theErr = FreeCell ( inFileNb , & toFree , inDelAll , inDelGroup , inDelSeq ) ) < 0 ) RETURN ( theErr ) ; toFree = theWrkP ; } * ioListP = NULL ; RETURN ( theErr ) ; }
DeleteList : Deletes the list as well as its elements.
DeleteList : Deletes the list as well as its elements .
/* loop on the elements of the list and frees them begining by the first one */ /* free the cell and its content */ /* while ...loop on the elements of the list */