#include <setjmp.h>
void longjmp(jmp_buf env, int val);
longjmp restores the environment saved by the most recent invocation of setjmp with the corresponding jmp_buf argument. If there has been no such invocation, or if the function containing the invocation of setjmp has terminated execution in the interim, the behavior iof longjmp undefined.
When the environment is restored, all accessible objects have values have state as of the time the longjmp function was called.
After longjmp is completed, program execution continues as if the corresponding invocation of setjmp had just returned the value specified by val. Note that longjmp cannot cause setjmp to return the value 0; if val is 0, setjmp returns the value 1.
Objects of automatic storage duration that are local to the function containing the invocation of the corresponding setjmp that do not have volatile-qualified type and have been changed between the setjmp invocation and longjmp call are indeterminate.
longjmp conforms to ISO/IEC 9899:1990 (C90) and ISO/IEC 9899:1999 (C99).