/*
**	patch.library
**
**	Copyright © 1993-1997 by Stefan Fuchs
**		Freely distributable.
*/

#ifndef _PATCH_INCLUDES_H
#include "patch_includes.h"
#endif


/****** patch.library/WaitRemovePatch ***************************************
*
*   NAME
*        WaitRemovePatch -- Waits until it is possible to remove a patch.
*
*   SYNOPSIS
*        Error = WaitRemovePatch( patch )
*        D0                       A0
*
*        ULONG Error WaitRemovePatch( struct Patch * );
*
*   FUNCTION
*        This function is obsolete from V2 on, use RemovePatchTags() instead.
*        It effectively calls the new function
*        RemovePatchTags(patch,  PATT_TimeOut, 0x7fffffff,
*                                PATT_DelayedExpunge, FALSE,
*                                TAG_DONE)
*
*   INPUTS
*        patch = pointer to the patch structure or NULL for no action
*
*   RESULT
*        Error = errorcode as defined in patch.h.
*                (for more information see RemovePatchTags() )
*
*   NOTES
*
*   BUGS (?)
*        This function will never return, if the patched library function
*        crashed for some reason.
*
*   SEE ALSO
*        RemovePatchTags()
*
******************************************************************************
*
*/

ULONG LIBFUNC WaitRemovePatch( REGA0 struct Patch *patch GNUC_REGA0)
{
struct TagItem taglist[3];
	taglist[0].ti_Tag = PATT_TimeOut;
	taglist[0].ti_Data = 0x7fffffff;

	taglist[1].ti_Tag = PATT_DelayedExpunge;
	taglist[1].ti_Data = 0L;

	taglist[2].ti_Tag = TAG_DONE;

	return(RemovePatchTagsA(patch, taglist));
}
