/* gcc -g -Wall -o tsj tsj.c -I. -L. -lxpa */ #include #include #include #define MAXB 1024 #define GB (1024 * 1024 * 1024) char *xmalloc(int size); void xfree(char *buf); int main(int argc, char **argv) { char iter=0; int i=0; int n=0; char tbuf[100]; char *bufs[MAXB]; jmp_buf env; loop: iter++; if( setjmp(env) == 0 ){ XPASaveJmp((void *)env); fprintf(stdout, "continue? "); fgets(tbuf, 99, stdin); if( *tbuf != 'y' ){ fprintf(stdout, "exiting ...\n"); return 0; } else{ fprintf(stderr, "allocating ...\n"); for(n=0; n