TIP: Click on subject to list as thread! ANSI
echo: cis.os9.68000.osk
to: all
from: Roy Dacus 70721,1113
date: 1991-09-20 12:39:54
subject: #intercept

#: 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.

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.