
/*
 *	Function	FreeIntuiText
 *	Programmer	N.d'Alterio
 *	Date		22/09/95
 *
 *  Synopsis:	Frees the IntuiText structures allocated by 
 *		AllocIntuiText or BuildIntuiText i.e. either
 *		a single IntuiText structure or a fully linked 
 *		list.
 *		Makes sure the pointer is NULL after it has 
 *		finished so repeat calling on the same pointer
 *		will never cause a problem.
 *
 *  Arguments:	struct IntuiText *	IntuiText struct/linked list to free.
 *
 *  Returns:				None.
 *
 *  Variables:	*next_it		Pointer to next IntuiText.
 * 
 *  Functions:	FreeMem			Frees memory (EXEC)
 *
 *  $Id: FreeIntuiText.c 1.2 1995/09/24 16:58:41 daltern Exp $
 *
 */

#include "SpoolWatch.h"

void FreeIntuiText( struct IntuiText *it )

{

  struct IntuiText *next_it;

/*
 *   While there is IntuiText free it.
 */

  while ( it ) {

	next_it = it->NextText;
	
	FreeMem( it->IText, FULLINFO_LEN * sizeof( char ) );
	FreeMem( it, sizeof( struct IntuiText ) );

	it = next_it;

  }   /* end while */

  return;

}   /* end function FreeIntuiText */

/*========================================================================*
                        END FUNCTION FreeIntuiText
 *========================================================================*/
