AT&T UNIX™PC Unix System V Users Manual - tenox
AT&T UNIX™PC Unix System V Users Manual - tenox AT&T UNIX™PC Unix System V Users Manual - tenox
I�
SETJMP (3C) SETJMP ( 3C ) NAME setjmp, longjmp - non-local goto SYNOPSIS #include int setj mp (env) jmp_buf env; void longjmp (env, val) jmp_bur env; int val; DESCRIPTION These functions are useful for dealing with errors and interrupts encountered in a low-level subroutine of a program. Setjmp saves its stack environment in env (whose type, jmp_buf, is defined in the header file), for later use by longjmp . It returns the value 0. Longjmp restores the environment saved by the last call of setjmp with the corresponding env argument. After longjmp is completed program execution continues as if the corresponding call of setjmp (which must not itself have returned in the interim) had just returned the value val . Longjmp cannot cause setjmp to return the value 0. If longjmp is invoked with a second argument of 0, setjmp will return 1 . All accessible data have values as of the time longjmp was called. SEE ALSO signal(2). WARNING If longjmp is called when env was never primed by a call to setjmp , or when the last such call is in a function which has since returned, absolute chaos is guaranteed. - 1 -
- Page 924 and 925: MA THERR (3M) MATHERR (3M) } BESSEL
- Page 926 and 927: () . -�
- Page 928 and 929: MEMORY (3C} MEMORY (3C) Character m
- Page 930 and 931: MENU (3T) (AT&T UNIX PC only ) MENU
- Page 932 and 933: MENU (3T) (AT&T UNIX PC only ) mite
- Page 934 and 935: MENU (3T) (AT&T UNIX PC only ) FILE
- Page 936 and 937: MESSAGE ( 3T ) ( AT&T UNIX PC only
- Page 939: MONITOR ( 3C ) MONITOR ( 3C ) NAME
- Page 943 and 944: PASTE (3T) (AT&T UNIX PC only ) PAS
- Page 945 and 946: PASTE ( 3T ) ( AT&T UNIX PC only )
- Page 947: PERROR (3C) PERROR (3C) NAME perror
- Page 950 and 951: (� / I I I I I I I I I I I I I I
- Page 952 and 953: PRINTF (3S) PRINTF (3S) A field wid
- Page 955 and 956: PUTC ( 3S ) PUTC ( 3S ) NAME putc,
- Page 957: PUTENV (3C) PUTENV (3C) NAME putenv
- Page 960 and 961: ···- ·
- Page 962 and 963: I� ·-.---·
- Page 964 and 965: ' ' .} ' 1 . ' .____.,.:
- Page 966 and 967: � ·�
- Page 968 and 969: REGCMP {3X) REGCMP {3X) ( . . . ) P
- Page 970 and 971: SCANF(3S) u 0 X SCANF(3S) an unsign
- Page 973: � I SETBUF (3S) SETBUF (3S) NAME
- Page 977 and 978: SINII ( 3M ) SINH ( 3M ) NAME sinh,
- Page 979 and 980: SLEEP (3C) SLEEP ( 3C ) NAME sleep
- Page 981: SPUTL ( 3X ) SPUTL ( 3X ) NAME sput
- Page 985: STDI0 ( 3S ) ( AT&T UNIX PC Only )
- Page 989 and 990: STRING ( 3C ) STRING (3C) NAME strc
- Page 991 and 992: STRTOD (3C) STRTOD (3C) NAME strtod
- Page 993: STRTOL ( 3C ) STRTOL ( 3C ) NAME st
- Page 996 and 997: C) / I I I I I I I I I () �� /
- Page 998 and 999: n "--- --'•
- Page 1000 and 1001: TAM (3T) (AT&T UNIX PC only ) int w
- Page 1002 and 1003: TAM (3T) (AT&T UNIX PC only ) TAM(3
- Page 1004 and 1005: TAM (3T) wputc() wputs() wprintf()
- Page 1006 and 1007: TAM (3T) (AT&T UNIX PC only ) TAM(3
- Page 1008 and 1009: I I I I I I I II I I I I � r"j I
- Page 1010 and 1011: TMPNAM (3S) TMPNAM (3S) SEE ALSO cr
- Page 1012 and 1013: TRACK (3T) (AT&T UNIX PC only ) TRA
- Page 1015: TRIG ( 3M ) TRIG ( 3M) NAME sin, co
- Page 1018 and 1019: TSEARCH ( 3C ) TSEARCH ( 3C ) data
- Page 1021: TTYNAME ( 3C ) TTYNAME ( 3C ) NAME
SETJMP (3C) SETJMP ( 3C )<br />
NAME<br />
setjmp, longjmp - non-local goto<br />
SYNOPSIS<br />
#include <br />
int setj mp (env)<br />
jmp_buf env;<br />
void longjmp (env, val)<br />
jmp_bur env;<br />
int val;<br />
DESCRIPTION<br />
These functions are useful for dealing with errors and interrupts<br />
encountered in a low-level subroutine of a program.<br />
Setjmp saves its stack environment in env (whose type, jmp_buf,<br />
is defined in the header file), for later use by<br />
longjmp . It returns the value 0.<br />
Longjmp restores the environment saved by the last call of setjmp<br />
with the corresponding env argument. After longjmp is completed<br />
program execution continues as if the corresponding call of setjmp<br />
(which must not itself have returned in the interim) had just<br />
returned the value val . Longjmp cannot cause setjmp to return<br />
the value 0. If longjmp is invoked with a second argument of 0,<br />
setjmp will return 1 . All accessible data have values as of the<br />
time longjmp was called.<br />
SEE ALSO<br />
signal(2).<br />
WARNING<br />
If longjmp is called when env was never primed by a call to<br />
setjmp , or when the last such call is in a function which has since<br />
returned, absolute chaos is guaranteed.<br />
- 1 -