C Standard Library - <setjmp.h>
Introduction
setjmp.h The header file defines the macro setjmp(), function longjmp() and variable type jmp_buf, this variable type will bypass normal function call and return rules.
Library variables
The variables defined in the header file setjmp.h are listed below:
Serial number | Variable & Description |
---|---|
1 | jmp_buf This is a macro used to store setjmp() and functions longjmp() Array type of related information. |
Library macros
The following is the only macro defined in this library:
Serial number | Macro & Description |
---|---|
1 | int setjmp(jmp_buf environment) This macro saves the current environment in the variable environment for subsequent use of function longjmp(). If this macro returns directly from a macro call, it returns zero, but if it returns from a longjmp() function call, it returns a non-zero value. |
Library functions
The following is the only function defined in the header file setjmp.h:
Serial number | Function & Description |
---|---|
1 | void longjmp(jmp_buf environment, int value) This function restores the most recent call setjmp() The environment saved during the macro, jmp_buf The parameter settings are generated by the previous call to setjmp(). |