#include <stdio.h> #include <process.h> #include <setjmp.h> void subroutine(void); jmp_buf jumper; int main(void) { int value; value = setjmp(jumper); if (value != 0) { printf("Longjmp with value %d\n", value); exit(value); } printf("About to call subroutine ... \n"); subroutine(); return 0; } void subroutine(void) { longjmp(jumper,1); }