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

	ExeF()

	This function executes two-letter commands that start with "F".
It uses the character following the "F" to index into a table of functions.

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

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

extern	VOID	ErrMsg();	/* display an error message */
extern	DEFAULT	ExeFB();	/* execute FB command */
extern	DEFAULT	ExeFBr();	/* execute F| command */
extern	DEFAULT	ExeFC();	/* execute FC command */
extern	DEFAULT	ExeFD();	/* execute FD command */
extern	DEFAULT	ExeFGt();	/* execute F> command */
extern	DEFAULT	ExeFK();	/* execute FK command */
extern	DEFAULT	ExeFLs();	/* execute F< command */
extern	DEFAULT	ExeFN();	/* execute FN command */
extern	DEFAULT	ExeFR();	/* execute FR command */
extern	DEFAULT	ExeFS();	/* execute FS command */
extern	DEFAULT	ExeFSQ();	/* execute F' command */
extern	DEFAULT	ExeFUn();	/* execute F_ command */
extern	DEFAULT	IncCBP();	/* increment CBfPtr */

EXTERN	char	*CBfPtr;	/* pointer into command string */


DEFAULT ExeF()				/* execute one of the F commands */
{
	static char *ErrTxt = "x";

	if (IncCBP() == FAILURE)
		return(FAILURE);

	switch (To_Upper(*CBfPtr)) {
		case 'S':       return(ExeFS());
		case 'N':       return(ExeFN());
		case 'D':       return(ExeFD());
		case 'R':       return(ExeFR());
		case 'B':       return(ExeFB());
		case 'C':       return(ExeFC());
		case 'K':       return(ExeFK());
		case '_':       return(ExeFUn());
		case '>':       return(ExeFGt());
		case '<':       return(ExeFLs());
		case '\'':      return(ExeFSQ());
		case '|':       return(ExeFBr());
		default:
				*ErrTxt = *CBfPtr;
				ErrMsg(ERR_IFC, ErrTxt);
				return(FAILURE);
	}
}
