/* smallsig.c
L. Stewart March 30, 1982 5:33 PM
*/
/* 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.
*/
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);
};