Saves the execution environment of the currently executing function in the specified storage area.
env Pointer to storage area in which execution environment is to be saved
When setjmp function is called: 0
On return from longjmp function: Nonzero
The execution environment saved by the setjmp function is used by the longjmp function. The return value is 0 when the function is called as the setjmp function, but the return value on return from the longjmp function is the value of the second parameter specified by the longjmp function.
If the setjmp function is called from a complex expression, part of the current execution environment, such as the intermediate result of expression evaluation, may be lost. The setjmp function should only be used in the form of a comparison between the result of the setjmp function and a constant expression, and should not be called within a complex expression.