#: 12311 S12/OS9/68000 (OSK)
20-Sep-91 12:39:54
Sb: #intercept
Fm: Roy Dacus 70721,1113
To: all
/* sigl.c */
/* a program to show that you can longjmp() from intercept() */
/* without the stack growing. control E to end, control C to test */
/* part 1 */
#include
#include
#define TRUE 1
#define FALSE 0
int count1;
int init;
int jumped;
int ret;
jmp_buf env1;
main()
{
int ccheck();
count1=0;
init=FALSE;
intercept(ccheck);
pmain();
}
ccheck(signum)
int signum;
{
if (signum != 3)
exit(signum);
if (jumped)
return;
pmain();
}
There is 1 Reply.
|