TEACL is a fork of TECOC created for the purpose of describing diffs in a document being collaboratively edited
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

37 lines
1.2 KiB

/*****************************************************************************
ExeEY()
This function executes an EY command.
*****************************************************************************/
#include "zport.h" /* define portability identifiers */
#include "tecoc.h" /* define general identifiers */
#include "defext.h" /* define external global variables */
DEFAULT ExeEY() /* execute an EY command */
{
BOOLEAN ColonMod;
DBGFEN(1,"ExeEY",NULL);
ColonMod = (CmdMod & COLON); /* is it :EY ? */
CmdMod &= ~COLON; /* clear modifiers flags */
GapBeg = EBfBeg; /* clear the... */
GapEnd = EBfEnd; /* ...edit buffer */
if (IsEofI[CurInp]) { /* if at end-of-file */
if (ColonMod) { /* if it's :EY */
DBGFEX(1,DbgFNm,"PushEx(0)");
return PushEx(0L, OPERAND);
} else {
EStTop = EStBot; /* clear expression stack */
DBGFEX(1,DbgFNm,"SUCCESS");
return SUCCESS;
}
}
if (RdPage() == FAILURE) { /* read a page */
DBGFEX(1,DbgFNm,"FAILURE");
return FAILURE;
}
if (ColonMod) { /* if it's :EY */
DBGFEX(1,DbgFNm,"PushEx(-1)");
return PushEx(-1L, OPERAND);
}
EStTop = EStBot; /* clear expression stack */
DBGFEX(1,DbgFNm,"SUCCESS");
return SUCCESS;
}