import std.c.setjmp;
import std.stdio;

int main() {
	int value;
	jmp_buf jumper;

	value = setjmp(jumper);
	if (value != 0)
	{
	   writefln("Longjmp with value %d", value);
	   return value;
	}
	writefln("About to call subroutine ... ");
	subroutine(jumper);

	return 0;
}

void subroutine(jmp_buf jumper)
{
	longjmp(jumper, 1);
}
