/*****************************************************************************

	ExeFB()

	This function executes an FB command.

*****************************************************************************/

#include "ZPort.h"		/* define portability identifiers */
#include "DefError.h"		/* define identifiers for error messages */
#include "DefTeco.h"		/* define general identifiers */

extern	VOID	ErrMsg();	/* display an error message */
extern	DEFAULT	Search();	/* top level search */

EXTERN	BYTE	CmdMod;		/* command modifiers flags for @, :, etc. */
EXTERN	WORD	SrcTyp;		/* type of search (E_SEARCH, N_SEARCH, etc) */


DEFAULT ExeFB()			/* execute an FB command */
{
#if DEBUGGING
DbgInd+=2;if(DbgLvl>=1){DbgMsg();DbgDBf("ExeFB: called.\015\012");DbgROf();}
#endif

	if (CmdMod & DCOLON)			/* if it's ::FB */
		{
		ErrMsg(ERR_ILL, "::FB");	/* illegal command "::FB" */
#if DEBUGGING
if(DbgLvl>=1)
{DbgMsg();DbgDBf("ExeFB: returning FAILURE.\015\012");DbgROf();}DbgInd-=2;
#endif
		return(FAILURE);
		}

	SrcTyp = FB_SEARCH;
	if (Search(NO) == FAILURE)
#if DEBUGGING
{if(DbgLvl>=1)
{DbgMsg();DbgDBf("ExeFB: returning FAILURE.\015\012");DbgROf();}DbgInd-=2;
#endif
		return(FAILURE);
#if DEBUGGING
}
#endif

	CmdMod = '\0';				/* clear modifiers flags */
#if DEBUGGING
if(DbgLvl>=1)
{DbgMsg();DbgDBf("ExeFB: returning SUCCESS.\015\012");DbgROf();}DbgInd-=2;
#endif
	return(SUCCESS);
}
