/* smallsig.c
L. Stewart August 24, 1982 11:31 AM
*/
/* very simple non-local goto.
call SSEnable with a pointer to a three word block of storage.
It will return 0.
Later, call SSReturn with the same pointer and some (non-zero!)
return value. The call to SSEnable will seem to occur again,
returning the new result.
*/
extern MyFrame();
extern CallersFrame();
extern ReturnLoc();
extern ReturnTo();
struct ssig {
int ssframe;
int ssenframe;
int sscontinue;
};
int SSEnable(ss)
struct ssig *ss;
{
ss->ssenframe = MyFrame();
ss->ssframe = CallersFrame(MyFrame());
ss->sscontinue = ReturnLoc(MyFrame());
return(0);
};
int SSReturn(ss, result)
struct ssig *ss;
int result;
{
ReturnTo(ss->ssenframe, ss->ssframe, ss->sscontinue, result);
};