scc

A fork of https://git.simple-cc.org/scc/ for Qute

git clone https://git.8pit.net/scc.git

 1.TH SETJMP 3 scc\-VERSION
 2.SH NAME
 3setjmp - save and restore the calling environment for non-local jumps
 4.SH SYNOPSIS
 5#include <setjmp.h>
 6
 7.nf
 8int setjmp(jmp_buf env)
 9void longjmp(jmp_buf env, int val)
10.fi
11.SH DESCRIPTION
12The
13.BR setjmp ()
14function saves the current execution environment into
15.IR env ,
16which may later be passed to
17.BR longjmp ()
18to transfer control back to the point of the
19.B setjmp
20call.
21
22The
23.BR longjmp ()
24function restores the execution environment previously captured by
25.B setjmp
26in the same program invocation, using the matching
27.I env
28buffer.
29
30Calling
31.BR longjmp ()
32is only valid if the corresponding
33.B setjmp
34was made in the same program invocation,
35the function that called
36.B setjmp
37has not yet returned,
38and execution has not left the scope of any variably modified type
39that was in scope at the time of the
40.B setjmp
41call.
42Violating these conditions produces undefined behavior.
43.SH RETURN VALUE
44When called directly,
45.B setjmp
46returns zero.
47When control is transferred via
48.BR longjmp ,
49.B setjmp
50returns a non-zero value.
51
52After
53.B longjmp
54is called, execution resumes as though
55.B setjmp
56had just returned
57.IR val .
58If
59.I val
60is zero,
61.B setjmp
62returns 1 instead.
63.SH STANDARDS
64.nf
65ISO/IEC 9899:1999 Section 7.13.1.1 Paragraph 1,2,3
66ISO/IEC 9899:1999 Section 7.13.2.1 Paragraph 1,2,3,4
67.fi
68.SH SEE ALSO
69.BR setjmp.h (3)